Interface HeadersMapFactory


  • public interface HeadersMapFactory
    Factory to create the Map implementation to use for storing headers on Message.
    See Also:
    org.apache.camel.impl.engine.DefaultHeadersMapFactory
    • Method Detail

      • newMap

        Map<String,​Object> newMap​(Map<String,​Object> map)
        Creates a new Map and copies over all the content from the existing map.

        The copy of the content should use defensive copy, so the returned map can add/remove/change the content without affecting the existing map.

        Parameters:
        map - existing map to copy over (must use defensive copy)
        Returns:
        new map with the content from the existing map
      • isInstanceOf

        boolean isInstanceOf​(Map<String,​Object> map)
        Whether the given Map implementation is created by this factory?
        Returns:
        true if created from this factory, false if not
      • isCaseInsensitive

        boolean isCaseInsensitive()
        Whether the created Map are case insensitive or not.

        Important: When using case sensitive (this method return false). Then the map is case sensitive which means headers such as content-type and Content-Type are two different keys which can be a problem for some protocols such as HTTP based, which rely on case insensitive headers. However case sensitive implementations can yield faster performance. Therefore use case sensitive implementation with care.