com.ning.http.client.providers.grizzly
Class GrizzlyResponseFuture<V>

java.lang.Object
  extended by com.ning.http.client.listenable.AbstractListenableFuture<V>
      extended by com.ning.http.client.providers.grizzly.GrizzlyResponseFuture<V>
All Implemented Interfaces:
ListenableFuture<V>, Future<V>

public class GrizzlyResponseFuture<V>
extends AbstractListenableFuture<V>

AbstractListenableFuture implementation adaptation of Grizzly's FutureImpl.

Since:
1.7.0
Author:
The Grizzly Team

Method Summary
 void abort(Throwable t)
          Abort the current processing, and propagate the Throwable to the AsyncHandler or Future
 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.
 
Methods inherited from class com.ning.http.client.listenable.AbstractListenableFuture
addListener, runListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

done

public void done()
Description copied from interface: ListenableFuture
Terminate and if there is no exception, mark this Future as done and release the internal lock.


abort

public void abort(Throwable t)
Description copied from interface: ListenableFuture
Abort the current processing, and propagate the Throwable to the AsyncHandler or Future


content

public void content(V v)
Description copied from interface: ListenableFuture
Set the content that will be returned by this instance

Parameters:
v - the content that will be returned by this instance

touch

public void touch()
Description copied from interface: ListenableFuture
Touch the current instance to prevent external service to times out.


getAndSetWriteHeaders

public boolean getAndSetWriteHeaders(boolean writeHeaders)
Description copied from interface: ListenableFuture
Write the Request headers


getAndSetWriteBody

public boolean getAndSetWriteBody(boolean writeBody)
Description copied from interface: ListenableFuture
Write the Request body


cancel

public boolean cancel(boolean mayInterruptIfRunning)

isCancelled

public boolean isCancelled()

isDone

public boolean isDone()

get

public V get()
      throws InterruptedException,
             ExecutionException
Throws:
InterruptedException
ExecutionException

get

public V get(long timeout,
             TimeUnit unit)
      throws InterruptedException,
             ExecutionException,
             TimeoutException
Throws:
InterruptedException
ExecutionException
TimeoutException

getProxy

public ProxyServer getProxy()


Copyright © 2014. All Rights Reserved.