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.ChannelDuplexHandler
DetectsIdleStateEvent
s 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 void
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt)
Detects if anIdleStateEvent
has 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 anIdleStateEvent
has occurred and closes the channel.- Specified by:
userEventTriggered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
userEventTriggered
in classio.netty.channel.ChannelInboundHandlerAdapter
-
-