|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ning.http.client.providers.netty.NettyResponseFuture<V>
V - public final class NettyResponseFuture<V>
A Future that can be used to track when an asynchronous HTTP request has been fully processed.
| Field Summary | |
|---|---|
static java.lang.String |
MAX_RETRY
|
| Constructor Summary | |
|---|---|
NettyResponseFuture(java.net.URI uri,
Request request,
AsyncHandler<V> asyncHandler,
org.jboss.netty.handler.codec.http.HttpRequest nettyRequest,
int responseTimeoutInMs,
NettyAsyncHttpProvider asyncHttpProvider)
|
|
| Method Summary | |
|---|---|
void |
abort(java.lang.Throwable t)
|
protected void |
attachChannel(org.jboss.netty.channel.Channel channel)
Attach a Channel for further re-use. |
boolean |
cancel(boolean force)
|
boolean |
cannotBeReplay()
Return true if the Future cannot be recovered. |
protected boolean |
canRetry()
|
protected org.jboss.netty.channel.Channel |
channel()
Return the channel that was previously used. |
void |
done(java.util.concurrent.Callable callable)
Execute a Callable and if there is no exception, mark this Future as done and release the internal lock. |
V |
get()
|
V |
get(long l,
java.util.concurrent.TimeUnit tu)
|
protected boolean |
getAndSetAuth(boolean inDigestAuth)
|
boolean |
getAndSetStatusReceived(boolean sr)
|
protected AsyncHandler<V> |
getAsyncHandler()
|
protected org.jboss.netty.handler.codec.http.HttpResponse |
getHttpResponse()
|
protected boolean |
getKeepAlive()
|
org.jboss.netty.handler.codec.http.HttpRequest |
getNettyRequest()
|
protected Request |
getRequest()
|
protected com.ning.http.client.providers.netty.NettyResponseFuture.STATE |
getState()
|
protected java.net.URI |
getURI()
|
boolean |
hasExpired()
Is the Future still valid |
protected int |
incrementAndGetCurrentRedirectCount()
|
boolean |
isCancelled()
|
boolean |
isDone()
|
protected boolean |
isInAuth()
|
protected NettyAsyncHttpProvider |
provider()
|
protected void |
setHttpResponse(org.jboss.netty.handler.codec.http.HttpResponse httpResponse)
|
protected void |
setKeepAlive(boolean keepAlive)
|
protected void |
setNettyRequest(org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
|
protected void |
setReaperFuture(java.util.concurrent.Future<?> reaperFuture)
|
protected void |
setState(com.ning.http.client.providers.netty.NettyResponseFuture.STATE state)
|
protected void |
setURI(java.net.URI uri)
|
java.lang.String |
toString()
|
protected void |
touch()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MAX_RETRY
| Constructor Detail |
|---|
public NettyResponseFuture(java.net.URI uri,
Request request,
AsyncHandler<V> asyncHandler,
org.jboss.netty.handler.codec.http.HttpRequest nettyRequest,
int responseTimeoutInMs,
NettyAsyncHttpProvider asyncHttpProvider)
| Method Detail |
|---|
protected java.net.URI getURI()
throws java.net.MalformedURLException
java.net.MalformedURLExceptionprotected void setURI(java.net.URI uri)
public boolean isDone()
isDone in interface java.util.concurrent.Future<V>public boolean isCancelled()
isCancelled in interface java.util.concurrent.Future<V>public boolean cancel(boolean force)
cancel in interface java.util.concurrent.Future<V>public boolean hasExpired()
true if response has expired and should be terminated.
public V get()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
get in interface java.util.concurrent.Future<V>java.lang.InterruptedException
java.util.concurrent.ExecutionException
public V get(long l,
java.util.concurrent.TimeUnit tu)
throws java.lang.InterruptedException,
java.util.concurrent.TimeoutException,
java.util.concurrent.ExecutionException
get in interface java.util.concurrent.Future<V>java.lang.InterruptedException
java.util.concurrent.TimeoutException
java.util.concurrent.ExecutionExceptionpublic final void done(java.util.concurrent.Callable callable)
FutureImplCallable and if there is no exception, mark this Future as done and release the internal lock.
done in interface FutureImpl<V>public final void abort(java.lang.Throwable t)
abort in interface FutureImpl<V>protected final Request getRequest()
public final org.jboss.netty.handler.codec.http.HttpRequest getNettyRequest()
protected final void setNettyRequest(org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
protected final AsyncHandler<V> getAsyncHandler()
protected final boolean getKeepAlive()
protected final void setKeepAlive(boolean keepAlive)
protected final org.jboss.netty.handler.codec.http.HttpResponse getHttpResponse()
protected final void setHttpResponse(org.jboss.netty.handler.codec.http.HttpResponse httpResponse)
protected int incrementAndGetCurrentRedirectCount()
protected void setReaperFuture(java.util.concurrent.Future<?> reaperFuture)
protected boolean isInAuth()
protected boolean getAndSetAuth(boolean inDigestAuth)
protected com.ning.http.client.providers.netty.NettyResponseFuture.STATE getState()
protected void setState(com.ning.http.client.providers.netty.NettyResponseFuture.STATE state)
public boolean getAndSetStatusReceived(boolean sr)
protected void touch()
protected NettyAsyncHttpProvider provider()
protected void attachChannel(org.jboss.netty.channel.Channel channel)
channel - The Channel to later re-use.protected org.jboss.netty.channel.Channel channel()
protected boolean canRetry()
public boolean cannotBeReplay()
Future cannot be recovered. There is some scenario where a connection can be
closed by an unexpected IOException, and in some situation we can recover from that exception.
Future cannot be recovered.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||