public static class TcpWorker.TcpChannelHandler
extends org.jboss.netty.channel.SimpleChannelHandler
Modifier and Type | Field and Description |
---|---|
boolean |
hasCaughtException
The has caught exception.
|
private int |
msgRecvCount
The msg recv count.
|
private TcpWorker |
tcpWorker
The tcp worker.
|
Constructor and Description |
---|
TcpChannelHandler(TcpWorker tcpWorker)
Instantiates a new tcp channel handler.
|
Modifier and Type | Method and Description |
---|---|
void |
channelDisconnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e)
Why not use channelClosed: if fail to establish a channel
(e.g.
|
void |
exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e) |
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e) |
bindRequested, channelBound, channelClosed, channelConnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, handleDownstream, handleUpstream, setInterestOpsRequested, unbindRequested, writeComplete, writeRequested
public boolean hasCaughtException
private final TcpWorker tcpWorker
private int msgRecvCount
public TcpChannelHandler(TcpWorker tcpWorker)
tcpWorker
- the tcp workerpublic void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
messageReceived
in class org.jboss.netty.channel.SimpleChannelHandler
public void channelDisconnected(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e) throws java.lang.Exception
channelDisconnected
in class org.jboss.netty.channel.SimpleChannelHandler
ctx
- the ctxe
- the ejava.lang.Exception
- the exceptionpublic void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e)
exceptionCaught
in class org.jboss.netty.channel.SimpleChannelHandler