com.ning.http.client.providers
Class NettyResponseFuture<V>
java.lang.Object
com.ning.http.client.providers.NettyResponseFuture<V>
- Type Parameters:
V
-
- All Implemented Interfaces:
- FutureImpl<V>, Future<V>
public final class NettyResponseFuture<V>
- extends Object
- implements FutureImpl<V>
A Future
that can be used to track when an asynchronous HTTP request has been fully processed.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NettyResponseFuture
public NettyResponseFuture(Url url,
Request request,
AsyncHandler<V> asyncHandler,
org.jboss.netty.handler.codec.http.HttpRequest nettyRequest,
int responseTimeoutInMs)
getUrl
public Url getUrl()
throws MalformedURLException
- Throws:
MalformedURLException
setUrl
public void setUrl(Url url)
isDone
public boolean isDone()
-
- Specified by:
isDone
in interface Future<V>
isCancelled
public boolean isCancelled()
-
- Specified by:
isCancelled
in interface Future<V>
cancel
public boolean cancel(boolean force)
-
- Specified by:
cancel
in interface Future<V>
get
public V get()
throws InterruptedException,
ExecutionException
-
- Specified by:
get
in interface Future<V>
- Throws:
InterruptedException
ExecutionException
get
public V get(long l,
TimeUnit tu)
throws InterruptedException,
TimeoutException,
ExecutionException
-
- Specified by:
get
in interface Future<V>
- Throws:
InterruptedException
TimeoutException
ExecutionException
done
public final void done()
- Specified by:
done
in interface FutureImpl<V>
abort
public final void abort(Throwable t)
- Specified by:
abort
in interface FutureImpl<V>
getRequest
public final Request getRequest()
getNettyRequest
public final org.jboss.netty.handler.codec.http.HttpRequest getNettyRequest()
getAsyncHandler
public final AsyncHandler<V> getAsyncHandler()
getKeepAlive
public final boolean getKeepAlive()
setKeepAlive
public final void setKeepAlive(boolean keepAlive)
getHttpResponse
public final org.jboss.netty.handler.codec.http.HttpResponse getHttpResponse()
setHttpResponse
public final void setHttpResponse(org.jboss.netty.handler.codec.http.HttpResponse httpResponse)
incrementAndGetCurrentRedirectCount
public int incrementAndGetCurrentRedirectCount()
setReaperFuture
public void setReaperFuture(Future<Object> reaperFuture)
Copyright © 2010. All Rights Reserved.