public class IdleStateHandlerTomP2P
extends io.netty.channel.ChannelDuplexHandler
| Constructor and Description |
|---|
IdleStateHandlerTomP2P(int allIdleTimeSeconds)
Creates a new instance firing
IdleStateEvents. |
IdleStateHandlerTomP2P(long allIdleTime,
TimeUnit unit)
Creates a new instance firing
IdleStateEvents. |
| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
channelRegistered(io.netty.channel.ChannelHandlerContext ctx) |
long |
getAllIdleTimeInMillis()
Return the allIdleTime that was given when instance this class in milliseconds.
|
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
void |
handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise) |
bind, close, connect, deregister, disconnect, flush, readchannelReadComplete, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredpublic IdleStateHandlerTomP2P(int allIdleTimeSeconds)
IdleStateEvents.allIdleTimeSeconds - an IdleStateEvent whose state is IdleState#ALL_IDLE will be triggered when neither
read nor write was performed for the specified period of time. Specify 0 to disable.public IdleStateHandlerTomP2P(long allIdleTime,
TimeUnit unit)
IdleStateEvents.allIdleTime - an IdleStateEvent whose state is IdleState#ALL_IDLE will be triggered when neither
read nor write was performed for the specified period of time. Specify 0 to disable.unit - the TimeUnit of readerIdleTime, writeIdleTime, and allIdleTimepublic long getAllIdleTimeInMillis()
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
handlerAdded in interface io.netty.channel.ChannelHandlerhandlerAdded in class io.netty.channel.ChannelHandlerAdapterExceptionpublic void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
handlerRemoved in interface io.netty.channel.ChannelHandlerhandlerRemoved in class io.netty.channel.ChannelHandlerAdapterExceptionpublic void channelRegistered(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelRegistered in interface io.netty.channel.ChannelInboundHandlerchannelRegistered in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterExceptionCopyright © 2014. All rights reserved.