public void setException(Exception exception) { super.setExceptionIfUndone(exception); } };
/** * Create a new listener. * @param future The target future (to which is delegated). * @param src The source future which is monitored. */ public TerminableDelegationResultListener(TerminableDelegationFuture<E> future, ITerminableFuture<E> src) { super(future); future.setTerminationSource(src); } }
/** * Terminate the future. * The exception will be set to FutureTerminatedException. */ public void terminate() { terminate(new FutureTerminatedException()); }
/** * Overwritten to change result, if necessary. */ @Override protected boolean doSetResult(Object result, boolean undone) { try { result = func.handleResult(result); return DelegatingTerminableDelegationFuture.super.doSetResult(result, func.isUndone(undone)); } catch(Exception e) { return doSetException(e, func.isUndone(undone)); } }
public void setException(Exception exception) { super.setExceptionIfUndone(exception); } };
public void setException(Exception exception) { super.setExceptionIfUndone(exception); } };