Class HeadersMethodArgumentResolver
java.lang.Object
org.springframework.messaging.handler.annotation.support.HeadersMethodArgumentResolver
- All Implemented Interfaces:
HandlerMethodArgumentResolver
Argument resolver for headers. Resolves the following method parameters:
- Since:
- 4.0
- Author:
- Rossen Stoyanchev
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionresolveArgument
(MethodParameter parameter, Message<?> message) Resolves a method parameter into an argument value from a given message.boolean
supportsParameter
(MethodParameter parameter) Whether the given method parameter is supported by this resolver.
-
Constructor Details
-
HeadersMethodArgumentResolver
public HeadersMethodArgumentResolver()
-
-
Method Details
-
supportsParameter
Description copied from interface:HandlerMethodArgumentResolver
Whether the given method parameter is supported by this resolver.- Specified by:
supportsParameter
in interfaceHandlerMethodArgumentResolver
- Parameters:
parameter
- the method parameter to check- Returns:
true
if this resolver supports the supplied parameter;false
otherwise
-
resolveArgument
@Nullable public Object resolveArgument(MethodParameter parameter, Message<?> message) throws Exception Description copied from interface:HandlerMethodArgumentResolver
Resolves a method parameter into an argument value from a given message.- Specified by:
resolveArgument
in interfaceHandlerMethodArgumentResolver
- Parameters:
parameter
- the method parameter to resolve. This parameter must have previously been passed toHandlerMethodArgumentResolver.supportsParameter(org.springframework.core.MethodParameter)
which must have returnedtrue
.message
- the currently processed message- Returns:
- the resolved argument value, or
null
- Throws:
Exception
- in case of errors with the preparation of argument values
-