Class PrioritizedFilterProcessor
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.AsyncProcessorSupport
-
- org.apache.camel.support.processor.DelegateAsyncProcessor
-
- org.apache.camel.processor.FilterProcessor
-
- org.apache.camel.component.dynamicrouter.PrioritizedFilterProcessor
-
- All Implemented Interfaces:
AutoCloseable,Comparable<PrioritizedFilterProcessor>,org.apache.camel.AsyncProcessor,org.apache.camel.DelegateProcessor,org.apache.camel.Navigate<org.apache.camel.Processor>,org.apache.camel.Processor,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasId,org.apache.camel.spi.IdAware,org.apache.camel.spi.RouteIdAware,org.apache.camel.StatefulService,org.apache.camel.SuspendableService,org.apache.camel.Traceable
public class PrioritizedFilterProcessor extends org.apache.camel.processor.FilterProcessor implements Comparable<PrioritizedFilterProcessor>
This class serves as a wrapper around aFilterProcessorto include an integer representing the priority of this processor, and aComparatorto sort by priority, then by id.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPrioritizedFilterProcessor.PrioritizedFilterProcessorFactoryCreate aPrioritizedFilterProcessorinstance.
-
Field Summary
Fields Modifier and Type Field Description static Comparator<PrioritizedFilterProcessor>COMPARATORA comparator to sortPrioritizedFilterProcessors by their priority field.
-
Constructor Summary
Constructors Constructor Description PrioritizedFilterProcessor(String id, int priority, org.apache.camel.CamelContext context, org.apache.camel.Predicate predicate, org.apache.camel.Processor processor)Create this processor with all properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(PrioritizedFilterProcessor other)Compare the priority of this instance to the priority of the parameter.intgetPriority()Get the processor priority.StringtoString()-
Methods inherited from class org.apache.camel.processor.FilterProcessor
doInit, doStart, doStop, getFilteredCount, getId, getPredicate, getRouteId, getStatusPropertyName, getTraceLabel, matches, process, reset, setId, setRouteId, setStatusPropertyName
-
Methods inherited from class org.apache.camel.support.processor.DelegateAsyncProcessor
doBuild, doShutdown, getProcessor, hasNext, next, setProcessor, setProcessor
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
COMPARATOR
public static final Comparator<PrioritizedFilterProcessor> COMPARATOR
A comparator to sortPrioritizedFilterProcessors by their priority field.
-
-
Constructor Detail
-
PrioritizedFilterProcessor
public PrioritizedFilterProcessor(String id, int priority, org.apache.camel.CamelContext context, org.apache.camel.Predicate predicate, org.apache.camel.Processor processor)
Create this processor with all properties.- Parameters:
id- the identifierpriority- the priority of this processorcontext- the camel contextpredicate- the rule expressionprocessor- the processor to invoke if the predicate matches
-
-
Method Detail
-
getPriority
public int getPriority()
Get the processor priority.- Returns:
- the priority
-
compareTo
public int compareTo(PrioritizedFilterProcessor other)
Compare the priority of this instance to the priority of the parameter.- Specified by:
compareToin interfaceComparable<PrioritizedFilterProcessor>- Parameters:
other- the processor to compare with- Returns:
- the result of the priority comparison
-
toString
public String toString()
- Overrides:
toStringin classorg.apache.camel.processor.FilterProcessor
-
-