public class StandardOpProcessor extends AbstractEvalOpProcessor
OpProcessor
implementation that handles ScriptEngine
script evaluation outside the context
of a session.AbstractEvalOpProcessor.BindingSupplier
Modifier and Type | Field and Description |
---|---|
protected Function<Context,AbstractEvalOpProcessor.BindingSupplier> |
bindingMaker |
static String |
OP_PROCESSOR_NAME |
evalOpTimer, INVALID_BINDINGS_KEYS, validBindingName
manageTransactions
Constructor and Description |
---|
StandardOpProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected Function<Context,AbstractEvalOpProcessor.BindingSupplier> |
getBindingMaker()
A useful method for those extending this class, where the means for binding construction can be supplied
to this class.
|
ThrowingConsumer<Context> |
getEvalOp()
Provides an operation for evaluating a Gremlin script.
|
String |
getName()
The name of the processor which requests must refer to "processor" field on a request.
|
Optional<ThrowingConsumer<Context>> |
selectOther(RequestMessage requestMessage)
A sub-class may have additional "ops" that it will service.
|
evalOpInternal, select, validateEvalMessage
attemptCommit, attemptRollback, handleIterator, makeFrame
public static final String OP_PROCESSOR_NAME
protected final Function<Context,AbstractEvalOpProcessor.BindingSupplier> bindingMaker
public String getName()
OpProcessor
public ThrowingConsumer<Context> getEvalOp()
AbstractEvalOpProcessor
getEvalOp
in class AbstractEvalOpProcessor
public Optional<ThrowingConsumer<Context>> selectOther(RequestMessage requestMessage) throws OpProcessorException
AbstractEvalOpProcessor
AbstractEvalOpProcessor.select(Context)
that are not
handled will be passed to this method to see if the sub-class can service the requested op code.selectOther
in class AbstractEvalOpProcessor
OpProcessorException
protected Function<Context,AbstractEvalOpProcessor.BindingSupplier> getBindingMaker()
evalOp(Context)
to create the final argument to
AbstractEvalOpProcessor.evalOpInternal(Context, Supplier, org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor.BindingSupplier)
.
In this way an extending class can use the default AbstractEvalOpProcessor.BindingSupplier
which carries a lot of re-usable functionality or provide a new one to override the existing approach.Copyright © 2013–2016 Apache Software Foundation. All rights reserved.