Enum ResponseStatusCode
- java.lang.Object
-
- java.lang.Enum<ResponseStatusCode>
-
- org.apache.tinkerpop.gremlin.util.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 Description AUTHENTICATECode 407: A challenge from the server for the client to authenticate its request.FORBIDDENCode 403: The server could authenticate the request, but will not fulfill it.NO_CONTENTCode 204: The server processed the request but there is no result to return (e.g.PARTIAL_CONTENTCode 206: The server successfully returned some content, but there is more in the stream to arrive - wait for aSUCCESSto signify the end of the stream.REQUEST_ERROR_INVALID_REQUEST_ARGUMENTSCode 499: The request message was parseable, but the arguments supplied in the message were in conflict or incomplete.REQUEST_ERROR_MALFORMED_REQUESTCode 498: 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_SERIALIZATIONCode 497: The request message contains objects that were not serializable on the client side.SERVER_ERRORCode 500: A general server error occurred that prevented the request from being processed.SERVER_ERROR_EVALUATIONCode 597: The request submitted for processing evaluated by the server with errors and could not be processed.SERVER_ERROR_FAIL_STEPCode 595: A server error that is produced when theGraphTraversal.fail()step is triggered.SERVER_ERROR_SERIALIZATIONCode 599: The server was not capable of serializing an object that was returned from the script supplied on the request.SERVER_ERROR_TEMPORARYCode 596: A server error that indicates that the client should retry the request.SERVER_ERROR_TIMEOUTCode 598: The server exceeded one of the timeout settings for the request and could therefore only partially responded or did not respond at all.SUCCESSCode 200: The server successfully processed a request to completion - there are no messages remaining in this stream.TOO_MANY_REQUESTSCode 429: Indicates that too many requests have been sent in a given amount of time.UNAUTHORIZEDCode 401: 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 Description static ResponseStatusCodegetFromValue(int codeValue)intgetValue()booleanisFinalResponse()Indicates whether the status code can only be used in the last response for a particular request.booleanisSuccess()static ResponseStatusCodevalueOf(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.
-
-
-
Enum Constant Detail
-
SUCCESS
public static final ResponseStatusCode SUCCESS
Code 200: 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
Code 204: The server processed the request but there is no result to return (e.g. anIteratorwith no elements).- Since:
- 3.0.0-incubating
-
PARTIAL_CONTENT
public static final ResponseStatusCode PARTIAL_CONTENT
Code 206: The server successfully returned some content, but there is more in the stream to arrive - wait for aSUCCESSto signify the end of the stream.- Since:
- 3.0.0-incubating
-
UNAUTHORIZED
public static final ResponseStatusCode UNAUTHORIZED
Code 401: 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
Code 403: 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
Code 407: 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
Code 429: 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
Code 497: 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
Code 498: 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
Code 499: 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
Code 500: A general server error occurred that prevented the request from being processed.- Since:
- 3.0.0-incubating
-
SERVER_ERROR_FAIL_STEP
public static final ResponseStatusCode SERVER_ERROR_FAIL_STEP
Code 595: A server error that is produced when theGraphTraversal.fail()step is triggered. The returned exception will include information consistent with theFailureinterface.- Since:
- 3.6.0
-
SERVER_ERROR_TEMPORARY
public static final ResponseStatusCode SERVER_ERROR_TEMPORARY
Code 596: 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
Code 597: 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
Code 598: 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
Code 599: 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 nameNullPointerException- 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.
-
-