Class JsrCallable
- java.lang.Object
-
- org.eclipse.jetty.websocket.common.events.annotated.CallableMethod
-
- org.eclipse.jetty.websocket.jsr356.annotations.JsrCallable
-
- Direct Known Subclasses:
OnCloseCallable
,OnErrorCallable
,OnMessageCallable
,OnOpenCallable
public abstract class JsrCallable extends CallableMethod
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object[]
args
protected int
idxConfig
protected int
idxSession
protected Param[]
params
-
Fields inherited from class org.eclipse.jetty.websocket.common.events.annotated.CallableMethod
method, paramTypes, pojo
-
-
Constructor Summary
Constructors Constructor Description JsrCallable(java.lang.Class<?> pojo, java.lang.reflect.Method method)
JsrCallable(JsrCallable copy)
Copy Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
assertRoleRequired(int index, java.lang.String description)
protected int
findIndexForRole(Param.Role role)
Search the list of parameters for first one matching the role specified.protected Param
findParamForRole(Param.Role role)
Find first param for specified role.Param[]
getParams()
void
init(JsrSession session)
abstract void
setDecodingType(java.lang.Class<?> decodingType)
The Type of Class aDecoder
should be created to produce.-
Methods inherited from class org.eclipse.jetty.websocket.common.events.annotated.CallableMethod
call, formatMethodCallError, getMethod, getParamTypes, getPojo, toString
-
-
-
-
Field Detail
-
params
protected final Param[] params
-
args
protected final java.lang.Object[] args
-
idxSession
protected int idxSession
-
idxConfig
protected int idxConfig
-
-
Constructor Detail
-
JsrCallable
public JsrCallable(java.lang.Class<?> pojo, java.lang.reflect.Method method)
-
JsrCallable
public JsrCallable(JsrCallable copy)
Copy Constructor- Parameters:
copy
- the JsrCallable to copy from
-
-
Method Detail
-
assertRoleRequired
protected void assertRoleRequired(int index, java.lang.String description)
-
findIndexForRole
protected int findIndexForRole(Param.Role role)
Search the list of parameters for first one matching the role specified.- Parameters:
role
- the role to look for- Returns:
- the index for the role specified (or -1 if not found)
-
findParamForRole
protected Param findParamForRole(Param.Role role)
Find first param for specified role.- Parameters:
role
- the role specified- Returns:
- the param (or null if not found)
-
getParams
public Param[] getParams()
-
init
public void init(JsrSession session)
-
setDecodingType
public abstract void setDecodingType(java.lang.Class<?> decodingType)
The Type of Class aDecoder
should be created to produce.- Parameters:
decodingType
- the type of class a Decoder should be created to produce
-
-