public class ObjectEchoClientHandler extends SimpleChannelUpstreamHandler
ChannelHandler.Sharable| 构造器和说明 |
|---|
ObjectEchoClientHandler(int firstMessageSize)
Creates a client-side handler.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
channelConnected(ChannelHandlerContext ctx,
ChannelStateEvent e)
Invoked when a
Channel is open, bound to a local address, and
connected to a remote address. |
void |
exceptionCaught(ChannelHandlerContext ctx,
ExceptionEvent e)
Invoked when an exception was raised by an I/O thread or a
ChannelHandler. |
long |
getTransferredMessages() |
void |
handleUpstream(ChannelHandlerContext ctx,
ChannelEvent e)
Handles the specified upstream event.
|
void |
messageReceived(ChannelHandlerContext ctx,
MessageEvent e)
Invoked when a message object (e.g:
ChannelBuffer) was received
from a remote peer. |
channelBound, channelClosed, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, writeCompletepublic ObjectEchoClientHandler(int firstMessageSize)
public long getTransferredMessages()
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws java.lang.Exception
SimpleChannelUpstreamHandlerhandleUpstream 在接口中 ChannelUpstreamHandlerhandleUpstream 在类中 SimpleChannelUpstreamHandlerctx - the context object for this handlere - the upstream event to process or interceptjava.lang.Exceptionpublic void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e)
SimpleChannelUpstreamHandlerChannel is open, bound to a local address, and
connected to a remote address.
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
SimpleChannelUpstreamHandlerChannelBuffer) was received
from a remote peer.public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
SimpleChannelUpstreamHandlerChannelHandler.