Package org.apache.camel.model
Class TransactedDefinition
- java.lang.Object
-
- org.apache.camel.model.OptionalIdentifiedDefinition<Type>
-
- org.apache.camel.model.ProcessorDefinition<Type>
-
- org.apache.camel.model.OutputDefinition<TransactedDefinition>
-
- org.apache.camel.model.TransactedDefinition
-
- 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 TransactedDefinition extends OutputDefinition<TransactedDefinition>
Enables transaction on the route
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROPAGATION_REQUIRED-
Fields inherited from class org.apache.camel.model.OutputDefinition
outputs
-
Fields inherited from class org.apache.camel.model.ProcessorDefinition
inheritErrorHandler
-
-
Constructor Summary
Constructors Constructor Description TransactedDefinition()TransactedDefinition(org.apache.camel.spi.Policy policy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Stringdescription()StringgetLabel()Returns a label to describe this node such as the expression if some kind of expression nodeList<ProcessorDefinition<?>>getOutputs()org.apache.camel.spi.PolicygetPolicy()StringgetRef()StringgetShortName()Class<? extends org.apache.camel.spi.Policy>getType()booleanisAbstract()Whether this model is abstract or not.booleanisTopLevelOnly()Whether this definition can only be added as top-level directly on the route itself (such as onException,onCompletion,intercept, etc.)booleanisWrappingEntireOutput()Whether this definition is wrapping the entire output.TransactedDefinitionref(String ref)Sets a reference to use for lookup the policy in the registry.voidsetOutputs(List<ProcessorDefinition<?>> outputs)voidsetRef(String ref)voidsetType(Class<? extends org.apache.camel.spi.Policy> type)Sets a policy type that this definition should scope within.StringtoString()-
Methods inherited from class org.apache.camel.model.ProcessorDefinition
addInterceptStrategy, addOutput, aggregate, aggregate, aggregate, aggregate, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, choice, circuitBreaker, claimCheck, claimCheck, claimCheck, claimCheck, clearOutput, configureChild, convertBodyTo, convertBodyTo, convertBodyTo, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endCircuitBreaker, endDoCatch, endDoTry, endParent, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, filter, filter, filter, filter, getIndex, getInterceptStrategies, getParent, getRouteConfiguration, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, isInheritErrorHandler, kamelet, loadBalance, loadBalance, log, log, log, log, log, log, loop, loop, loop, loopDoWhile, loopDoWhile, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pausable, pausable, pausable, pausable, pipeline, pipeline, pipeline, pipeline, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, preCreateProcessor, process, process, process, recipientList, recipientList, recipientList, recipientList, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, resumable, resumable, resumable, rollback, rollback, routeDescription, routeGroup, routeId, routingSlip, routingSlip, routingSlip, saga, sample, sample, sample, sample, sample, script, script, serviceCall, serviceCall, serviceCall, setBody, setBody, setBody, setExchangePattern, setExchangePattern, setHeader, setHeader, setHeader, setInheritErrorHandler, setParent, setProperty, setProperty, setProperty, setRouteConfiguration, sort, sort, sort, split, split, split, split, startupOrder, step, step, stop, threads, threads, threads, threads, throttle, throttle, throttle, throttle, throttle, throwException, throwException, to, to, to, to, to, to, to, to, to, to, to, to, to, to, toD, toD, toD, toD, toD, toD, toD, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap
-
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, description, getCamelContext, getCustomId, getDescription, getDescriptionText, getId, getLineNumber, getLocation, hasCustomIdAssigned, idOrCreate, setCamelContext, setCustomId, setDescription, setGeneratedId, setId, setLineNumber, setLocation
-
-
-
-
Field Detail
-
PROPAGATION_REQUIRED
public static final String PROPAGATION_REQUIRED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOutputs
public List<ProcessorDefinition<?>> getOutputs()
- Overrides:
getOutputsin classOutputDefinition<TransactedDefinition>
-
setOutputs
public void setOutputs(List<ProcessorDefinition<?>> outputs)
- Overrides:
setOutputsin classOutputDefinition<TransactedDefinition>
-
toString
public String toString()
- Overrides:
toStringin classOutputDefinition<TransactedDefinition>
-
description
protected String description()
-
getShortName
public String getShortName()
- Specified by:
getShortNamein interfaceorg.apache.camel.NamedNode- Overrides:
getShortNamein classOutputDefinition<TransactedDefinition>
-
getLabel
public String getLabel()
Description copied from class:ProcessorDefinitionReturns a label to describe this node such as the expression if some kind of expression node- Specified by:
getLabelin interfaceorg.apache.camel.NamedNode- Overrides:
getLabelin classProcessorDefinition<TransactedDefinition>
-
isAbstract
public boolean isAbstract()
Description copied from class:ProcessorDefinitionWhether 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:
isAbstractin classProcessorDefinition<TransactedDefinition>- Returns:
- true for abstract, otherwise false for regular.
-
isTopLevelOnly
public boolean isTopLevelOnly()
Description copied from class:ProcessorDefinitionWhether 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 theProcessorDefinition.addOutput(ProcessorDefinition)method.- Overrides:
isTopLevelOnlyin classProcessorDefinition<TransactedDefinition>
-
isWrappingEntireOutput
public boolean isWrappingEntireOutput()
Description copied from class:ProcessorDefinitionWhether this definition is wrapping the entire output. When a definition is wrapping the entire output, the check to ensure that a route definition is empty should be done on the wrapped output.- Overrides:
isWrappingEntireOutputin classProcessorDefinition<TransactedDefinition>- Returns:
- true when wrapping the entire output.
-
getPolicy
public org.apache.camel.spi.Policy getPolicy()
-
getRef
public String getRef()
-
setRef
public void setRef(String ref)
-
getType
public Class<? extends org.apache.camel.spi.Policy> getType()
-
setType
public void setType(Class<? extends org.apache.camel.spi.Policy> type)
Sets a policy type that this definition should scope within. Is used for convention over configuration situations where the policy should be automatic looked up in the registry and it should be based on this type. For instance aTransactedPolicycan be set as type for easy transaction configuration. Will by default scope to the widePolicy- Parameters:
type- the policy type
-
ref
public TransactedDefinition ref(String ref)
Sets a reference to use for lookup the policy in the registry.- Parameters:
ref- the reference- Returns:
- the builder
-
-