com.sun.jersey.api
Class ParamException

java.lang.Object  extended by java.lang.Throwable      extended by java.lang.Exception          extended by java.lang.RuntimeException              extended by javax.ws.rs.WebApplicationException                  extended by com.sun.jersey.api.ParamException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ParamException.CookieParamException, ParamException.FormParamException, ParamException.HeaderParamException, ParamException.URIParamException

public abstract class ParamException
extends WebApplicationException

An abstract extension of 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 specfication.

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.

Author:
Paul.Sandoz@Sun.Com
See Also:
Serialized Form


Nested Class Summary
static classParamException.CookieParamException
          A parameter exception for errors with CookieParam.
static classParamException.FormParamException
          A parameter exception for errors with FormParam.
static classParamException.HeaderParamException
          A parameter exception for errors with HeaderParam.
static classParamException.MatrixParamException
          A URI-parameter-based exception for errors with MatrixParam.
static classParamException.PathParamException
          A URI-parameter-based exception for errors with PathParam.
static classParamException.QueryParamException
          A URI-parameter-based exception for errors with QueryParam.
static classParamException.URIParamException
          An abstract parameter exception for the class of URI-parameter-based exceptions.
 
Constructor Summary
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)
           
 
Method Summary
 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.
 
Methods inherited from class javax.ws.rs.WebApplicationException
getResponse
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParamException

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)
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.


Copyright © 2011
Oracle Corporation. All Rights Reserved.


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14