public class ClientRequestException
extends java.lang.RuntimeException
implements java.io.Closeable
WebApplicationException
that occurred in a Http
request to avoid that it is used to delegate the same response to the own caller by default
exception mappers.Constructor and Description |
---|
ClientRequestException(java.lang.Throwable cause) |
Modifier and Type | Method and Description |
---|---|
void |
close()
This implementation can be called multiple times and will never throw an exception.
|
java.util.Optional<javax.ws.rs.core.Response> |
getResponse() |
java.util.Optional<javax.ws.rs.WebApplicationException> |
getWebApplicationExceptionCause() |
boolean |
isClientError() |
boolean |
isConnectTimeout() |
boolean |
isProcessingError() |
boolean |
isReadTimeout() |
boolean |
isServerError() |
boolean |
isTimeout() |
public ClientRequestException(java.lang.Throwable cause)
cause
- the caught WebApplicationException
that occurred in a Http
requestpublic boolean isClientError()
public boolean isServerError()
public boolean isConnectTimeout()
public boolean isReadTimeout()
public boolean isTimeout()
public boolean isProcessingError()
public java.util.Optional<javax.ws.rs.core.Response> getResponse()
Response
of the outgoing request if available, otherwise an empty Optional
public java.util.Optional<javax.ws.rs.WebApplicationException> getWebApplicationExceptionCause()
Throwable.getCause()
if it is a WebApplicationException
, otherwise an empty
Optional
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable