Interface HandlerMethod<M>
- Type Parameters:
M- the message type
- All Superinterfaces:
HandlerDescriptor
- All Known Implementing Classes:
HandlerMethod.DelegatingHandlerMethod
A reusable, target-bound handler method.
Unlike a HandlerInvoker, a HandlerMethod is not resolved for one specific message. It can be
checked and invoked repeatedly for messages that match the same method and target.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAHandlerMethodthat delegates all behavior to another instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this method can handle the supplied message.default ObjectInvokes this handler method for the supplied message using the default result-combining strategy.Invokes this handler method for the supplied message and combines multiple results using the given combiner.Methods inherited from interface HandlerDescriptor
expectResult, getMethod, getMethodAnnotation, getTargetClass, isPassive
-
Method Details
-
canHandle
Returns whether this method can handle the supplied message.- Parameters:
message- the message to check- Returns:
trueif this handler method can handle the message
-
invoke
-
invoke
Invokes this handler method for the supplied message and combines multiple results using the given combiner.- Parameters:
message- the message to handleresultCombiner- function to combine multiple results- Returns:
- the handler result
-