org.apache.tinkerpop.gremlin.driver.message

## Enum ResponseStatusCode

- java.lang.Object
- - java.lang.Enum<ResponseStatusCode>
  - - org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode

- All Implemented Interfaces:
    Serializable, Comparable<ResponseStatusCode>

      public enum ResponseStatusCode
      extends Enum<ResponseStatusCode>

  Response status codes for Gremlin Server responses. Result codes tend to map to HTTP status codes. It is not a one-to-one mapping and there are mapper status codes to be considered.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `AUTHENTICATE` A challenge from the server for the client to authenticate its request.
    `FORBIDDEN` The server could authenticate the request, but will not fulfill it.
    `NO_CONTENT` The server processed the request but there is no result to return (e.g.
    `PARTIAL_CONTENT` The server successfully returned some content, but there is more in the stream to arrive - wait for a `SUCCESS` to signify the end of the stream.
    `REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS` The request message was parseable, but the arguments supplied in the message were in conflict or incomplete.
    `REQUEST_ERROR_MALFORMED_REQUEST` The request message was not properly formatted which means it could not be parsed at all or the "op" code was not recognized such that Gremlin Server could properly route it for processing.
    `REQUEST_ERROR_SERIALIZATION` The request message contains objects that were not serializable on the client side.
    `SERVER_ERROR` A general server error occurred that prevented the request from being processed.
    `SERVER_ERROR_EVALUATION` The request submitted for processing evaluated by the server with errors and could not be processed.
    `SERVER_ERROR_SERIALIZATION` The server was not capable of serializing an object that was returned from the script supplied on the request.
    `SERVER_ERROR_TEMPORARY` A server error that indicates that the client should retry the request.
    `SERVER_ERROR_TIMEOUT` The server exceeded one of the timeout settings for the request and could therefore only partially responded or did not respond at all.
    `SUCCESS` The server successfully processed a request to completion - there are no messages remaining in this stream.
    `TOO_MANY_REQUESTS` Indicates that too many requests have been sent in a given amount of time.
    `UNAUTHORIZED` The server could not authenticate the request or the client requested a resource it did not have access to.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ResponseStatusCode` | `getFromValue(int codeValue)`
    `int` | `getValue()`
    `boolean` | `isFinalResponse()` Indicates whether the status code can only be used in the last response for a particular request.
    `boolean` | `isSuccess()`
    `static ResponseStatusCode` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static ResponseStatusCode[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### SUCCESS

          public static final ResponseStatusCode SUCCESS

      The server successfully processed a request to completion - there are no messages remaining in this stream.
      Since:
        3.0.0-incubating

    - #### NO_CONTENT

          public static final ResponseStatusCode NO_CONTENT

      The server processed the request but there is no result to return (e.g. an `Iterator` with no elements).
      Since:
        3.0.0-incubating

    - #### PARTIAL_CONTENT

          public static final ResponseStatusCode PARTIAL_CONTENT

      The server successfully returned some content, but there is more in the stream to arrive - wait for a `SUCCESS` to signify the end of the stream.
      Since:
        3.0.0-incubating

    - #### UNAUTHORIZED

          public static final ResponseStatusCode UNAUTHORIZED

      The server could not authenticate the request or the client requested a resource it did not have access to.
      Since:
        3.0.0-incubating

    - #### FORBIDDEN

          public static final ResponseStatusCode FORBIDDEN

      The server could authenticate the request, but will not fulfill it. This is a general purpose code that would typically be returned if the request is authenticated but not authorized to do what it is doing.
      Since:
        3.0.1-incubating

    - #### AUTHENTICATE

          public static final ResponseStatusCode AUTHENTICATE

      A challenge from the server for the client to authenticate its request.
      Since:
        3.0.1-incubating

    - #### TOO_MANY_REQUESTS

          public static final ResponseStatusCode TOO_MANY_REQUESTS

      Indicates that too many requests have been sent in a given amount of time.
      Since:
        3.5.0

    - #### REQUEST_ERROR_SERIALIZATION

          public static final ResponseStatusCode REQUEST_ERROR_SERIALIZATION

      The request message contains objects that were not serializable on the client side.
      Since:
        3.3.6

    - #### REQUEST_ERROR_MALFORMED_REQUEST

          public static final ResponseStatusCode REQUEST_ERROR_MALFORMED_REQUEST

      The request message was not properly formatted which means it could not be parsed at all or the "op" code was not recognized such that Gremlin Server could properly route it for processing. Check the message format and retry the request.
      Since:
        3.0.0-incubating

    - #### REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS

          public static final ResponseStatusCode REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS

      The request message was parseable, but the arguments supplied in the message were in conflict or incomplete. Check the message format and retry the request.
      Since:
        3.0.0-incubating

    - #### SERVER_ERROR

          public static final ResponseStatusCode SERVER_ERROR

      A general server error occurred that prevented the request from being processed.
      Since:
        3.0.0-incubating

    - #### SERVER_ERROR_TEMPORARY

          public static final ResponseStatusCode SERVER_ERROR_TEMPORARY

      A server error that indicates that the client should retry the request. A graph will typically return this error when a transaction fails due to a locking exception or some other sort of concurrent modification. In other words, the request was likely valid but the state of the server at the particular time the request arrived could not be processed to success, but could be at a later moment.
      Since:
        3.4.11

    - #### SERVER_ERROR_EVALUATION

          public static final ResponseStatusCode SERVER_ERROR_EVALUATION

      The request submitted for processing evaluated by the server with errors and could not be processed. Check the script or remote traversal submitted for errors or other problems and then resubmit.
      Since:
        3.0.0-incubating

    - #### SERVER_ERROR_TIMEOUT

          public static final ResponseStatusCode SERVER_ERROR_TIMEOUT

      The server exceeded one of the timeout settings for the request and could therefore only partially responded or did not respond at all.
      Since:
        3.0.0-incubating

    - #### SERVER_ERROR_SERIALIZATION

          public static final ResponseStatusCode SERVER_ERROR_SERIALIZATION

      The server was not capable of serializing an object that was returned from the script supplied on the request. Either transform the object into something Gremlin Server can process within the script or install mapper serialization classes to Gremlin Server.
      Since:
        3.0.0-incubating

  - ### Method Detail

    - #### values

          public static ResponseStatusCode[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (ResponseStatusCode c : ResponseStatusCode.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static ResponseStatusCode valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### getFromValue

          public static ResponseStatusCode getFromValue(int codeValue)

    - #### getValue

          public int getValue()

    - #### isSuccess

          public boolean isSuccess()

    - #### isFinalResponse

          public boolean isFinalResponse()

      Indicates whether the status code can only be used in the last response for a particular request.

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