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

  Resolves the following method parameters:
  - Parameters assignable to `Map` annotated with `@Headers`
  - Parameters of type `MessageHeaders`
  - Parameters assignable to `MessageHeaderAccessor`
  Since:
    4.0
  Author:
    Rossen Stoyanchev

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HeadersMethodArgumentResolver()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `resolveArgument(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.

    - ### 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(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

          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 interface `HandlerMethodArgumentResolver`
      Parameters:
        `parameter` - the method parameter to resolve. This parameter must have previously been passed to `HandlerMethodArgumentResolver.supportsParameter(org.springframework.core.MethodParameter)` and it 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