Class Context
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.server.Context
-
public class Context extends Object
The context of Gremlin Server within which a particular request is made.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Constructor Summary
Constructors Constructor Description Context(RequestMessage requestMessage, io.netty.channel.ChannelHandlerContext ctx, Settings settings, GraphManager graphManager, GremlinExecutor gremlinExecutor, ScheduledExecutorService scheduledExecutorService)
Context(RequestMessage requestMessage, io.netty.channel.ChannelHandlerContext ctx, Settings settings, GraphManager graphManager, GremlinExecutor gremlinExecutor, ScheduledExecutorService scheduledExecutorService, HttpGremlinEndpointHandler.RequestState requestState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.channel.ChannelHandlerContext
getChannelHandlerContext()
Gets the Netty context.GraphManager
getGraphManager()
Gets the set ofGraph
objects configured in Gremlin Server.GremlinExecutor
getGremlinExecutor()
Gets the executor chosen to evaluate incoming Gremlin scripts based on the request.String
getMaterializeProperties()
RequestMessage
getRequestMessage()
Gets the current request to Gremlin Server.HttpGremlinEndpointHandler.RequestState
getRequestState()
long
getRequestTimeout()
The timeout for the request.ScheduledExecutorService
getScheduledExecutorService()
Settings
getSettings()
Gets the current configuration of Gremlin Server.boolean
getStartedResponse()
Gets whether the server has started processing the response for this request.ScheduledFuture<?>
getTimeoutExecutor()
void
handleDetachment(List<Object> aggregate)
void
setRequestState(HttpGremlinEndpointHandler.RequestState requestState)
void
setStartedResponse()
Signal that the server has started processing the response.void
setTimeoutExecutor(ScheduledFuture<?> timeoutExecutor)
-
-
-
Constructor Detail
-
Context
public Context(RequestMessage requestMessage, io.netty.channel.ChannelHandlerContext ctx, Settings settings, GraphManager graphManager, GremlinExecutor gremlinExecutor, ScheduledExecutorService scheduledExecutorService)
-
Context
public Context(RequestMessage requestMessage, io.netty.channel.ChannelHandlerContext ctx, Settings settings, GraphManager graphManager, GremlinExecutor gremlinExecutor, ScheduledExecutorService scheduledExecutorService, HttpGremlinEndpointHandler.RequestState requestState)
-
-
Method Detail
-
setTimeoutExecutor
public void setTimeoutExecutor(ScheduledFuture<?> timeoutExecutor)
-
getTimeoutExecutor
public ScheduledFuture<?> getTimeoutExecutor()
-
getRequestTimeout
public long getRequestTimeout()
The timeout for the request. If the request is a script it examines the script for a timeout setting usingwith()
. If that is not found then it examines the request itself to see if the timeout is provided byTokens.TIMEOUT_MS
. If that is not provided then theSettings.evaluationTimeout
is utilized as the default.
-
getMaterializeProperties
public String getMaterializeProperties()
-
getScheduledExecutorService
public ScheduledExecutorService getScheduledExecutorService()
-
getRequestMessage
public RequestMessage getRequestMessage()
Gets the current request to Gremlin Server.
-
getChannelHandlerContext
public io.netty.channel.ChannelHandlerContext getChannelHandlerContext()
Gets the Netty context.
-
getSettings
public Settings getSettings()
Gets the current configuration of Gremlin Server.
-
getGraphManager
public GraphManager getGraphManager()
Gets the set ofGraph
objects configured in Gremlin Server.
-
getGremlinExecutor
public GremlinExecutor getGremlinExecutor()
Gets the executor chosen to evaluate incoming Gremlin scripts based on the request.
-
getStartedResponse
public boolean getStartedResponse()
Gets whether the server has started processing the response for this request.
-
setStartedResponse
public void setStartedResponse()
Signal that the server has started processing the response.
-
getRequestState
public HttpGremlinEndpointHandler.RequestState getRequestState()
-
setRequestState
public void setRequestState(HttpGremlinEndpointHandler.RequestState requestState)
-
-