public class LocalTimeClientHandler extends SimpleChannelUpstreamHandler
ChannelHandler.Sharable
构造器和说明 |
---|
LocalTimeClientHandler() |
限定符和类型 | 方法和说明 |
---|---|
void |
channelOpen(ChannelHandlerContext ctx,
ChannelStateEvent e)
Invoked when a
Channel is open, but not bound nor connected. |
void |
exceptionCaught(ChannelHandlerContext ctx,
ExceptionEvent e)
Invoked when an exception was raised by an I/O thread or a
ChannelHandler . |
java.util.List<java.lang.String> |
getLocalTimes(java.util.Collection<java.lang.String> cities) |
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, channelConnected, channelDisconnected, channelInterestChanged, channelUnbound, childChannelClosed, childChannelOpen, writeComplete
public java.util.List<java.lang.String> getLocalTimes(java.util.Collection<java.lang.String> cities)
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws java.lang.Exception
SimpleChannelUpstreamHandler
handleUpstream
在接口中 ChannelUpstreamHandler
handleUpstream
在类中 SimpleChannelUpstreamHandler
ctx
- the context object for this handlere
- the upstream event to process or interceptjava.lang.Exception
public void channelOpen(ChannelHandlerContext ctx, ChannelStateEvent e) throws java.lang.Exception
SimpleChannelUpstreamHandler
Channel
is open, but not bound nor connected.
channelOpen
在类中 SimpleChannelUpstreamHandler
java.lang.Exception
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
SimpleChannelUpstreamHandler
ChannelBuffer
) was received
from a remote peer.public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
SimpleChannelUpstreamHandler
ChannelHandler
.