|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.impl.DefaultHeaderFilterStrategy
public class DefaultHeaderFilterStrategy
The default header filtering strategy. Users can configure filter by
setting filter set and/or setting a regular expression. Subclass can
add extended filter logic in
extendedFilter(org.apache.camel.impl.DefaultHeaderFilterStrategy.Direction, String, Object)
Filters are associated with directions (in or out). "In" direction is
referred to propagating headers "to" Camel message. The "out" direction
is opposite which is referred to propagating headers from Camel message
to a native message like JMS and CXF message. You can see example of
DefaultHeaderFilterStrategy are being extended and invoked in camel-jms
and camel-cxf components.
Nested Class Summary | |
---|---|
protected static class |
DefaultHeaderFilterStrategy.Direction
|
Constructor Summary | |
---|---|
DefaultHeaderFilterStrategy()
|
Method Summary | |
---|---|
boolean |
applyFilterToCamelHeaders(String headerName,
Object headerValue)
Applies filtering logic to Camel Message header that is going to be copied to target message. |
boolean |
applyFilterToExternalHeaders(String headerName,
Object headerValue)
Applies filtering logic to an external message header message that is going to be copied to Camel message header. |
protected boolean |
extendedFilter(DefaultHeaderFilterStrategy.Direction direction,
String key,
Object value)
|
boolean |
getAllowNullValues()
|
Set<String> |
getInFilter()
Gets the "in" direction filter set. |
String |
getInFilterPattern()
Gets the "in" direction filter regular expression Pattern . |
boolean |
getIsLowercase()
Gets the isLowercase property which is a boolean to determinte whether header names should be converted to lowercase before checking it the filter Set. |
Set<String> |
getOutFilter()
Gets the "out" direction filter set. |
String |
getOutFilterPattern()
Gets the "out" direction filter regular expression Pattern . |
void |
setAllowNullValues(boolean value)
|
void |
setInFilter(Set<String> value)
Sets the "in" direction filter set. |
void |
setInFilterPattern(String value)
Sets the "in" direction filter regular expression Pattern . |
void |
setIsLowercase(boolean value)
Sets the isLowercase property which is a boolean to determinte whether header names should be converted to lowercase before checking it the filter Set. |
void |
setOutFilter(Set<String> value)
Sets the "out" direction filter set. |
void |
setOutFilterPattern(String value)
Sets the "out" direction filter regular expression Pattern . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultHeaderFilterStrategy()
Method Detail |
---|
public boolean applyFilterToCamelHeaders(String headerName, Object headerValue)
applyFilterToCamelHeaders
in interface HeaderFilterStrategy
headerName
- headerValue
-
public boolean applyFilterToExternalHeaders(String headerName, Object headerValue)
applyFilterToExternalHeaders
in interface HeaderFilterStrategy
headerName
- headerValue
-
public Set<String> getOutFilter()
public void setOutFilter(Set<String> value)
public String getOutFilterPattern()
Pattern
. The
"out" direction is referred to copying headers from Camel message to
an external message. If the pattern matches a header, the header will
be filtered out.
public void setOutFilterPattern(String value)
Pattern
. The
"out" direction is referred to copying headers from Camel message to
an external message. If the pattern matches a header, the header will
be filtered out.
value
- regular expression filter patternpublic Set<String> getInFilter()
public void setInFilter(Set<String> value)
public String getInFilterPattern()
Pattern
. The
"in" direction is referred to copying headers from an external message
to a Camel message. If the pattern matches a header, the header will
be filtered out.
public void setInFilterPattern(String value)
Pattern
. The
"in" direction is referred to copying headers from an external message
to a Camel message. If the pattern matches a header, the header will
be filtered out.
value
- regular expression filter patternpublic boolean getIsLowercase()
public void setIsLowercase(boolean value)
public boolean getAllowNullValues()
public void setAllowNullValues(boolean value)
protected boolean extendedFilter(DefaultHeaderFilterStrategy.Direction direction, String key, Object value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |