Package org.restlet.resource
Class ResourceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.restlet.resource.ResourceException
- All Implemented Interfaces:
Serializable
Encapsulates a response status and the optional cause as a checked exception.
- Author:
- Jerome Louvel
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionResourceException(int code) Constructor.ResourceException(int code, String reasonPhrase) Constructor.ResourceException(int code, String reasonPhrase, String description) Constructor.ResourceException(int code, String name, String description, String uri) Constructor.ResourceException(int code, String reasonPhrase, String description, String uri, Throwable cause) Constructor.ResourceException(int code, Throwable cause) Constructor.ResourceException(int code, Throwable throwable, String reasonPhrase) Constructor.ResourceException(int code, Throwable throwable, String reasonPhrase, String description) Constructor.ResourceException(int code, Throwable throwable, String reasonPhrase, String description, String uri) Constructor.ResourceException(Throwable cause) Constructor that set the status toStatus.SERVER_ERROR_INTERNALincluding the related error or exception.ResourceException(Status status) Constructor.ResourceException(Status status, String description) Constructor.ResourceException(Status status, String description, Throwable cause) Constructor.ResourceException(Status status, Throwable cause) Constructor.ResourceException(Status status, Throwable cause, Request request, Response response) Constructor.ResourceException(Status status, Request request, Response response) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the request associated to this exception.Returns the response associated to this exception.Returns the status associated to this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ResourceException
public ResourceException(int code) Constructor.- Parameters:
code- The specification code of the encapsulated status.
-
ResourceException
Constructor.- Parameters:
code- The specification code of the encapsulated status.reasonPhrase- The short reason phrase displayed next to the status code in a HTTP response.
-
ResourceException
Constructor.- Parameters:
code- The specification code of the encapsulated status.reasonPhrase- The short reason phrase displayed next to the status code in a HTTP response.description- The description of the encapsulated status.
-
ResourceException
Constructor.- Parameters:
code- The specification code of the encapsulated status.name- The name of the encapsulated status.description- The description of the encapsulated status.uri- The URI of the specification describing the method.
-
ResourceException
public ResourceException(int code, String reasonPhrase, String description, String uri, Throwable cause) Constructor.- Parameters:
code- The specification code of the encapsulated status.reasonPhrase- The short reason phrase displayed next to the status code in a HTTP response.description- The description of the encapsulated status.uri- The URI of the specification describing the method.cause- The wrapped cause error or exception.
-
ResourceException
Constructor.- Parameters:
code- The specification code of the encapsulated status.cause- The wrapped cause error or exception.
-
ResourceException
Constructor.- Parameters:
code- The specification code.throwable- The related error or exception.reasonPhrase- The short reason phrase displayed next to the status code in a HTTP response.
-
ResourceException
Constructor.- Parameters:
code- The specification code.throwable- The related error or exception.reasonPhrase- The short reason phrase displayed next to the status code in a HTTP response.description- The longer description.
-
ResourceException
public ResourceException(int code, Throwable throwable, String reasonPhrase, String description, String uri) Constructor.- Parameters:
code- The specification code.throwable- The related error or exception.reasonPhrase- The short reason phrase displayed next to the status code in a HTTP response.description- The longer description.uri- The URI of the specification describing the method.
-
ResourceException
Constructor.- Parameters:
status- The status to associate.
-
ResourceException
Constructor.- Parameters:
status- The status to associate.
-
ResourceException
Constructor.- Parameters:
status- The status to copy.description- The description of the encapsulated status.
-
ResourceException
Constructor.- Parameters:
status- The status to copy.description- The description of the encapsulated status.cause- The wrapped cause error or exception.
-
ResourceException
Constructor.- Parameters:
status- The status to associate.cause- The wrapped cause error or exception.
-
ResourceException
Constructor.- Parameters:
status- The status to associate.cause- The wrapped cause error or exception.
-
ResourceException
Constructor that set the status toStatus.SERVER_ERROR_INTERNALincluding the related error or exception.- Parameters:
cause- The wrapped cause error or exception.
-
-
Method Details
-
getRequest
Returns the request associated to this exception.- Returns:
- The request associated to this exception.
-
getResponse
Returns the response associated to this exception.- Returns:
- The response associated to this exception.
-
getStatus
Returns the status associated to this exception.- Returns:
- The status associated to this exception.
-