org.gcube.smartgears.handlers.application.request
Enum RequestError

java.lang.Object
  extended by java.lang.Enum<RequestError>
      extended by 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
application_error
          An error raised by managed applications.
application_failed_error
          The error raised when requests are made to failed applications.
application_unavailable_error
          The error raised when requests are made to stopped applications.
illegal_state_error
          The error raised when requests require illegal resource state transitions.
incoming_contenttype_unsupported_error
          The error raised when requests carry an unsupported media type.
invalid_request_error
          The error raised when requests are genrically invalid.
method_unsupported_error
          The error raised when requests are made with unsupported HTTP methods.
outgoing_contenttype_unsupported_error
          The error raised when requests request an unsupported media type.
resource_notfound_error
          The error raised when requests are made to unknown resources.
 
Method Summary
 int code()
           
 void fire()
           
 void fire(String msg)
           
 void fire(String msg, Throwable cause)
           
 void fire(Throwable cause)
           
 String message()
           
 RequestException toException()
           
 RequestException toException(String msg)
           
 RequestException toException(String msg, Throwable cause)
           
 RequestException toException(Throwable cause)
           
static RequestError valueOf(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.
 
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

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.


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 name
NullPointerException - 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)

fire

public void fire(String msg,
                 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)


Copyright © 2014. All Rights Reserved.