Class PausableDefinition

All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.LineNumberAware, Block, org.apache.camel.NamedNode, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.HasId, org.apache.camel.spi.IdAware

@Metadata(label="eip,routing") public class PausableDefinition extends NoOutputDefinition<PausableDefinition>
Pausable EIP to support resuming processing from last known offset.
  • Constructor Details

    • PausableDefinition

      public PausableDefinition()
  • Method Details

    • getShortName

      public String getShortName()
    • getLabel

      public String getLabel()
      Description copied from class: ProcessorDefinition
      Returns a label to describe this node such as the expression if some kind of expression node
      Specified by:
      getLabel in interface org.apache.camel.NamedNode
      Overrides:
      getLabel in class ProcessorDefinition<PausableDefinition>
    • getConsumerListenerBean

      public org.apache.camel.resume.ConsumerListener<?,?> getConsumerListenerBean()
    • setConsumerListener

      public void setConsumerListener(org.apache.camel.resume.ConsumerListener<?,?> consumerListenerBean)
    • getConsumerListener

      public String getConsumerListener()
    • setConsumerListener

      public void setConsumerListener(String consumerListener)
    • getUntilCheckBean

      public Predicate<?> getUntilCheckBean()
    • setUntilCheck

      public void setUntilCheck(Predicate<?> untilCheckBean)
    • getUntilCheck

      public String getUntilCheck()
    • setUntilCheck

      public void setUntilCheck(String untilCheck)
    • consumerListener

      public PausableDefinition consumerListener(String consumerListenerRef)
      Sets the consumer listener to use
    • consumerListener

      public PausableDefinition consumerListener(org.apache.camel.resume.ConsumerListener<?,?> consumerListener)
      Sets the consumer listener to use
    • untilCheck

      public PausableDefinition untilCheck(String untilCheck)
      References to a java.util.function.Predicate to use for until checks. The predicate is responsible for evaluating whether the processing can resume or not. Such predicate should return true if the consumption can resume, or false otherwise. The exact point of when the predicate is called is dependent on the component, and it may be called on either one of the available events. Implementations should not assume the predicate to be called at any specific point.
    • untilCheck

      public PausableDefinition untilCheck(Predicate<?> untilCheck)
      The java.util.function.Predicate to use for until checks. The predicate is responsible for evaluating whether the processing can resume or not. Such predicate should return true if the consumption can resume, or false otherwise. The exact point of when the predicate is called is dependent on the component, and it may be called on either one of the available events. Implementations should not assume the predicate to be called at any specific point.