Package org.apache.camel.model
Class OnFallbackDefinition
java.lang.Object
org.apache.camel.model.OptionalIdentifiedDefinition<OnFallbackDefinition>
org.apache.camel.model.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 Summary
ConstructorsModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addOutput
(ProcessorDefinition<?> output) Adds the given definition as output to this blockMakes a copy of this definition.getLabel()
Gets the outputsvoid
setFallbackViaNetwork
(String fallbackViaNetwork) Whether the fallback goes over the network.void
setOutputs
(List<ProcessorDefinition<?>> outputs) void
setParent
(ProcessorDefinition<?> parent) toString()
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, getCamelContext, getCustomId, getDescription, getDescriptionText, getId, getLineNumber, getLocation, getNodePrefixId, hasCustomIdAssigned, id, idOrCreate, setCamelContext, setCustomId, setDescription, setGeneratedId, setId, setLineNumber, setLocation
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.camel.NamedNode
acceptDebugger
-
Constructor Details
-
OnFallbackDefinition
public OnFallbackDefinition() -
OnFallbackDefinition
-
-
Method Details
-
copyDefinition
Description copied from interface:CopyableDefinition
Makes a copy of this definition.- Specified by:
copyDefinition
in interfaceCopyableDefinition<OnFallbackDefinition>
-
getOutputs
Description copied from interface:OutputNode
Gets the outputs- Specified by:
getOutputs
in interfaceOutputNode
-
setOutputs
-
toString
-
getShortName
- Specified by:
getShortName
in interfaceorg.apache.camel.NamedNode
-
getLabel
- Specified by:
getLabel
in interfaceorg.apache.camel.NamedNode
-
getFallbackViaNetwork
-
setFallbackViaNetwork
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
- Specified by:
getParent
in interfaceorg.apache.camel.NamedNode
- Overrides:
getParent
in classOptionalIdentifiedDefinition<OnFallbackDefinition>
-
setParent
-
addOutput
Description copied from interface:Block
Adds the given definition as output to this block
-