Class OnFallbackDefinition

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

@Metadata(label="eip,routing,error") public class OnFallbackDefinition extends OptionalIdentifiedDefinition<OnFallbackDefinition> implements CopyableDefinition<OnFallbackDefinition>, Block, OutputNode
Route to be executed when Circuit Breaker EIP executes fallback
  • Constructor Details

    • OnFallbackDefinition

      public OnFallbackDefinition()
    • OnFallbackDefinition

      protected OnFallbackDefinition(OnFallbackDefinition source)
  • Method Details

    • copyDefinition

      public OnFallbackDefinition copyDefinition()
      Description copied from interface: CopyableDefinition
      Makes a copy of this definition.
      Specified by:
      copyDefinition in interface CopyableDefinition<OnFallbackDefinition>
    • getOutputs

      public List<ProcessorDefinition<?>> getOutputs()
      Description copied from interface: OutputNode
      Gets the outputs
      Specified by:
      getOutputs in interface OutputNode
    • setOutputs

      public void setOutputs(List<ProcessorDefinition<?>> outputs)
    • toString

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

      public String getShortName()
      Specified by:
      getShortName in interface org.apache.camel.NamedNode
    • getLabel

      public String getLabel()
      Specified by:
      getLabel in interface org.apache.camel.NamedNode
    • getFallbackViaNetwork

      public String getFallbackViaNetwork()
    • setFallbackViaNetwork

      public void setFallbackViaNetwork(String fallbackViaNetwork)
      Whether the fallback goes over the network.

      If the fallback will go over the network it is another possible point of failure. It is important to execute the fallback command on a separate thread-pool, otherwise if the main command were to become latent and fill the thread-pool this would prevent the fallback from running if the two commands share the same pool.

    • getParent

      public ProcessorDefinition<?> getParent()
      Specified by:
      getParent in interface org.apache.camel.NamedNode
      Overrides:
      getParent in class OptionalIdentifiedDefinition<OnFallbackDefinition>
    • setParent

      public void setParent(ProcessorDefinition<?> parent)
    • addOutput

      public void addOutput(ProcessorDefinition<?> output)
      Description copied from interface: Block
      Adds the given definition as output to this block
      Specified by:
      addOutput in interface Block
      Parameters:
      output - the processor definition