Enum RequestError
- java.lang.Object
-
- java.lang.Enum<RequestError>
-
- org.gcube.smartgears.handlers.application.request.RequestError
-
- All Implemented Interfaces:
Serializable,Comparable<RequestError>
public enum RequestError extends Enum<RequestError>
Known error types.Each type can throw a corresponding
RequestException.- Author:
- Fabio Simeoni
-
-
Enum Constant Summary
Enum Constants Enum Constant Description application_errorAn error raised by managed applications.application_failed_errorThe error raised when requests are made to failed applications.application_unavailable_errorThe error raised when requests are made to stopped applications.illegal_state_errorThe error raised when requests require illegal resource state transitions.incoming_contenttype_unsupported_errorThe error raised when requests carry an unsupported media type.internal_server_errorinvalid_request_errorThe error raised when requests are genrically invalid.method_unsupported_errorThe error raised when requests are made with unsupported HTTP methods.outgoing_contenttype_unsupported_errorThe error raised when requests request an unsupported media type.request_not_authorized_errorresource_notfound_errorThe error raised when requests are made to unknown resources.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcode()voidfire()voidfire(String msg)voidfire(String msg, Throwable cause)voidfire(Throwable cause)Stringmessage()RequestExceptiontoException()RequestExceptiontoException(String msg)RequestExceptiontoException(String msg, Throwable cause)RequestExceptiontoException(Throwable cause)static RequestErrorvalueOf(String name)Returns the enum constant of this type with the specified name.static RequestError[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
application_failed_error
public static final RequestError application_failed_error
The error raised when requests are made to failed applications.
-
application_unavailable_error
public static final RequestError application_unavailable_error
The error raised when requests are made to stopped applications.
-
resource_notfound_error
public static final RequestError resource_notfound_error
The error raised when requests are made to unknown resources.
-
illegal_state_error
public static final RequestError illegal_state_error
The error raised when requests require illegal resource state transitions.
-
method_unsupported_error
public static final RequestError method_unsupported_error
The error raised when requests are made with unsupported HTTP methods.
-
invalid_request_error
public static final RequestError invalid_request_error
The error raised when requests are genrically invalid.
-
request_not_authorized_error
public static final RequestError request_not_authorized_error
-
internal_server_error
public static final RequestError internal_server_error
-
incoming_contenttype_unsupported_error
public static final RequestError incoming_contenttype_unsupported_error
The error raised when requests carry an unsupported media type.
-
outgoing_contenttype_unsupported_error
public static final RequestError outgoing_contenttype_unsupported_error
The error raised when requests request an unsupported media type.
-
application_error
public static final RequestError application_error
An error raised by managed applications.
-
-
Method Detail
-
values
public static RequestError[] 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 (RequestError c : RequestError.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RequestError 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
-
code
public int code()
-
message
public String message()
-
fire
public void fire()
-
fire
public void fire(String msg)
-
fire
public void fire(Throwable cause)
-
toException
public RequestException toException()
-
toException
public RequestException toException(String msg)
-
toException
public RequestException toException(Throwable cause)
-
toException
public RequestException toException(String msg, Throwable cause)
-
-