org.apache.tinkerpop.gremlin.server

## Interface OpProcessor

- All Superinterfaces:
    AutoCloseable
  All Known Implementing Classes:
    AbstractEvalOpProcessor, AbstractOpProcessor, SessionOpProcessor, StandardOpProcessor, TraversalOpProcessor

      public interface OpProcessor
      extends AutoCloseable

  Interface for providing commands that websocket requests will respond to.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getName()` The name of the processor which requests must refer to "processor" field on a request.
    `default void` | `init(Settings settings)` Initialize the `OpProcessor` with settings from the server.
    `ThrowingConsumer<Context>` | `select(Context ctx)` Given the context (which contains the RequestMessage), return back a Consumer function that will be executed with the context.

    - ### Methods inherited from interface java.lang.AutoCloseable

      `close`

- - ### Method Detail

    - #### getName

          String getName()

      The name of the processor which requests must refer to "processor" field on a request.

    - #### init

          default void init(Settings settings)

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

    - #### select

          ThrowingConsumer<Context> select(Context ctx)
                                    throws OpProcessorException

      Given the context (which contains the RequestMessage), return back a Consumer function that will be executed with the context. A typical implementation will simply check the "op" field on the RequestMessage and return the Consumer function for that particular operation.
      Parameters:
        `ctx` -
      Returns:
      Throws:
        `OpProcessorException`

Copyright © 2013–2020 Apache Software Foundation. All rights reserved.