public class FilterEventsConfiguration extends java.lang.Object implements Configuration
Configuration
interface.
Provides easy access to a specified Camel filter.DURABLE_SUBSCRIPTION, FILTER, IDEMPOTENT_CONSUMER, ORDERING, SERVER_SIDE_FILTER, THREAD_POOL
Constructor and Description |
---|
FilterEventsConfiguration(java.lang.String simpleFilter)
Constructs an object based on provided Camel filter.
|
FilterEventsConfiguration(java.lang.String header,
java.lang.String value)
Constructs an object based on provided header name and value.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSimpleFilter()
Provides access to the filter used by this configuration object.
|
int |
getType()
Returns the configuration type represented as an integer
|
public FilterEventsConfiguration(java.lang.String header, java.lang.String value)
new FilterConfiguration("$Event$Kind", "Event")
is
equivalent to new FilterConfiguration("${header.$Event$Kind} = 'Event'")
.
The code above can be used for filtering events out whose Kind header is
not "Event", i.e. this will filter all Heartbeat events out.header
- - The name of the header you want your filter to be based on.value
- - The value of the header you want your filter to be based on.public FilterEventsConfiguration(java.lang.String simpleFilter)
new FilterConfiguration("${header.$Event$Kind} = 'Event'")
The code above can be used for filtering events out whose Kind header is
not "Event", i.e. this will filter all Heartbeat events out.simpleFilter
- - A filter based on Camel's Simple language.public java.lang.String getSimpleFilter()
new FilterConfiguration("$Event$Kind", "Event")
returns "${header.$Event$Kind = 'Event'".public int getType()
Configuration
getType
in interface Configuration