Class InterceptFromDefinition

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

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

    • Constructor Detail

      • InterceptFromDefinition

        public InterceptFromDefinition()
      • InterceptFromDefinition

        public InterceptFromDefinition​(String uri)
    • Method Detail

      • 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.
      • 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.