This exception may be thrown by a resource method, provider or jakarta.ws.rs.core.StreamingOutput
implementation if a specific HTTP error response needs to be produced. Only effective if thrown prior to the response
being committed.
| Modifier and Type | Field and Description |
|---|---|
| private final transient Response | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | WebApplicationException()
Construct a new instance with a default HTTP status code of 500 and a default message generated from the HTTP status code and the associated HTTP status reason phrase. |
| public | WebApplicationException(final String
the detail message (which is saved for later retrieval by the message)getMessage() method).Construct a new instance with the supplied message and a default HTTP status code of 500. |
| public | WebApplicationException(final Response
the response that will be returned to the client, a value of null will be replaced with an internal
server error response (status code 500). response)Construct a new instance using the supplied response and a default message generated from the response's HTTP status code and the associated HTTP status reason phrase. |
| public | WebApplicationException(final String
the detail message (which is saved for later retrieval by the message, final Response getMessage() method).the response that will be returned to the client, a value of null will be replaced with an internal
server error response (status code 500). response)Construct a new instance using the supplied message and response. |
| public | WebApplicationException(final int
the HTTP status code that will be returned to the client. status)Construct a new instance with the supplied HTTP status code and a default message generated from the HTTP status code and the associated HTTP status reason phrase. |
| public | WebApplicationException(final String
the detail message (which is saved for later retrieval by the message, final int getMessage() method).the HTTP status code that will be returned to the client. status)Construct a new instance with a supplied message and HTTP status code. |
| public | WebApplicationException(final Response.
the HTTP status code that will be returned to the client. statusConstruct a new instance with the supplied HTTP status and a default message generated from the HTTP status code and the associated HTTP status reason phrase. |
| public | WebApplicationException(final String
the detail message (which is saved for later retrieval by the message, final Response.getMessage() method).the HTTP status code that will be returned to the client. statusConstruct a new instance with the supplied message and HTTP status. |
| public | WebApplicationException(final Throwable
the underlying cause of the exception. cause)Construct a new instance with the supplied root cause, default HTTP status code of 500 and a default message generated from the HTTP status code and the associated HTTP status reason phrase. |
| public | WebApplicationException(final String
the detail message (which is saved for later retrieval by the message, final Throwable getMessage() method).the underlying cause of the exception. cause)Construct a new instance with the supplied message, root cause and default HTTP status code of 500. |
| public | WebApplicationException(final Throwable
the underlying cause of the exception. cause, final Response the response that will be returned to the client, a value of null will be replaced with an internal
server error response (status code 500). response)Construct a new instance with the supplied root cause, response and a default message generated from the response's HTTP status code and the associated HTTP status reason phrase. |
| public | WebApplicationException(final String
the detail message (which is saved for later retrieval by the message, final Throwable getMessage() method).the underlying cause of the exception. cause, final Response the response that will be returned to the client, a value of null will be replaced with an internal
server error response (status code 500). response)Construct a new instance with the supplied message, root cause and response. |
| public | WebApplicationException(final Throwable
the underlying cause of the exception. cause, final int the HTTP status code that will be returned to the client. status)Construct a new instance with the supplied root cause, HTTP status code and a default message generated from the HTTP status code and the associated HTTP status reason phrase. |
| public | WebApplicationException(final String
the detail message (which is saved for later retrieval by the message, final Throwable getMessage() method).the underlying cause of the exception. cause, final int the HTTP status code that will be returned to the client. status)Construct a new instance with the supplied message, root cause and HTTP status code. |
| public | WebApplicationException(final Throwable
the underlying cause of the exception. cause, final Response.the HTTP status code that will be returned to the client. statusConstruct a new instance with the supplied root cause, HTTP status code and a default message generated from the HTTP status code and the associated HTTP status reason phrase. |
| public | WebApplicationException(final String
the detail message (which is saved for later retrieval by the message, final Throwable getMessage() method).the underlying cause of the exception. cause, final Response.the HTTP status code that will be returned to the client. statusConstruct a new instance with a the supplied message, root cause and HTTP status code. |
| Modifier and Type | Method and Description |
|---|---|
| private static String | |
| public Response | |
| pack-priv static Response | Returns: validated response object.response object. response, final Response.expected response status code. expectedStatusValidate that a |
| pack-priv static Response |
| response | back to summary |
|---|---|
| private final transient Response response | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException() Construct a new instance with a default HTTP status code of 500 and a default message generated from the HTTP status code and the associated HTTP status reason phrase. | |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final String message) Construct a new instance with the supplied message and a default HTTP status code of 500.
| |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final Response response) Construct a new instance using the supplied response and a default message generated from the response's HTTP status code and the associated HTTP status reason phrase.
| |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final String message, final Response response) Construct a new instance using the supplied message and response.
| |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final int status) Construct a new instance with the supplied HTTP status code and a default message generated from the HTTP status code and the associated HTTP status reason phrase.
| |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final String message, final int status) Construct a new instance with a supplied message and HTTP status code.
| |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final Response. Construct a new instance with the supplied HTTP status and a default message generated from the HTTP status code and the associated HTTP status reason phrase.
| |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final String message, final Response. Construct a new instance with the supplied message and HTTP status.
| |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final Throwable cause) Construct a new instance with the supplied root cause, default HTTP status code of 500 and a default message generated from the HTTP status code and the associated HTTP status reason phrase.
| |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final String message, final Throwable cause) Construct a new instance with the supplied message, root cause and default HTTP status code of 500.
| |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final Throwable cause, final Response response) Construct a new instance with the supplied root cause, response and a default message generated from the response's HTTP status code and the associated HTTP status reason phrase. | |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final String message, final Throwable cause, final Response response) Construct a new instance with the supplied message, root cause and response.
| |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final Throwable cause, final int status) Construct a new instance with the supplied root cause, HTTP status code and a default message generated from the HTTP status code and the associated HTTP status reason phrase.
| |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final String message, final Throwable cause, final int status) Construct a new instance with the supplied message, root cause and HTTP status code.
| |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final Throwable cause, final Response. Construct a new instance with the supplied root cause, HTTP status code and a default message generated from the HTTP status code and the associated HTTP status reason phrase.
| |
| WebApplicationException | back to summary |
|---|---|
| public WebApplicationException(final String message, final Throwable cause, final Response. Construct a new instance with a the supplied message, root cause and HTTP status code.
| |
| computeExceptionMessage | back to summary |
|---|---|
| private static String computeExceptionMessage(final Response response) | |
| getResponse | back to summary |
|---|---|
| public Response getResponse() Get the HTTP response.
| |
| validate | back to summary |
|---|---|
| pack-priv static Response validate(final Response response, final Response. Validate that a
| |
| validate | back to summary |
|---|---|
| pack-priv static Response validate(final Response response, final Response. Validate that a | |