HandlerMethodArgumentResolver for Message method arguments.
Validates that the generic type of the payload matches to the message value
or otherwise applies MessageConverter to convert to the expected
payload type.
| Modifier and Type | Field and Description |
|---|---|
| private final MessageConverter |
| Access | Constructor and Description |
|---|---|
| public | |
| public | MessageMethodArgumentResolver(MessageConverter
the MessageConverter to use (may be converter)null)Create a resolver instance with the given |
| Modifier and Type | Method and Description |
|---|---|
| private Object | |
| protected Class | Returns: the target type to usethe target method parameter parameter, Message<?> the message being processed message)Resolve the target class to convert the payload to. |
| protected boolean | isEmptyPayload(Object
the payload to check (can be payload)null)Check if the given |
| public Object | resolveArgument(MethodParameter
the method parameter to resolve.
This parameter must have previously been passed to
parameter, Message<?> supportsParameter(org.
which must have returned true.the currently processed message message)Implements org. |
| public boolean | supportsParameter(MethodParameter
the method parameter to check parameter)Implements org. |
| converter | back to summary |
|---|---|
| private final MessageConverter converter
| |
| MessageMethodArgumentResolver | back to summary |
|---|---|
| public MessageMethodArgumentResolver() Create a default resolver instance without message conversion. | |
| MessageMethodArgumentResolver | back to summary |
|---|---|
| public MessageMethodArgumentResolver(MessageConverter converter) Create a resolver instance with the given
| |
| convertPayload | back to summary |
|---|---|
| private Object convertPayload(Message<?> message, MethodParameter parameter, Class<?> targetPayloadType) | |
| getPayloadType | back to summary |
|---|---|
| protected Class Resolve the target class to convert the payload to. By default this is the generic type declared in the
| |
| isEmptyPayload | back to summary |
|---|---|
| protected boolean isEmptyPayload(Object payload) Check if the given
| |
| resolveArgument | back to summary |
|---|---|
| public Object resolveArgument(MethodParameter parameter, Message<?> message) throws Exception Implements org. Doc from org. Resolves a method parameter into an argument value from a given message.
| |
| supportsParameter | back to summary |
|---|---|
| public boolean supportsParameter(MethodParameter parameter) Implements org. Doc from org. Whether the given method parameter is supported by this resolver.
| |