org.apache.tinkerpop.gremlin.server

## Class GremlinServer

- java.lang.Object
- - org.apache.tinkerpop.gremlin.server.GremlinServer

-     public class GremlinServer
      extends Object

  Start and stop Gremlin Server.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `AUDIT_LOGGER_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GremlinServer(Settings settings)` Construct a Gremlin Server instance from `Settings`.
    `GremlinServer(Settings settings, ExecutorService gremlinExecutorService)` Construct a Gremlin Server instance from `Settings` and `ExecutorService`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getHeader()`
    `ServerGremlinExecutor` | `getServerGremlinExecutor()`
    `static void` | `main(String[] args)`
    `CompletableFuture<ServerGremlinExecutor>` | `start()` Start Gremlin Server with `Settings` provided to the constructor.
    `CompletableFuture<Void>` | `stop()` Stop Gremlin Server and free the port binding.
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### AUDIT_LOGGER_NAME

          public static final String AUDIT_LOGGER_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### GremlinServer

          public GremlinServer(Settings settings)

      Construct a Gremlin Server instance from `Settings`.

    - #### GremlinServer

          public GremlinServer(Settings settings,
                               ExecutorService gremlinExecutorService)

      Construct a Gremlin Server instance from `Settings` and `ExecutorService`. This constructor is useful when Gremlin Server is being used in an embedded style and there is a need to share thread pools with the hosting application.

  - ### Method Detail

    - #### start

          public CompletableFuture<ServerGremlinExecutor> start()
                                                         throws Exception

      Start Gremlin Server with `Settings` provided to the constructor.
      Throws:
        `Exception`

    - #### stop

          public CompletableFuture<Void> stop()

      Stop Gremlin Server and free the port binding. Note that multiple calls to this method will return the same instance of the `CompletableFuture`.

    - #### getServerGremlinExecutor

          public ServerGremlinExecutor getServerGremlinExecutor()

    - #### main

          public static void main(String[] args)
                           throws Exception

      Throws:
        `Exception`

    - #### getHeader

          public static String getHeader()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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