Interface HandlerInput<M>
- Type Parameters:
M- the message type used by the handling pipeline
- All Known Subinterfaces:
LocalHandlerInput
- All Known Implementing Classes:
LocalExecution
public interface HandlerInput<M>
Provides the input for a prepared handler invocation.
The payload is always available directly. The enclosing message may be created only when a parameter resolver, interceptor, or handler asks for it. This lets local handlers that only need their payload avoid message creation altogether.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the message that contains the payload, creating it first when necessary.default MReturns the message if it is already available.Returns the payload that is being handled.
-
Method Details
-
getPayload
-
getMessage
M getMessage()Returns the message that contains the payload, creating it first when necessary.- Returns:
- the message being handled
-
getMessageIfAvailable
Returns the message if it is already available.The default implementation calls
getMessage(). Implementations that create messages lazily should override this method and returnnullwhile no message has been created.- Returns:
- the existing message, or
nullif a lazy implementation has not created it yet
-