org.jboss.aerogear.controller.router.parameter
Class RequestParameter<T>
java.lang.Object
org.jboss.aerogear.controller.router.parameter.Parameter<T>
org.jboss.aerogear.controller.router.parameter.RequestParameter<T>
public class RequestParameter<T>
- extends Parameter<T>
A RequestParameter is a parameter that comes from the request, for example a query, form, cookie, header, or path parameter.
| Nested classes/interfaces inherited from class org.jboss.aerogear.controller.router.parameter.Parameter |
Parameter.Type |
|
Constructor Summary |
RequestParameter(String name,
Parameter.Type parameterType,
Class<T> type)
Constructs a RequestParameter with a name, Paramter.Type, and specifies the type of the value in the parameter. |
RequestParameter(String name,
Parameter.Type parameterType,
T defaultValue,
Class<T> type)
Constructs a RequestParameter with a name, Parameter.Type, and specifies the type of the value in the parameter and allows
for a default value to be specified which will be used if the parameter is missing from the request. |
name
private final String name
defaultValue
private final com.google.common.base.Optional<T> defaultValue
RequestParameter
public RequestParameter(String name,
Parameter.Type parameterType,
Class<T> type)
- Constructs a RequestParameter with a name,
Paramter.Type, and specifies the type of the value in the parameter.
- Parameters:
name - the name of this parameter, the name of the query, form, cookie, header, or path parameter.parameterType - the Parameter.Type of this parameter.type - the class type of this parameter.
RequestParameter
public RequestParameter(String name,
Parameter.Type parameterType,
T defaultValue,
Class<T> type)
- Constructs a RequestParameter with a name,
Parameter.Type, and specifies the type of the value in the parameter and allows
for a default value to be specified which will be used if the parameter is missing from the request.
- Parameters:
name - the name of this parameter, the name of the query, form, cookie, header, or path parameter.parameterType - the Parameter.Type of this parameter.defaultValue - the value to be used if this parameter, identified by name, is missing from the request.type - the class type of this parameter.
getName
public String getName()
getDefaultValue
public com.google.common.base.Optional<T> getDefaultValue()
toString
public String toString()
- Overrides:
toString in class Parameter<T>
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.