Class InterceptFromDefinition

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

@Metadata(label="configuration") public class InterceptFromDefinition extends InterceptDefinition
Intercepts incoming messages
  • Field Details

  • Constructor Details

    • InterceptFromDefinition

      public InterceptFromDefinition()
    • InterceptFromDefinition

      public InterceptFromDefinition(String uri)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class InterceptDefinition
    • getShortName

      public String getShortName()
      Specified by:
      getShortName in interface org.apache.camel.NamedNode
      Overrides:
      getShortName in class InterceptDefinition
    • 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 InterceptDefinition
    • isAbstract

      public boolean isAbstract()
      Description copied from class: ProcessorDefinition
      Whether this model is abstract or not.

      An abstract model is something that is used for configuring cross cutting concerns such as error handling, transaction policies, interceptors etc.

      Regular definitions is what is part of the route, such as ToDefinition, WireTapDefinition and the likes.

      Will by default return false to indicate regular definition, so all the abstract definitions must override this method and return true instead.

      This information is used in camel-spring to let Camel work a bit on the model provided by JAXB from the Spring XML file. This is needed to handle those cross cutting concerns properly. The Java DSL does not have this issue as it can work this out directly using the fluent builder methods.

      Overrides:
      isAbstract in class InterceptDefinition
      Returns:
      true for abstract, otherwise false for regular.
    • isTopLevelOnly

      public boolean isTopLevelOnly()
      Description copied from class: ProcessorDefinition
      Whether this definition can only be added as top-level directly on the route itself (such as onException,onCompletion,intercept, etc.)

      If trying to add a top-level only definition to a nested output would fail in the ProcessorDefinition.addOutput(ProcessorDefinition) method.

      Overrides:
      isTopLevelOnly in class InterceptDefinition
    • getUri

      public String getUri()
    • setUri

      public void setUri(String uri)
      Intercept incoming messages from the uri or uri pattern. If this option is not configured, then all incoming messages is intercepted.