public final class ResponseExceptionMapper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static javax.ws.rs.core.Response |
check(javax.ws.rs.core.Response response)
Check the response: map error status codes to exceptions.
|
static javax.ws.rs.core.Response |
check(javax.ws.rs.core.Response response,
int... expectedStatus)
Check the response: check if the status is one of the expected stati, and map error status codes to exceptions.
|
public static javax.ws.rs.core.Response check(javax.ws.rs.core.Response response,
int... expectedStatus)
throws javax.xml.ws.http.HTTPException
response - response from web service callexpectedStatus - expected status (or stati)javax.xml.ws.http.HTTPException - if the response status indicates an error (400 or higher)java.lang.IllegalStateException - when the status is not one of the expected statipublic static javax.ws.rs.core.Response check(javax.ws.rs.core.Response response)
throws javax.xml.ws.http.HTTPException
response - response from web service calljavax.xml.ws.http.HTTPException - if the response status indicates an error (400 or higher).