public abstract class ParamException extends WebApplicationException
WebApplicationException
for the class of
parameter-based exceptions.
Exceptions that are instances of this class will be thrown if the runtime
encounters an error obtaining a parameter value, from a request, for a
Java type that is annotated with a parameter-based annotation, such as
QueryParam
. For more details see
section 3.2
of the JAX-RS specification.
An ExceptionMapper
may be configured to map this class or a sub-class
of to customize responses for parameter-based errors.
Unless otherwise stated all such exceptions of this type will contain a response with a 400 (Client error) status code.
Modifier and Type | Class and Description |
---|---|
static class |
ParamException.CookieParamException
A parameter exception for errors with
CookieParam . |
static class |
ParamException.FormParamException
A parameter exception for errors with
FormParam . |
static class |
ParamException.HeaderParamException
A parameter exception for errors with
HeaderParam . |
static class |
ParamException.MatrixParamException
A URI-parameter-based exception for errors with
MatrixParam . |
static class |
ParamException.PathParamException
A URI-parameter-based exception for errors with
PathParam . |
static class |
ParamException.QueryParamException
A URI-parameter-based exception for errors with
QueryParam . |
static class |
ParamException.URIParamException
An abstract parameter exception for the class of URI-parameter-based
exceptions.
|
Modifier | Constructor and Description |
---|---|
protected |
ParamException(java.lang.Throwable cause,
int status,
java.lang.Class<? extends java.lang.annotation.Annotation> parameterType,
java.lang.String name,
java.lang.String defaultStringValue) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultStringValue()
Get the default String value.
|
java.lang.String |
getParameterName()
Get the parameter name.
|
java.lang.Class<? extends java.lang.annotation.Annotation> |
getParameterType()
Get the type of the parameter annotation.
|
getResponse
protected ParamException(java.lang.Throwable cause, int status, java.lang.Class<? extends java.lang.annotation.Annotation> parameterType, java.lang.String name, java.lang.String defaultStringValue)
public java.lang.Class<? extends java.lang.annotation.Annotation> getParameterType()
public java.lang.String getParameterName()
public java.lang.String getDefaultStringValue()
Copyright © 2016 Oracle Corporation. All Rights Reserved.