@ChannelHandler.Sharable public class UnifiedHandler extends io.netty.channel.SimpleChannelInboundHandler<RequestMessage>
UnifiedChannelizer.| Modifier and Type | Field and Description | 
|---|---|
| protected Channelizer | channelizer | 
| protected GraphManager | graphManager | 
| protected GremlinExecutor | gremlinExecutor | 
| protected static Set<String> | INVALID_BINDINGS_KEYSThis may or may not be the full set of invalid binding keys. | 
| protected ScheduledExecutorService | scheduledExecutorService | 
| protected ExecutorService | sessionExecutor | 
| protected ConcurrentMap<String,Session> | sessions | 
| protected Settings | settings | 
| Constructor and Description | 
|---|
| UnifiedHandler(Settings settings,
              GraphManager graphManager,
              GremlinExecutor gremlinExecutor,
              ScheduledExecutorService scheduledExecutorService,
              Channelizer channelizer) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | channelRead0(io.netty.channel.ChannelHandlerContext ctx,
            RequestMessage msg) | 
| protected Session | createMultiTaskSession(SessionTask sessionTask,
                      String sessionId)Called when creating a  Sessionthat will be long-lived to extend over multiple requests and therefore
 process the providedSessionTaskas well as ones that may arrive in the future. | 
| protected Session | createSingleTaskSession(SessionTask sessionTask,
                       String sessionId)Called when creating a single task session where the provided  SessionTaskwill be the only one to be
 executed and can therefore take a more efficient execution path. | 
| int | getActiveSessionCount() | 
| boolean | isActiveSession(String sessionId) | 
| void | userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
                  Object evt) | 
| protected void | validateRequest(RequestMessage message,
               GraphManager graphManager) | 
acceptInboundMessage, channelReadchannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtensureNotSharable, handlerAdded, handlerRemoved, isSharableprotected final Settings settings
protected final GraphManager graphManager
protected final GremlinExecutor gremlinExecutor
protected final ScheduledExecutorService scheduledExecutorService
protected final ExecutorService sessionExecutor
protected final Channelizer channelizer
protected final ConcurrentMap<String,Session> sessions
protected static final Set<String> INVALID_BINDINGS_KEYS
toUpperCase() on the accessor values of T solves an issue where the ScriptEngine
 ignores private scope on T and imports static fields.public UnifiedHandler(Settings settings, GraphManager graphManager, GremlinExecutor gremlinExecutor, ScheduledExecutorService scheduledExecutorService, Channelizer channelizer)
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
                            RequestMessage msg)
                     throws Exception
channelRead0 in class io.netty.channel.SimpleChannelInboundHandler<RequestMessage>Exceptionprotected void validateRequest(RequestMessage message, GraphManager graphManager) throws SessionException
SessionExceptionpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
                               Object evt)
                        throws Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterExceptionprotected Session createSingleTaskSession(SessionTask sessionTask, String sessionId)
SessionTask will be the only one to be
 executed and can therefore take a more efficient execution path.protected Session createMultiTaskSession(SessionTask sessionTask, String sessionId)
Session that will be long-lived to extend over multiple requests and therefore
 process the provided SessionTask as well as ones that may arrive in the future.public boolean isActiveSession(String sessionId)
public int getActiveSessionCount()
Copyright © 2013–2023 Apache Software Foundation. All rights reserved.