org.apache.tinkerpop.gremlin.driver.simple

## Class AbstractClient

- java.lang.Object
- - org.apache.tinkerpop.gremlin.driver.simple.AbstractClient

- All Implemented Interfaces:
    Closeable, AutoCloseable, SimpleClient
  Direct Known Subclasses:
    NioClient, WebSocketClient

      public abstract class AbstractClient
      extends Object
      implements SimpleClient

  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.apache.tinkerpop.gremlin.driver.simple.AbstractClient.CallbackResponseHandler` | `callbackResponseHandler`
    `protected EventLoopGroup` | `group`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractClient(String threadPattern)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<ResponseMessage>` | `submit(RequestMessage requestMessage)`
    `void` | `submit(RequestMessage requestMessage, Consumer<ResponseMessage> callback)`
    `CompletableFuture<List<ResponseMessage>>` | `submitAsync(RequestMessage requestMessage)`
    `abstract void` | `writeAndFlush(RequestMessage requestMessage)`

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

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

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.driver.simple.SimpleClient

      `submit, submit, submitAsync`

    - ### Methods inherited from interface java.io.Closeable

      `close`

- - ### Field Detail

    - #### callbackResponseHandler

          protected final org.apache.tinkerpop.gremlin.driver.simple.AbstractClient.CallbackResponseHandler callbackResponseHandler

    - #### group

          protected final EventLoopGroup group

  - ### Constructor Detail

    - #### AbstractClient

          public AbstractClient(String threadPattern)

  - ### Method Detail

    - #### writeAndFlush

          public abstract void writeAndFlush(RequestMessage requestMessage)
                                      throws Exception

      Throws:
        `Exception`

    - #### submit

          public void submit(RequestMessage requestMessage,
                             Consumer<ResponseMessage> callback)
                      throws Exception

      Specified by:
        `submit` in interface `SimpleClient`
      Throws:
        `Exception`

    - #### submit

          public List<ResponseMessage> submit(RequestMessage requestMessage)
                                       throws Exception

      Specified by:
        `submit` in interface `SimpleClient`
      Throws:
        `Exception`

    - #### submitAsync

          public CompletableFuture<List<ResponseMessage>> submitAsync(RequestMessage requestMessage)
                                                               throws Exception

      Specified by:
        `submitAsync` in interface `SimpleClient`
      Throws:
        `Exception`

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