public abstract class Protocol extends Object
Modifier and Type | Field and Description |
---|---|
protected ChannelManager |
channelManager |
protected AsyncHttpClientConfig |
config |
protected boolean |
hasIOExceptionFilters |
protected org.slf4j.Logger |
logger |
static Set<Integer> |
REDIRECT_STATUSES |
protected NettyRequestSender |
requestSender |
Constructor and Description |
---|
Protocol(ChannelManager channelManager,
AsyncHttpClientConfig config,
NettyRequestSender requestSender) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
exitAfterHandlingRedirect(io.netty.channel.Channel channel,
NettyResponseFuture<?> future,
io.netty.handler.codec.http.HttpResponse response,
Request request,
int statusCode,
Realm realm) |
protected boolean |
exitAfterProcessingFilters(io.netty.channel.Channel channel,
NettyResponseFuture<?> future,
AsyncHandler<?> handler,
HttpResponseStatus status,
HttpResponseHeaders responseHeaders) |
abstract void |
handle(io.netty.channel.Channel channel,
NettyResponseFuture<?> future,
Object message) |
abstract void |
onClose(NettyResponseFuture<?> future) |
abstract void |
onError(NettyResponseFuture<?> future,
Throwable error) |
protected final org.slf4j.Logger logger
protected final ChannelManager channelManager
protected final AsyncHttpClientConfig config
protected final NettyRequestSender requestSender
protected final boolean hasIOExceptionFilters
public Protocol(ChannelManager channelManager, AsyncHttpClientConfig config, NettyRequestSender requestSender)
public abstract void handle(io.netty.channel.Channel channel, NettyResponseFuture<?> future, Object message) throws Exception
Exception
public abstract void onError(NettyResponseFuture<?> future, Throwable error)
public abstract void onClose(NettyResponseFuture<?> future)
protected boolean exitAfterHandlingRedirect(io.netty.channel.Channel channel, NettyResponseFuture<?> future, io.netty.handler.codec.http.HttpResponse response, Request request, int statusCode, Realm realm) throws Exception
Exception
protected boolean exitAfterProcessingFilters(io.netty.channel.Channel channel, NettyResponseFuture<?> future, AsyncHandler<?> handler, HttpResponseStatus status, HttpResponseHeaders responseHeaders)
Copyright © 2015. All Rights Reserved.