Class AsyncHttpClientHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- org.asynchttpclient.netty.handler.AsyncHttpClientHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
- Direct Known Subclasses:
HttpHandler
,WebSocketHandler
public abstract class AsyncHttpClientHandler extends io.netty.channel.ChannelInboundHandlerAdapter
-
-
Field Summary
Fields Modifier and Type Field Description protected ChannelManager
channelManager
protected AsyncHttpClientConfig
config
protected org.slf4j.Logger
logger
protected NettyRequestSender
requestSender
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
channelActive(io.netty.channel.ChannelHandlerContext ctx)
void
channelInactive(io.netty.channel.ChannelHandlerContext ctx)
void
channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)
void
channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
void
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable e)
abstract void
handleChannelInactive(NettyResponseFuture<?> future)
abstract void
handleException(NettyResponseFuture<?> future, Throwable error)
abstract void
handleRead(io.netty.channel.Channel channel, NettyResponseFuture<?> future, Object message)
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Field Detail
-
logger
protected final org.slf4j.Logger logger
-
config
protected final AsyncHttpClientConfig config
-
channelManager
protected final ChannelManager channelManager
-
requestSender
protected final NettyRequestSender requestSender
-
-
Method Detail
-
channelRead
public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
- Specified by:
channelRead
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelRead
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
- Specified by:
channelInactive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelInactive
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable e)
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelHandler
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
exceptionCaught
in classio.netty.channel.ChannelInboundHandlerAdapter
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
- Specified by:
channelActive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelActive
in classio.netty.channel.ChannelInboundHandlerAdapter
-
channelReadComplete
public void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
- Specified by:
channelReadComplete
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelReadComplete
in classio.netty.channel.ChannelInboundHandlerAdapter
-
handleRead
public abstract void handleRead(io.netty.channel.Channel channel, NettyResponseFuture<?> future, Object message) throws Exception
- Throws:
Exception
-
handleException
public abstract void handleException(NettyResponseFuture<?> future, Throwable error)
-
handleChannelInactive
public abstract void handleChannelInactive(NettyResponseFuture<?> future)
-
-