public class Context extends Object
Constructor and Description |
---|
Context(RequestMessage requestMessage,
ChannelHandlerContext ctx,
Settings settings,
GraphManager graphManager,
GremlinExecutor gremlinExecutor,
ScheduledExecutorService scheduledExecutorService) |
Modifier and Type | Method and Description |
---|---|
ChannelHandlerContext |
getChannelHandlerContext()
Gets the Netty context.
|
GraphManager |
getGraphManager()
Gets the set of
Graph objects configured in Gremlin Server. |
GremlinExecutor |
getGremlinExecutor()
Gets the executor chosen to evaluate incoming Gremlin scripts based on the request.
|
RequestMessage |
getRequestMessage()
Gets the current request to Gremlin Server.
|
ScheduledExecutorService |
getScheduledExecutorService() |
Settings |
getSettings()
Gets the current configuration of Gremlin Server.
|
void |
writeAndFlush(ResponseMessage message)
Writes a response message to the underlying channel while ensuring that at most one
final response is written. |
void |
writeAndFlush(ResponseStatusCode code,
Object responseMessage)
Writes a response message to the underlying channel while ensuring that at most one
final response is written. |
public Context(RequestMessage requestMessage, ChannelHandlerContext ctx, Settings settings, GraphManager graphManager, GremlinExecutor gremlinExecutor, ScheduledExecutorService scheduledExecutorService)
public ScheduledExecutorService getScheduledExecutorService()
public RequestMessage getRequestMessage()
public ChannelHandlerContext getChannelHandlerContext()
public Settings getSettings()
public GraphManager getGraphManager()
Graph
objects configured in Gremlin Server.public GremlinExecutor getGremlinExecutor()
public void writeAndFlush(ResponseMessage message)
final
response is written.
Note: this method should be used instead of writing to the channel directly when multiple threads are expected to produce response messages concurrently.
Attempts to write more than one final response message will be ignored.
public void writeAndFlush(ResponseStatusCode code, Object responseMessage)
final
response is written.
The caller must make sure that the provided response status code matches the content of the message.
Note: this method should be used instead of writing to the channel directly when multiple threads are expected to produce response messages concurrently.
Attempts to write more than one final response message will be ignored.
writeAndFlush(ResponseMessage)
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.