org.apache.tinkerpop.gremlin.process.remote

## Interface RemoteConnection

- All Superinterfaces:
    AutoCloseable
  All Known Implementing Classes:
    DriverRemoteConnection, EmbeddedRemoteConnection

      public interface RemoteConnection
      extends AutoCloseable

  A simple abstraction of a "connection" to a "server" that is capable of processing a `Traversal` and returning results. Results refer to both the `Iterator` of results from the submitted `Traversal` as well as the side-effects produced by that `Traversal`. Those results together are wrapped in a `Traversal`.
  Author:
    Stephen Mallette (http://stephen.genoprime.com), Marko A. Rodriguez (http://markorodriguez.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `GREMLIN_REMOTE`
    `static String` | `GREMLIN_REMOTE_CONNECTION_CLASS`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static RemoteConnection` | `from(Configuration conf)` Create a `RemoteConnection` from a `Configuration` object.
    `<E> CompletableFuture<RemoteTraversal<?,E>>` | `submitAsync(Bytecode bytecode)` Submits `Traversal` `Bytecode` to a server and returns a promise of a `RemoteTraversal`.

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

      `close`

- - ### Field Detail

    - #### GREMLIN_REMOTE

          static final String GREMLIN_REMOTE

      See Also:
        Constant Field Values

    - #### GREMLIN_REMOTE_CONNECTION_CLASS

          static final String GREMLIN_REMOTE_CONNECTION_CLASS

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### submitAsync

          <E> CompletableFuture<RemoteTraversal<?,E>> submitAsync(Bytecode bytecode)
                                                           throws RemoteConnectionException

      Submits `Traversal` `Bytecode` to a server and returns a promise of a `RemoteTraversal`. The `RemoteTraversal` is an abstraction over two types of results that can be returned as part of the response from the server: the results of the `Traversal` itself and the side-effects that it produced.
      Throws:
        `RemoteConnectionException`

    - #### from

          static RemoteConnection from(Configuration conf)

      Create a `RemoteConnection` from a `Configuration` object. The configuration must contain a `gremlin.remote.remoteConnectionClass` key which is the fully qualified class name of a `RemoteConnection` class.

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