org.springframework.messaging.support

## Interface HeaderMapper<T>

- Type Parameters:
    `T` - type of the instance to and from which headers will be mapped
  All Known Subinterfaces:
    JmsHeaderMapper
  All Known Implementing Classes:
    AbstractHeaderMapper, SimpleJmsHeaderMapper

      public interface HeaderMapper<T>

  Generic strategy interface for mapping `MessageHeaders` to and from other types of objects. This would typically be used by adapters where the "other type" has a concept of headers or properties (HTTP, JMS, AMQP, etc).
  Since:
    4.1
  Author:
    Mark Fisher

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `fromHeaders(MessageHeaders headers, T target)` Map from the given `MessageHeaders` to the specified target message.
    `MessageHeaders` | `toHeaders(T source)` Map from the given target message to abstracted `MessageHeaders`.

- - ### Method Detail

    - #### fromHeaders

          void fromHeaders(MessageHeaders headers,
                           T target)

      Map from the given `MessageHeaders` to the specified target message.
      Parameters:
        `headers` - the abstracted MessageHeaders
        `target` - the native target message

    - #### toHeaders

          MessageHeaders toHeaders(T source)

      Map from the given target message to abstracted `MessageHeaders`.
      Parameters:
        `source` - the native target message
      Returns:
        the abstracted MessageHeaders