public class LocalTimeClientHandler extends SimpleChannelUpstreamHandler
ChannelHandler.Sharable
Constructor and Description |
---|
LocalTimeClientHandler() |
Modifier and Type | Method and Description |
---|---|
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 . |
List<String> |
getLocalTimes(Collection<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 List<String> getLocalTimes(Collection<String> cities)
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception
SimpleChannelUpstreamHandler
handleUpstream
in interface ChannelUpstreamHandler
handleUpstream
in class SimpleChannelUpstreamHandler
ctx
- the context object for this handlere
- the upstream event to process or interceptException
public void channelOpen(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception
SimpleChannelUpstreamHandler
Channel
is open, but not bound nor connected.
channelOpen
in class SimpleChannelUpstreamHandler
Exception
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
SimpleChannelUpstreamHandler
ChannelBuffer
) was received
from a remote peer.messageReceived
in class SimpleChannelUpstreamHandler
public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
SimpleChannelUpstreamHandler
ChannelHandler
.exceptionCaught
in class SimpleChannelUpstreamHandler
Copyright © 2008–2015 The Netty Project. All rights reserved.