Class 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 a FilterProcessor to include an integer representing the priority of this processor, and a Comparator to sort by priority, then by id.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Comparator<PrioritizedFilterProcessor> COMPARATOR
      A comparator to sort PrioritizedFilterProcessors by their priority field.
      • Fields inherited from class org.apache.camel.support.processor.DelegateAsyncProcessor

        processor
      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
    • 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
      int compareTo​(PrioritizedFilterProcessor other)
      Compare the priority of this instance to the priority of the parameter.
      int getPriority()
      Get the processor priority.
      String toString()  
      • 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.AsyncProcessorSupport

        process, processAsync
      • 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 interface org.apache.camel.spi.IdAware

        setGeneratedId
      • Methods inherited from interface org.apache.camel.Processor

        process
      • Methods inherited from interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • Methods inherited from interface org.apache.camel.StatefulService

        getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
      • Methods inherited from interface org.apache.camel.SuspendableService

        isSuspended, resume, suspend
    • 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 identifier
        priority - the priority of this processor
        context - the camel context
        predicate - the rule expression
        processor - the processor to invoke if the predicate matches
    • Method Detail

      • getPriority

        public int getPriority()
        Get the processor priority.
        Returns:
        the priority
      • toString

        public String toString()
        Overrides:
        toString in class org.apache.camel.processor.FilterProcessor