|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException javax.ws.rs.client.ClientException javax.ws.rs.client.InvocationException
public class InvocationException
A runtime exception thrown during the HTTP request invocation processing,
that signals a failure to process the HTTP request or response. The exception
message or nested Throwable
cause SHOULD contain additional information
about the reason of the processing failure. The exception is also thrown when
the status code of the returned HTTP response indicates a response that is not
expected.
Invocation
or a Client
instance. Additionally, the exception is also thrown by
Response
readEntity(...)
methods in case the returned response is
HTTP 204 (No Content).
Whenever the exception is thrown in the context of an existing response
,
the response will be referenced
by the exception.
Constructor Summary | |
---|---|
InvocationException(Response response)
Construct a client-side invocation exception and set the exception's response reference to point to the provided
response input parameter. |
|
InvocationException(Response response,
boolean bufferResponseEntity)
Construct a client-side invocation exception and set the exception's response reference to point to the provided
response input parameter. |
|
InvocationException(String message)
Construct a client-side invocation exception without a response. |
|
InvocationException(String message,
Response response)
Construct a client-side invocation exception and set the exception's response reference to point to the provided
response input parameter. |
|
InvocationException(String message,
Response response,
boolean bufferResponseEntity)
Construct a client-side invocation exception and set the exception's response reference to point to the provided
response input parameter. |
|
InvocationException(String message,
Throwable cause)
Constructs a new client-side invocation exception with the specified detail message and cause. |
Method Summary | |
---|---|
Response |
getResponse()
Get the client response associated with the exception. |
String |
toString()
|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InvocationException(String message)
The client response wrapped by the exception will be set to null
.
message
- the message of the exception.public InvocationException(String message, Throwable cause)
response reference
will be set to null
.
Note that the detail message associated with cause
is not
automatically incorporated in this runtime exception's detail message.
message
- the detail message (which is saved for later retrieval
by the Throwable.getMessage()
method).cause
- the cause (which is saved for later retrieval by the
Throwable.getCause()
method). (A null
value is permitted,
and indicates that the cause is nonexistent or unknown.)public InvocationException(Response response)
response reference
to point to the provided
response
input parameter. The message of the exception is set
to a value returned by response.toString()
.
The entity of the referenced response will be buffered
.
response
- the client response. The message of the exception is set
to a value returned by response.toString()
.public InvocationException(Response response, boolean bufferResponseEntity)
response reference
to point to the provided
response
input parameter. The message of the exception is set
to a value returned by response.toString()
.
The entity of the referenced response will be buffered
if the bufferResponseEntity
is set to true
.
response
- the client response. The message of the exception is set
to a value returned by response.toString()
.bufferResponseEntity
- if true
the entity of the referenced
response will be buffered
.public InvocationException(String message, Response response)
response reference
to point to the provided
response
input parameter. The message of the exception is set
to a value of message
input parameter.
The entity of the referenced response will be buffered
.
message
- the detail message (which is saved for later retrieval
by the Throwable.getMessage()
method).response
- the client response. The message of the exception is set
to a value returned by response.toString()
.public InvocationException(String message, Response response, boolean bufferResponseEntity)
response reference
to point to the provided
response
input parameter. The message of the exception is set
to a value of message
input parameter.
The entity of the referenced response will be buffered
if the bufferResponseEntity
is set to true
.
message
- the detail message (which is saved for later retrieval
by the Throwable.getMessage()
method).response
- the client response. The message of the exception is set
to a value returned by response.toString()
.bufferResponseEntity
- if true
the entity of the referenced
response will be buffered
.Method Detail |
---|
public Response getResponse()
null
if the exception was not associated with any particular response.
null
.public String toString()
toString
in class Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |