V
- public final class NettyResponseFuture<V> extends AbstractListenableFuture<V>
Future
that can be used to track when an asynchronous HTTP request has been fully processed.Modifier and Type | Class and Description |
---|---|
static class |
NettyResponseFuture.STATE |
ListenableFuture.CompletedFailure<T>
Constructor and Description |
---|
NettyResponseFuture(Uri uri,
Request request,
AsyncHandler<V> asyncHandler,
NettyRequest nettyRequest,
int maxRetry,
ConnectionPoolPartitioning connectionPoolPartitioning,
ProxyServer proxyServer) |
addListener, runListeners
public NettyResponseFuture(Uri uri, Request request, AsyncHandler<V> asyncHandler, NettyRequest nettyRequest, int maxRetry, ConnectionPoolPartitioning connectionPoolPartitioning, ProxyServer proxyServer)
public boolean isDone()
public boolean isCancelled()
public boolean cancel(boolean force)
public V get() throws InterruptedException, ExecutionException
public V get(long l, TimeUnit tu) throws InterruptedException, TimeoutException, ExecutionException
public final void done()
public final void abort(Throwable t)
public void touch()
public Uri getUri()
public void setUri(Uri uri)
public ConnectionPoolPartitioning getConnectionPoolPartitioning()
public ProxyServer getProxyServer()
public void setAsyncHandler(AsyncHandler<V> asyncHandler)
public void cancelTimeouts()
public final Request getRequest()
public final NettyRequest getNettyRequest()
public final void setNettyRequest(NettyRequest nettyRequest)
public final AsyncHandler<V> getAsyncHandler()
public final boolean isKeepAlive()
public final void setKeepAlive(boolean keepAlive)
public final io.netty.handler.codec.http.HttpHeaders getHttpHeaders()
public final void setHttpHeaders(io.netty.handler.codec.http.HttpHeaders httpHeaders)
public int incrementAndGetCurrentRedirectCount()
public void setTimeoutsHolder(TimeoutsHolder timeoutsHolder)
public boolean isInAuth()
public boolean getAndSetAuth(boolean inDigestAuth)
public NettyResponseFuture.STATE getState()
public void setState(NettyResponseFuture.STATE state)
public boolean getAndSetStatusReceived(boolean sr)
public boolean isStreamWasAlreadyConsumed()
public void setStreamWasAlreadyConsumed(boolean streamWasAlreadyConsumed)
public long getLastTouch()
public void setHeadersAlreadyWrittenOnContinue(boolean headersAlreadyWrittenOnContinue)
public boolean isHeadersAlreadyWrittenOnContinue()
public void setDontWriteBodyBecauseExpectContinue(boolean dontWriteBodyBecauseExpectContinue)
public boolean isDontWriteBodyBecauseExpectContinue()
public void setReuseChannel(boolean reuseChannel)
public boolean isConnectAllowed()
public void setConnectAllowed(boolean allowConnect)
public void attachChannel(io.netty.channel.Channel channel, boolean reuseChannel)
public io.netty.channel.Channel channel()
public boolean reuseChannel()
public boolean canRetry()
public SocketAddress getChannelRemoteAddress()
public void setRequest(Request request)
public boolean canBeReplayed()
Future
can 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 long getStart()
public Object getPartitionKey()
Copyright © 2015. All Rights Reserved.