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_SCRIPT_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_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.
    `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.

    - #### 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).

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

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

    - #### 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. This code is for future use.

    - #### AUTHENTICATE

          public static final ResponseStatusCode AUTHENTICATE

      A challenge from the server for the client to authenticate its request.

    - #### REQUEST_ERROR_SERIALIZATION

          public static final ResponseStatusCode REQUEST_ERROR_SERIALIZATION

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

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

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

    - #### SERVER_ERROR

          public static final ResponseStatusCode SERVER_ERROR

      A general server error occurred that prevented the request from being processed.

    - #### SERVER_ERROR_SCRIPT_EVALUATION

          public static final ResponseStatusCode SERVER_ERROR_SCRIPT_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.

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

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

  - ### 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–2020 Apache Software Foundation. All rights reserved.