Class WsUserAgentHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- org.apache.tinkerpop.gremlin.server.handler.WsUserAgentHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
public class WsUserAgentHandler extends io.netty.channel.ChannelInboundHandlerAdapter
Channel handler which extracts a user agent header from a web socket handshake if present then logs the user agent and stores it as a channel attribute for future reference.
-
-
Field Summary
Fields Modifier and Type Field Description static io.netty.util.AttributeKey<String>
USER_AGENT_ATTR_KEY
-
Constructor Summary
Constructors Constructor Description WsUserAgentHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt)
-
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
-
-
-
-
Field Detail
-
USER_AGENT_ATTR_KEY
public static final io.netty.util.AttributeKey<String> USER_AGENT_ATTR_KEY
-
-
Method Detail
-
userEventTriggered
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt)
- Specified by:
userEventTriggered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
userEventTriggered
in classio.netty.channel.ChannelInboundHandlerAdapter
-
-