Package org.glassfish.jersey.server
Class ParamException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- javax.ws.rs.WebApplicationException
-
- org.glassfish.jersey.server.ParamException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
FormDataParamException,ParamException.CookieParamException,ParamException.FormParamException,ParamException.HeaderParamException,ParamException.UriParamException
public abstract class ParamException extends javax.ws.rs.WebApplicationExceptionAn abstract extension ofWebApplicationExceptionfor 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
ExceptionMappermay 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.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParamException.CookieParamExceptionA parameter exception for errors withCookieParam.static classParamException.FormParamExceptionA parameter exception for errors withFormParam.static classParamException.HeaderParamExceptionA parameter exception for errors withHeaderParam.static classParamException.MatrixParamExceptionA URI-parameter-based exception for errors withMatrixParam.static classParamException.PathParamExceptionA URI-parameter-based exception for errors withPathParam.static classParamException.QueryParamExceptionA URI-parameter-based exception for errors withQueryParam.static classParamException.UriParamExceptionAn abstract parameter exception for the class of URI-parameter-based exceptions.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringdefaultStringValueprivate java.lang.Stringnameprivate java.lang.Class<? extends java.lang.annotation.Annotation>parameterTypeprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description protectedParamException(java.lang.Throwable cause, javax.ws.rs.core.Response.StatusType status, java.lang.Class<? extends java.lang.annotation.Annotation> parameterType, java.lang.String name, java.lang.String defaultStringValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDefaultStringValue()Get the default String value.java.lang.StringgetParameterName()Get the parameter name.java.lang.Class<? extends java.lang.annotation.Annotation>getParameterType()Get the type of the parameter annotation.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
parameterType
private final java.lang.Class<? extends java.lang.annotation.Annotation> parameterType
-
name
private final java.lang.String name
-
defaultStringValue
private final java.lang.String defaultStringValue
-
-
Method Detail
-
getParameterType
public java.lang.Class<? extends java.lang.annotation.Annotation> getParameterType()
Get the type of the parameter annotation.- Returns:
- the type of the parameter annotation.
-
getParameterName
public java.lang.String getParameterName()
Get the parameter name.- Returns:
- the parameter name.
-
getDefaultStringValue
public java.lang.String getDefaultStringValue()
Get the default String value.- Returns:
- the default String value.
-
-