public class GrizzlyResponseFuture<V> extends AbstractListenableFuture<V>
AbstractListenableFuture
implementation adaptation of Grizzly's
FutureImpl
.Modifier and Type | Method and Description |
---|---|
void |
abort(Throwable t)
|
boolean |
cancel(boolean mayInterruptIfRunning) |
void |
content(V v)
Set the content that will be returned by this instance
|
void |
done()
Terminate and if there is no exception, mark this Future as done and release the internal lock.
|
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
boolean |
getAndSetWriteBody(boolean writeBody)
Write the
Request body |
boolean |
getAndSetWriteHeaders(boolean writeHeaders)
Write the
Request headers |
ProxyServer |
getProxy() |
boolean |
isCancelled() |
boolean |
isDone() |
void |
touch()
Touch the current instance to prevent external service to times out.
|
addListener, runListeners
public void done()
ListenableFuture
public void abort(Throwable t)
ListenableFuture
public void content(V v)
ListenableFuture
v
- the content that will be returned by this instancepublic void touch()
ListenableFuture
public boolean getAndSetWriteHeaders(boolean writeHeaders)
ListenableFuture
Request
headerspublic boolean getAndSetWriteBody(boolean writeBody)
ListenableFuture
Request
bodypublic boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
public boolean isDone()
public V get() throws InterruptedException, ExecutionException
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
public ProxyServer getProxy()
Copyright © 2014. All Rights Reserved.