public class ClientRequest extends Object
| Constructor and Description |
|---|
ClientRequest(Session session,
Map<String,Object> map)
Creates a client request object from the request map.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getData()
Returns the data payload associated with the request.
|
<T> T |
getData(Class<T> clazz)
Returns the data payload associated with the request, coercing it to the specified type.
|
Page |
getPage()
The page with which this request is associated.
|
<T> T |
getParam(String name,
Class<T> type)
Returns the named parameter from the request data.
|
<T> T |
getParam(String name,
Class<T> type,
T deflt)
Returns the named event parameter from the request.
|
Session |
getSession()
Return the session to which this request belongs.
|
String |
getType()
Returns the type of this request.
|
public Page getPage()
public Session getSession()
public Object getData()
public <T> T getData(Class<T> clazz)
T - The data class.clazz - The class of the payload.ClassCastException - If the payload is not assignment-compatible with the specified
class.public String getType()
public <T> T getParam(String name, Class<T> type)
T - The expected parameter type.name - The parameter name.type - The expected parameter type.public <T> T getParam(String name, Class<T> type, T deflt)
T - The expected parameter type.name - The parameter name.type - The expected parameter type.deflt - The default value for the parameter.Copyright © 2017 Regenstrief Center for Biomedical Informatics. All rights reserved.