Class IdleConnectionHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.channel.ChannelDuplexHandler
-
- org.apache.tinkerpop.gremlin.driver.handler.IdleConnectionHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,io.netty.channel.ChannelOutboundHandler
@Sharable public class IdleConnectionHandler extends io.netty.channel.ChannelDuplexHandlerDetectsIdleStateEvents and closes the channel with the goal of releasing resources that haven't been used in a while.
-
-
Field Summary
Fields Modifier and Type Field Description static io.netty.util.AttributeKey<io.netty.handler.timeout.IdleStateEvent>IDLE_STATE_EVENT
-
Constructor Summary
Constructors Constructor Description IdleConnectionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiduserEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt)Detects if anIdleStateEventhas occurred and closes the channel.-
Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read, write
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Method Detail
-
userEventTriggered
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt)Detects if anIdleStateEventhas occurred and closes the channel.- Specified by:
userEventTriggeredin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
userEventTriggeredin classio.netty.channel.ChannelInboundHandlerAdapter
-
-