public class ConnectTTLHandler
extends io.netty.channel.ChannelDuplexHandler
| Modifier and Type | Field and Description | 
|---|---|
| static io.netty.util.AttributeKey<Boolean> | RELEASE_CHANNEL | 
| Constructor and Description | 
|---|
| ConnectTTLHandler(Long connectionTtlMillis)Construct ConnectTTLHandler for given arguments. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | handlerAdded(io.netty.channel.ChannelHandlerContext ctx)Will schedule a task when the handler added. | 
| void | handlerRemoved(io.netty.channel.ChannelHandlerContext ctx)Will cancel the scheduled tasks when handler removed. | 
| static boolean | isChannelExpired(io.netty.channel.Channel channel)Indicates whether the channels connection ttl has expired | 
bind, close, connect, deregister, disconnect, flush, read, writechannelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredpublic static final io.netty.util.AttributeKey<Boolean> RELEASE_CHANNEL
public ConnectTTLHandler(Long connectionTtlMillis)
connectionTtlMillis - The configured connect-ttlpublic void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
                  throws Exception
handlerAdded in interface io.netty.channel.ChannelHandlerhandlerAdded in class io.netty.channel.ChannelHandlerAdapterctx - The context to useExceptionpublic void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx)
handlerRemoved in interface io.netty.channel.ChannelHandlerhandlerRemoved in class io.netty.channel.ChannelHandlerAdapterctx - The context to usepublic static boolean isChannelExpired(io.netty.channel.Channel channel)
channel - The channel to check