org.apache.tinkerpop.gremlin.server.op.standard

## Class StandardOpProcessor

- java.lang.Object
- - org.apache.tinkerpop.gremlin.server.op.AbstractOpProcessor
  - - org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor
    - - org.apache.tinkerpop.gremlin.server.op.standard.StandardOpProcessor

- All Implemented Interfaces:
    AutoCloseable, OpProcessor

      public class StandardOpProcessor
      extends AbstractEvalOpProcessor

  Simple `OpProcessor` implementation that handles `ScriptEngine` script evaluation outside the context of a session.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor

      `AbstractEvalOpProcessor.BindingSupplier`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Function<Context,AbstractEvalOpProcessor.BindingSupplier>` | `bindingMaker`
    `static String` | `OP_PROCESSOR_NAME`

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor

      `CONFIG_MAX_PARAMETERS, DEFAULT_MAX_PARAMETERS, evalOpTimer, INVALID_BINDINGS_KEYS, maxParameters`

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.server.op.AbstractOpProcessor

      `manageTransactions`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StandardOpProcessor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.
    `void` | `init(Settings settings)` Initialize the `OpProcessor` with settings from the server.
    `Optional<ThrowingConsumer<Context>>` | `selectOther(RequestMessage requestMessage)` A sub-class may have additional "ops" that it will service.

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor

      `evalOpInternal, evalOpInternal, select, validateEvalMessage`

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.server.op.AbstractOpProcessor

      `attemptCommit, attemptRollback, generateMetaData, generateResultMetaData, generateStatusAttributes, handleIterator, handleIterator, isForceFlushed, iterateComplete, makeFrame, makeFrame, makeFrame`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### OP_PROCESSOR_NAME

          public static final String OP_PROCESSOR_NAME

      See Also:
        Constant Field Values

    - #### bindingMaker

          protected final Function<Context,AbstractEvalOpProcessor.BindingSupplier> bindingMaker

  - ### Constructor Detail

    - #### StandardOpProcessor

          public StandardOpProcessor()

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from interface: `OpProcessor`
      The name of the processor which requests must refer to "processor" field on a request.

    - #### init

          public void init(Settings settings)

      Description copied from interface: `OpProcessor`
      Initialize the `OpProcessor` with settings from the server. This method should only be called once at server startup by a single thread.

    - #### getEvalOp

          public ThrowingConsumer<Context> getEvalOp()

      Description copied from class: `AbstractEvalOpProcessor`
      Provides an operation for evaluating a Gremlin script.
      Specified by:
        `getEvalOp` in class `AbstractEvalOpProcessor`
      Returns:

    - #### selectOther

          public Optional<ThrowingConsumer<Context>> selectOther(RequestMessage requestMessage)
                                                          throws OpProcessorException

      Description copied from class: `AbstractEvalOpProcessor`
      A sub-class may have additional "ops" that it will service. Calls to `OpProcessor.select(Context)` that are not handled will be passed to this method to see if the sub-class can service the requested op code.
      Specified by:
        `selectOther` in class `AbstractEvalOpProcessor`
      Returns:
      Throws:
        `OpProcessorException`

    - #### close

          public void close()
                     throws Exception

      Throws:
        `Exception`

    - #### getBindingMaker

          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. This function is used in `evalOp(Context)` to create the final argument to `AbstractEvalOpProcessor.evalOpInternal(Context, Supplier, 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–2019 Apache Software Foundation. All rights reserved.