Top Description Methods
org.springframework.messaging.handler.invocation

public Interface HandlerMethodArgumentResolver

Known Direct Implementers
org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolverComposite, org.springframework.messaging.simp.annotation.support.PrincipalMethodArgumentResolver, org.springframework.messaging.handler.annotation.support.AbstractNamedValueMethodArgumentResolver, org.springframework.messaging.handler.annotation.support.HeadersMethodArgumentResolver, org.springframework.messaging.handler.annotation.support.MessageMethodArgumentResolver, org.springframework.messaging.handler.annotation.support.PayloadMethodArgumentResolver
Imports
org.springframework.core.MethodParameter, org.springframework.lang.Nullable, org.springframework.messaging.Message

Strategy interface for resolving method parameters into argument values in the context of a given Message.
Author
Rossen Stoyanchev
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the resolved argument value, or null
resolveArgument
(MethodParameter
the method parameter to resolve. This parameter must have previously been passed to supportsParameter(org.springframework.core.MethodParameter) which must have returned true.
parameter
,
Message<?>
the currently processed message
message
)

Resolves a method parameter into an argument value from a given message.

public boolean

Returns:

true if this resolver supports the supplied parameter; false otherwise
supportsParameter
(MethodParameter
the method parameter to check
parameter
)

Whether the given method parameter is supported by this resolver.

Method Detail

resolveArgumentback to summary
public Object resolveArgument(MethodParameter parameter, Message<?> message) throws Exception

Resolves a method parameter into an argument value from a given message.

Parameters
parameter:MethodParameter

the method parameter to resolve. This parameter must have previously been passed to supportsParameter(org.springframework.core.MethodParameter) which must have returned true.

message:Message<?>

the currently processed message

Returns:Object

the resolved argument value, or null

Annotations
@Nullable
Exceptions
Exception:
in case of errors with the preparation of argument values
supportsParameterback to summary
public boolean supportsParameter(MethodParameter parameter)

Whether the given method parameter is supported by this resolver.

Parameters
parameter:MethodParameter

the method parameter to check

Returns:boolean

true if this resolver supports the supplied parameter; false otherwise