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)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GremlinServer(ServerGremlinExecutor<EventLoopGroup> serverGremlinExecutor)` Deprecated. As of release 3.1.1-incubating, not replaced.
    `GremlinServer(Settings settings)` Construct a Gremlin Server instance from `Settings`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getHeader()`
    `ServerGremlinExecutor<EventLoopGroup>` | `getServerGremlinExecutor()`
    `static void` | `main(String[] args)`
    `CompletableFuture<ServerGremlinExecutor<EventLoopGroup>>` | `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`

- - ### Constructor Detail

    - #### GremlinServer

          public GremlinServer(Settings settings)

      Construct a Gremlin Server instance from `Settings`.

    - #### GremlinServer

          @Deprecated
          public GremlinServer(ServerGremlinExecutor<EventLoopGroup> serverGremlinExecutor)

      Deprecated. As of release 3.1.1-incubating, not replaced.
      Construct a Gremlin Server instance from the `ServerGremlinExecutor` which internally carries some pre-constructed objects used by the server as well as the `Settings` object itself. 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.
      See Also:
        TINKERPOP-912

  - ### Method Detail

    - #### start

          public CompletableFuture<ServerGremlinExecutor<EventLoopGroup>> 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<EventLoopGroup> 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–2019 Apache Software Foundation. All rights reserved.