org.apache.tinkerpop.gremlin.driver.message

## Class RequestMessage

- java.lang.Object
- - org.apache.tinkerpop.gremlin.driver.message.RequestMessage

-     public final class RequestMessage
      extends Object

  The model for a request message sent to the server.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RequestMessage.Builder` Builder class for `RequestMessage`.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static RequestMessage` | `INVALID` An "invalid" message.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static RequestMessage.Builder` | `build(String op)`
    `static RequestMessage.Builder` | `from(RequestMessage msg)`
    `Map<String,Object>` | `getArgs()` A `Map` of arguments that are supplied to the `op`.
    `String` | `getOp()` The operation or command to perform as defined by a particular Processor.
    `String` | `getProcessor()` The name of the Processor that should handle the `op`.
    `UUID` | `getRequestId()` The id of the current request and is used to track the message within Gremlin Server and in its response.
    `<T> Optional<T>` | `optionalArgs(String key)`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### INVALID

          public static final RequestMessage INVALID

      An "invalid" message. Used internally only.

  - ### Method Detail

    - #### getRequestId

          public UUID getRequestId()

      The id of the current request and is used to track the message within Gremlin Server and in its response. This value should be unique per request made.

    - #### getOp

          public String getOp()

      The operation or command to perform as defined by a particular Processor.

    - #### getProcessor

          public String getProcessor()

      The name of the Processor that should handle the `op`. Defaults to the standard processor if not specified.

    - #### getArgs

          public Map<String,Object> getArgs()

      A `Map` of arguments that are supplied to the `op`. Each `op` accepts different argument, so consult the documentation for a particular one to understand what is expected.

    - #### optionalArgs

          public <T> Optional<T> optionalArgs(String key)

    - #### from

          public static RequestMessage.Builder from(RequestMessage msg)

    - #### build

          public static RequestMessage.Builder build(String op)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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