List of usage examples for com.google.common.util.concurrent ForwardingListenableFuture ForwardingListenableFuture
protected ForwardingListenableFuture()
From source file:com.yahoo.yqlplus.engine.internal.scope.ExecutionScoper.java
public <T> ListenableFuture<T> scopeCallbacks(final ListenableFuture<T> callback) { final ScopedObjects scope = getScope(); return new ForwardingListenableFuture<T>() { @Override// w w w. j a va 2 s .c o m protected ListenableFuture<T> delegate() { return callback; } @Override public void addListener(Runnable listener, Executor exec) { super.addListener(listener, scope(exec, scope)); } }; }