public class UptimeClientHandler extends SimpleChannelUpstreamHandler
ChannelHandler.Sharable| Modifier and Type | Field and Description |
|---|---|
(package private) ClientBootstrap |
bootstrap |
private long |
startTime |
private Timer |
timer |
| Constructor and Description |
|---|
UptimeClientHandler(ClientBootstrap bootstrap,
Timer timer) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelClosed(ChannelHandlerContext ctx,
ChannelStateEvent e)
Invoked when a
Channel was closed and all its related resources
were released. |
void |
channelConnected(ChannelHandlerContext ctx,
ChannelStateEvent e)
Invoked when a
Channel is open, bound to a local address, and
connected to a remote address. |
void |
channelDisconnected(ChannelHandlerContext ctx,
ChannelStateEvent e)
Invoked when a
Channel was disconnected from its remote peer. |
void |
exceptionCaught(ChannelHandlerContext ctx,
ExceptionEvent e)
Invoked when an exception was raised by an I/O thread or a
ChannelHandler. |
(package private) java.net.InetSocketAddress |
getRemoteAddress() |
private void |
println(java.lang.String msg) |
channelBound, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, messageReceived, writeCompletefinal ClientBootstrap bootstrap
private final Timer timer
private long startTime
public UptimeClientHandler(ClientBootstrap bootstrap, Timer timer)
java.net.InetSocketAddress getRemoteAddress()
public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e)
SimpleChannelUpstreamHandlerChannel was disconnected from its remote peer.channelDisconnected in class SimpleChannelUpstreamHandlerpublic void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e)
SimpleChannelUpstreamHandlerChannel was closed and all its related resources
were released.channelClosed in class SimpleChannelUpstreamHandlerpublic void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e)
SimpleChannelUpstreamHandlerChannel is open, bound to a local address, and
connected to a remote address.
channelConnected in class SimpleChannelUpstreamHandlerpublic void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
SimpleChannelUpstreamHandlerChannelHandler.exceptionCaught in class SimpleChannelUpstreamHandlerprivate void println(java.lang.String msg)