public class ClientChannelHandler extends io.netty.channel.SimpleChannelInboundHandler<Object>
Constructor and Description |
---|
ClientChannelHandler(NettyProducer producer) |
Modifier and Type | Method and Description |
---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
protected org.apache.camel.Message |
getResponseMessage(org.apache.camel.Exchange exchange,
io.netty.channel.ChannelHandlerContext ctx,
Object message)
Gets the Camel
Message to use as the message to be set on the current Exchange when
we have received a reply message. |
acceptInboundMessage, channelRead
channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public ClientChannelHandler(NettyProducer producer)
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelActive
in interface io.netty.channel.ChannelInboundHandler
channelActive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelInactive
in interface io.netty.channel.ChannelInboundHandler
channelInactive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
public void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelReadComplete
in interface io.netty.channel.ChannelInboundHandler
channelReadComplete
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
protected org.apache.camel.Message getResponseMessage(org.apache.camel.Exchange exchange, io.netty.channel.ChannelHandlerContext ctx, Object message) throws Exception
Message
to use as the message to be set on the current Exchange
when
we have received a reply message.
exchange
- the current exchangectx
- the channel handler contextmessage
- the incoming event which has the response message from Netty.Message
to set on the current Exchange
as the response message.Exception
- is thrown if error getting the response messageApache Camel