Package org.apache.camel.spi
Interface HeadersMapFactory
-
public interface HeadersMapFactory
- See Also:
org.apache.camel.impl.engine.DefaultHeadersMapFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isCaseInsensitive()
Whether the createdMap
are case insensitive or not.boolean
isInstanceOf(Map<String,Object> map)
Whether the givenMap
implementation is created by this factory?Map<String,Object>
newMap()
Creates a new emptyMap
Map<String,Object>
newMap(Map<String,Object> map)
Creates a newMap
and copies over all the content from the existing map.
-
-
-
Field Detail
-
FACTORY
static final String FACTORY
Service factory key.- See Also:
- Constant Field Values
-
-
Method Detail
-
newMap
Map<String,Object> newMap(Map<String,Object> map)
Creates a newMap
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 givenMap
implementation is created by this factory?- Returns:
- true if created from this factory, false if not
-
isCaseInsensitive
boolean isCaseInsensitive()
Whether the createdMap
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.
-
-