Class AbstractServerHandlers<T>
java.lang.Object
com.vaadin.flow.internal.nodefeature.NodeFeature
com.vaadin.flow.internal.nodefeature.NodeList<String>
com.vaadin.flow.internal.nodefeature.SerializableNodeList<String>
com.vaadin.flow.internal.nodefeature.AbstractServerHandlers<T>
- Type Parameters:
T- Component type for setComponent(T component)
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ClientCallableHandlers,PolymerServerEventHandlers
Abstract class for collecting Methods which are published as
serverObject.<name> on the client side.
For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.internal.nodefeature.NodeList
NodeList.SetView<T extends Serializable> -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new meta information list for the given state node. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddHandlerMethod(Method method, Collection<Method> methods) Add a handler to the NodeList.protected voidcollectHandlerMethods(Class<?> classWithAnnotations) Collect methods annotated with the handler annotation for given class.protected voidcollectHandlerMethods(Class<?> clazz, Collection<Method> methods) Collect all Methods annotated with the handler annotation.voidcomponentSet(T component) Called byComponentMappingwhenever a component instance has been set for the node.protected abstract voidensureSupportedParameterTypes(Method method) Validate parameter support for given method.protected voidensureSupportedReturnType(Method method) Validate return type support for given method.getDisabledUpdateMode(String handler) Gets RPC control mode from the client side to the server side for disabled element.protected abstract StringGets the annotation FQN which is used to mark methods as handlers.protected abstract DisabledUpdateModegetUpdateMode(Method method) Returns method's RPC communication mode from the client side to the server side when the element is disabled.booleanhasHandler(String handler) Checks whether the handler is registered in this feature.Methods inherited from class com.vaadin.flow.internal.nodefeature.SerializableNodeList
addMethods inherited from class com.vaadin.flow.internal.nodefeature.NodeList
add, addAll, clear, collectChanges, forEachChild, generateChangesFromEmpty, get, getChangeTracker, indexOf, isNodeValues, iterator, onDetach, remove, sizeMethods inherited from class com.vaadin.flow.internal.nodefeature.NodeFeature
allowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach
-
Constructor Details
-
AbstractServerHandlers
Creates a new meta information list for the given state node.- Parameters:
node- the state node this list belongs to
-
-
Method Details
-
ensureSupportedParameterTypes
Validate parameter support for given method. Should validate parameter amount and parameter types.- Parameters:
method- Method to check parameters for
-
componentSet
Called byComponentMappingwhenever a component instance has been set for the node.- Parameters:
component- the component instance which was set
-
getDisabledUpdateMode
Gets RPC control mode from the client side to the server side for disabled element.- Parameters:
handler- the handler name to get control mode- Returns:
- the handler RPC control mode for disabled element
-
hasHandler
Checks whether the handler is registered in this feature.- Parameters:
handler- the handler to check- Returns:
trueif handler is registered in the feature
-
collectHandlerMethods
Collect methods annotated with the handler annotation for given class.- Parameters:
classWithAnnotations- Class to collect methods for
-
collectHandlerMethods
Collect all Methods annotated with the handler annotation.- Parameters:
clazz- Class to check methods formethods- Collection to add methods to
-
addHandlerMethod
Add a handler to the NodeList.- Parameters:
method- Method to verify and addmethods- Collection to add method to
-
ensureSupportedReturnType
Validate return type support for given method.- Parameters:
method- method to check return type for
-
getHandlerAnnotationFqn
Gets the annotation FQN which is used to mark methods as handlers.- Returns:
- the handler marker annotation
-
getUpdateMode
Returns method's RPC communication mode from the client side to the server side when the element is disabled.- Parameters:
method- the method to get its update mode- Returns:
- RPC communication mode for the method, not
null
-