public void run() { if(undone && listener instanceof IUndoneResultListener) { ((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(e); } else { listener.exceptionOccurred(e); } } });
public void run() { if(undone && listener instanceof IUndoneResultListener) { ((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(e); } else { listener.exceptionOccurred(e); } } });
public void run() { if(undone && listener instanceof IUndoneResultListener) { ((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(e); } else { listener.exceptionOccurred(e); } } });
/** * Called when an exception occurred. * @param exception The exception. */ public void customExceptionOccurred(Exception exception) { if(undone && listener instanceof IUndoneResultListener) { ((IUndoneResultListener<Collection<E>>)listener).exceptionOccurredIfUndone(exception); } else { listener.exceptionOccurred(exception); } }
/** * Called when an exception occurred. * @param exception The exception. */ public void customExceptionOccurred(Exception exception) { if(undone && listener instanceof IUndoneResultListener<?>) { ((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(exception); } else { listener.exceptionOccurred(exception); } }
public void run() { // try // { if(undone && listener instanceof IUndoneResultListener) { ((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(exception); } else { listener.exceptionOccurred(exception); } // } // catch(Exception e) // { // exception.printStackTrace(); // e.printStackTrace(); // } }
/** * Handle an exception. */ protected void handleException(Exception e) { if(future!=null) { // e.printStackTrace(); // Could happen that overridden customResultAvailable method // first sets result and then throws exception (listener ex are // catched). future.setExceptionIfUndone(e); } else { if(undone && delegate instanceof IUndoneResultListener) { ((IUndoneResultListener)delegate).exceptionOccurredIfUndone(e); } else { delegate.exceptionOccurred(e); } } } }
/** * Called when an exception occurred. * @param exception The exception. */ public void exceptionOccurred(Exception exception) { boolean notify = false; synchronized(this) { if(!notified) { // need to further delegate to chained listeners/futures? notify = true; notified = true; cancel(); } } if(notify) { if(undone && listener instanceof IUndoneResultListener) { ((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(exception); } else { listener.exceptionOccurred(exception); } } }
/** * Called when an exception occurred. * @param exception The exception. */ public void exceptionOccurred(Exception exception) { boolean notify = false; synchronized(this) { if(!notified) { // need to further delegate to chained listeners/futures? notify = true; notified = true; cancel(); } } if(notify) { if(undone && listener instanceof IUndoneResultListener) { ((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(exception); } else { listener.exceptionOccurred(exception); } } }
((IUndoneResultListener)lis).exceptionOccurredIfUndone(fut.exception);
/** * Called when an exception occurred. * @param exception The exception. */ public void exceptionOccurred(Exception exception) { if(delegate != null) { if(undone && delegate instanceof IUndoneResultListener) { ((IUndoneResultListener)delegate).exceptionOccurredIfUndone(exception); } else { delegate.exceptionOccurred(exception); } } else { if(undone) { future.setExceptionIfUndone(exception); } else { future.setException(exception); } } }
((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(e);
((IUndoneResultListener<Collection<E>>)delegate).exceptionOccurredIfUndone(exception);
((IUndoneResultListener)listener).exceptionOccurredIfUndone(exception); ((IUndoneResultListener)lis).exceptionOccurredIfUndone(fut.exception);
((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(ex); ((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(ex);
((IUndoneResultListener<E>)delegate).exceptionOccurredIfUndone(exception);
((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(exception);
((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(ex);
((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(e);
((IUndoneResultListener<E>)listener).exceptionOccurredIfUndone(e);