T
- Component type for setComponent(T component)public abstract class AbstractServerHandlers<T> extends SerializableNodeList<String>
serverObject.<name>
on the client side.NodeList.SetView<T extends Serializable>
Constructor and Description |
---|
AbstractServerHandlers(StateNode node)
Creates a new meta information list for the given state node.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addHandlerMethod(Method method,
Collection<Method> methods)
Add a handler to the NodeList.
|
protected void |
collectHandlerMethods(Class<?> classWithAnnotations)
Collect methods annotated with the handler annotation for given class.
|
protected void |
collectHandlerMethods(Class<?> clazz,
Collection<Method> methods)
Collect all Methods annotated with the handler annotation.
|
void |
componentSet(T component)
Called by
ComponentMapping whenever a component instance has been
set for the node. |
protected abstract void |
ensureSupportedParameterTypes(Method method)
Validate parameter support for given method.
|
DisabledUpdateMode |
getDisabledUpdateMode(String handler)
Gets RPC control mode from the client side to the server side for
disabled element.
|
protected abstract Class<? extends Annotation> |
getHandlerAnnotation()
Gets the annotation which is used to mark methods as handlers.
|
protected abstract DisabledUpdateMode |
getUpdateMode(Method method)
Returns method's RPC communication mode from the client side to the
server side when the element is disabled.
|
boolean |
hasHandler(String handler)
Checks whether the handler is registered in this feature.
|
add
add, addAll, clear, collectChanges, forEachChild, generateChangesFromEmpty, get, getChangeTracker, indexOf, isNodeValues, iterator, onDetach, remove, size
allowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach
public AbstractServerHandlers(StateNode node)
node
- the state node this list belongs toprotected abstract void ensureSupportedParameterTypes(Method method)
method
- Method to check parameters forpublic void componentSet(T component)
ComponentMapping
whenever a component instance has been
set for the node.component
- the component instance which was setpublic DisabledUpdateMode getDisabledUpdateMode(String handler)
handler
- the handler name to get control modepublic boolean hasHandler(String handler)
handler
- the handler to checktrue
if handler is registered in the featureprotected void collectHandlerMethods(Class<?> classWithAnnotations)
classWithAnnotations
- Class to collect methods forprotected void collectHandlerMethods(Class<?> clazz, Collection<Method> methods)
clazz
- Class to check methods formethods
- Collection to add methods toprotected void addHandlerMethod(Method method, Collection<Method> methods)
method
- Method to verify and addmethods
- Collection to add method toprotected abstract Class<? extends Annotation> getHandlerAnnotation()
protected abstract DisabledUpdateMode getUpdateMode(Method method)
method
- the method to get its update modenull
Copyright © 2019. All rights reserved.