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)

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `<E> RemoteTraversal<?,E>` | `submit(Bytecode bytecode)` Deprecated. As of release 3.2.4, replaced by `submitAsync(Bytecode)`.
    `<E> Iterator<Traverser.Admin<E>>` | `submit(Traversal<?,E> traversal)` Deprecated. As of release 3.2.2, replaced by `submitAsync(Bytecode)`.
    `default <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`

- - ### Method Detail

    - #### submit

          @Deprecated
          <E> Iterator<Traverser.Admin<E>> submit(Traversal<?,E> traversal)
                                                       throws RemoteConnectionException

      Deprecated. As of release 3.2.2, replaced by `submitAsync(Bytecode)`.
      Throws:
        `RemoteConnectionException`

    - #### submit

          @Deprecated
          <E> RemoteTraversal<?,E> submit(Bytecode bytecode)
                                               throws RemoteConnectionException

      Deprecated. As of release 3.2.4, replaced by `submitAsync(Bytecode)`.
      Submits `Traversal` `Bytecode` to a server and returns 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`

    - #### submitAsync

          default <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.

      The default implementation calls the `submit(Bytecode)` method for backward compatibility, but generally speaking this method should be implemented directly as `submit(Bytecode)` is not called directly by any part of TinkerPop. Even if the `RemoteConnection` itself is not capable of asynchronous behaviour, it should simply implement this method in a blocking form.
      Throws:
        `RemoteConnectionException`

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