Interface HandlerMethodPlan<M>
- Type Parameters:
M- the message type used by the handling pipeline
- All Superinterfaces:
HandlerDescriptor
A reusable plan for invoking one already selected handler method.
A plan contains the method, its argument-resolution strategy, and either a fixed handler target or a strategy for
obtaining that target from the current HandlerInput. For example, a self-handling payload plan obtains its
target from HandlerInput.getPayload() on every invocation. Implementations must be immutable and safe for
concurrent use.
-
Method Summary
Modifier and TypeMethodDescriptioninvoke(HandlerInput<M> input) Invokes the selected handler method using the supplied input.default booleanisApplicable(HandlerInput<M> input) Checks invocation-specific eligibility without changing this reusable plan.Methods inherited from interface HandlerDescriptor
expectResult, getMethod, getMethodAnnotation, getTargetClass, isPassive
-
Method Details
-
isApplicable
Checks invocation-specific eligibility without changing this reusable plan. Callers must perform this check immediately before invocation, including when the plan was cached. A false result means that ordinary per-message handler selection is required; it is not a successful null handler result.- Parameters:
input- the current invocation input- Returns:
- whether this plan can handle the current input
-
invoke
Invokes the selected handler method using the supplied input.- Parameters:
input- the current input; it must satisfy the cache conditions under which this plan was prepared- Returns:
- the handler method's result
-