org.springframework.messaging.handler.annotation.support

## Class HeadersMethodArgumentResolver

- java.lang.Object
- - org.springframework.messaging.handler.annotation.support.HeadersMethodArgumentResolver

All Implemented Interfaces:
  HandlerMethodArgumentResolver

    public class HeadersMethodArgumentResolver
    extends Object
    implements HandlerMethodArgumentResolver

Argument resolver for headers. Resolves the following method parameters:

- `@Headers` `Map`
- `MessageHeaders`
- `MessageHeaderAccessor`

Since:
  4.0
Author:
  Rossen Stoyanchev

### Constructor Summary

Constructors
Constructor and Description
`HeadersMethodArgumentResolver()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Object` `resolveArgument(org.springframework.core.MethodParameter parameter, Message<?> message)` Resolves a method parameter into an argument value from a given message.
`boolean` `supportsParameter(org.springframework.core.MethodParameter parameter)` Whether the given method parameter is supported by this resolver.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### HeadersMethodArgumentResolver

    public HeadersMethodArgumentResolver()

### Method Detail

#### supportsParameter

    public boolean supportsParameter(org.springframework.core.MethodParameter parameter)

Description copied from interface: `HandlerMethodArgumentResolver`
Whether the given method parameter is supported by this resolver.

Specified by:
  `supportsParameter` in interface `HandlerMethodArgumentResolver`
Parameters:
  `parameter` - the method parameter to check
Returns:
  `true` if this resolver supports the supplied parameter; `false` otherwise

#### resolveArgument

    @Nullable
    public Object resolveArgument(org.springframework.core.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 interface `HandlerMethodArgumentResolver`
Parameters:
  `parameter` - the method parameter to resolve. This parameter must have previously been passed to `HandlerMethodArgumentResolver.supportsParameter(org.springframework.core.MethodParameter)` which must have returned `true`.
  `message` - the currently processed message
Returns:
  the resolved argument value, or `null`
Throws:
  `Exception` - in case of errors with the preparation of argument values