public class WorldClockClientHandler extends SimpleChannelInboundHandler<WorldClockProtocol.LocalTimes>
ChannelHandler.Sharable
Constructor and Description |
---|
WorldClockClientHandler() |
Modifier and Type | Method and Description |
---|---|
void |
channelRead0(ChannelHandlerContext ctx,
WorldClockProtocol.LocalTimes times)
Is called for each message of type
I . |
void |
channelRegistered(ChannelHandlerContext ctx)
Calls
ChannelHandlerContext.fireChannelRegistered() to forward
to the next ChannelInboundHandler in the ChannelPipeline . |
void |
exceptionCaught(ChannelHandlerContext ctx,
Throwable cause)
Calls
ChannelHandlerContext.fireExceptionCaught(Throwable) to forward
to the next ChannelHandler in the ChannelPipeline . |
List<String> |
getLocalTimes(Collection<String> cities) |
acceptInboundMessage, channelRead
channelActive, channelInactive, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handlerAdded, handlerRemoved
public List<String> getLocalTimes(Collection<String> cities)
public void channelRegistered(ChannelHandlerContext ctx)
ChannelInboundHandlerAdapter
ChannelHandlerContext.fireChannelRegistered()
to forward
to the next ChannelInboundHandler
in the ChannelPipeline
.
Sub-classes may override this method to change behavior.channelRegistered
in interface ChannelInboundHandler
channelRegistered
in class ChannelInboundHandlerAdapter
public void channelRead0(ChannelHandlerContext ctx, WorldClockProtocol.LocalTimes times) throws Exception
SimpleChannelInboundHandler
I
.channelRead0
in class SimpleChannelInboundHandler<WorldClockProtocol.LocalTimes>
ctx
- the ChannelHandlerContext
which this SimpleChannelInboundHandler
belongs totimes
- the message to handleException
- is thrown if an error occurredpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)
ChannelInboundHandlerAdapter
ChannelHandlerContext.fireExceptionCaught(Throwable)
to forward
to the next ChannelHandler
in the ChannelPipeline
.
Sub-classes may override this method to change behavior.exceptionCaught
in interface ChannelHandler
exceptionCaught
in interface ChannelInboundHandler
exceptionCaught
in class ChannelInboundHandlerAdapter
Copyright © 2008–2021 The Netty Project. All rights reserved.