@Metadata(label="configuration") public class RouteDefinition extends OutputDefinition<RouteDefinition> implements org.apache.camel.NamedRoute
outputs
inheritErrorHandler, log
Constructor and Description |
---|
RouteDefinition() |
RouteDefinition(org.apache.camel.Endpoint endpoint) |
RouteDefinition(String uri) |
Modifier and Type | Method and Description |
---|---|
RouteDefinition |
autoStartup(boolean autoStartup)
Sets the auto startup property on this route.
|
RouteDefinition |
autoStartup(String autoStartup)
Sets the auto startup property on this route.
|
RouteDefinition |
delayer(long delay)
Enable delayer for this route.
|
RouteDefinition |
errorHandler(org.apache.camel.ErrorHandlerFactory errorHandlerBuilder)
Installs the given error handler builder.
|
RouteDefinition |
from(org.apache.camel.Endpoint endpoint)
Creates an input to the route
|
RouteDefinition |
from(EndpointConsumerBuilder endpoint)
Creates an input to the route
|
RouteDefinition |
from(String uri)
Creates an input to the route
|
static RouteDefinition |
fromEndpoint(org.apache.camel.Endpoint endpoint) |
void |
fromRest(String uri)
This route is created from the REST DSL.
|
static RouteDefinition |
fromUri(String uri) |
String |
getAutoStartup()
Whether to auto start this route
|
String |
getDelayer()
Whether to slow down processing messages by a given delay in msec.
|
String |
getEndpointUrl() |
org.apache.camel.ErrorHandlerFactory |
getErrorHandlerFactory() |
String |
getErrorHandlerRef()
Sets the bean ref name of the error handler builder to use on this route
|
String |
getGroup()
The group that this route belongs to; could be the name of the RouteBuilder class or be explicitly configured in
the XML.
|
FromDefinition |
getInput() |
InputTypeDefinition |
getInputType() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
String |
getLogMask()
Whether security mask for Logging is enabled on this route.
|
String |
getMessageHistory()
Whether message history is enabled on this route.
|
List<ProcessorDefinition<?>> |
getOutputs() |
OutputTypeDefinition |
getOutputType() |
RestBindingDefinition |
getRestBindingDefinition() |
RestDefinition |
getRestDefinition() |
String |
getRouteId() |
List<org.apache.camel.spi.RoutePolicy> |
getRoutePolicies() |
String |
getRoutePolicyRef()
Reference to custom
RoutePolicy to use by the route. |
List<PropertyDefinition> |
getRouteProperties() |
String |
getShortName() |
String |
getShutdownRoute() |
String |
getShutdownRunningTask()
To control how to shutdown the route.
|
Integer |
getStartupOrder()
To configure the ordering of the routes being started
|
String |
getStreamCache()
Whether stream caching is enabled on this route.
|
Map<String,Object> |
getTemplateParameters() |
String |
getTrace()
Whether tracing is enabled on this route.
|
RouteDefinition |
group(String name)
Set the group name for this route
|
RouteDefinition |
inputType(Class clazz)
Declare the expected data type of the input message by Java class.
|
RouteDefinition |
inputType(String urn)
Declare the expected data type of the input message.
|
RouteDefinition |
inputTypeWithValidate(Class clazz)
Declare the expected data type of the input message by Java class with content validation enabled.
|
RouteDefinition |
inputTypeWithValidate(String urn)
Declare the expected data type of the input message with content validation enabled.
|
boolean |
isContextScopedErrorHandler() |
boolean |
isPrepared()
Check if the route has been prepared
|
Boolean |
isRest() |
Boolean |
isTemplate() |
RouteDefinition |
logMask()
Enable security mask for Logging on this route.
|
RouteDefinition |
logMask(String logMask)
Sets whether security mask for logging is enabled on this route.
|
void |
markPrepared()
Marks the route definition as prepared.
|
void |
markUnprepared()
Marks the route definition as un-prepared.
|
RouteDefinition |
messageHistory()
Enable message history for this route.
|
RouteDefinition |
messageHistory(String messageHistory)
Enable message history for this route.
|
RouteDefinition |
noAutoStartup()
Disables this route from being auto started when Camel starts.
|
RouteDefinition |
noDelayer()
Disable delayer for this route.
|
RouteDefinition |
noMessageHistory()
Disable message history for this route.
|
RouteDefinition |
noStreamCaching()
Disable stream caching for this route.
|
RouteDefinition |
noTracing()
Disable tracing for this route.
|
RouteDefinition |
outputType(Class clazz)
Declare the expected data type of the output message by Java class.
|
RouteDefinition |
outputType(String urn)
Declare the expected data type of the output message.
|
RouteDefinition |
outputTypeWithValidate(Class clazz)
Declare the expected data type of the ouput message by Java class with content validation enabled.
|
RouteDefinition |
outputTypeWithValidate(String urn)
Declare the expected data type of the output message with content validation enabled.
|
RouteDefinition |
routeDescription(String description)
Set the route description for this route
|
RouteDefinition |
routeGroup(String group)
Set the route group for this route
|
RouteDefinition |
routeId(String id)
Set the route id for this route
|
RouteDefinition |
routePolicy(org.apache.camel.spi.RoutePolicy... policies)
Configures route policies for this route
|
RouteDefinition |
routePolicy(Supplier<org.apache.camel.spi.RoutePolicy> policy)
Configures route policy for this route
|
RouteDefinition |
routePolicyRef(String routePolicyRef)
Configures a route policy for this route
|
RouteDefinition |
routeProperty(String key,
String value)
Adds a custom property on the route.
|
void |
setAutoStartup(String autoStartup)
Whether to auto start this route
|
void |
setDelayer(String delayer)
Whether to slow down processing messages by a given delay in msec.
|
void |
setErrorHandlerFactory(org.apache.camel.ErrorHandlerFactory errorHandlerFactory)
Sets the error handler to use with processors created by this builder
|
void |
setErrorHandlerFactoryIfNull(org.apache.camel.ErrorHandlerFactory errorHandlerFactory)
Sets the error handler if one is not already set
|
void |
setErrorHandlerRef(String errorHandlerRef)
Sets the bean ref name of the error handler builder to use on this route
|
void |
setGroup(String group)
The group that this route belongs to; could be the name of the RouteBuilder class or be explicitly configured in
the XML.
|
void |
setInput(FromDefinition input)
Input to the route.
|
void |
setInputType(InputTypeDefinition inputType) |
void |
setLogMask(String logMask)
Whether security mask for Logging is enabled on this route.
|
void |
setMessageHistory(String messageHistory)
Whether message history is enabled on this route.
|
void |
setOutputs(List<ProcessorDefinition<?>> outputs)
Outputs are processors that determines how messages are processed by this route.
|
void |
setOutputType(OutputTypeDefinition outputType) |
void |
setRest(Boolean rest) |
void |
setRestBindingDefinition(RestBindingDefinition restBindingDefinition) |
void |
setRestDefinition(RestDefinition restDefinition) |
void |
setRoutePolicies(List<org.apache.camel.spi.RoutePolicy> routePolicies) |
void |
setRoutePolicyRef(String routePolicyRef)
Reference to custom
RoutePolicy to use by the route. |
void |
setRouteProperties(List<PropertyDefinition> routeProperties)
To set metadata as properties on the route.
|
void |
setShutdownRoute(String shutdownRoute)
To control how to shutdown the route.
|
void |
setShutdownRunningTask(String shutdownRunningTask)
To control how to shutdown the route.
|
void |
setStartupOrder(Integer startupOrder)
To configure the ordering of the routes being started
|
void |
setStreamCache(String streamCache)
Whether stream caching is enabled on this route.
|
void |
setTemplate(Boolean template)
This route is created from a route template.
|
void |
setTemplateParameters(Map<String,Object> templateParameters) |
void |
setTrace(String trace)
Whether tracing is enabled on this route.
|
RouteDefinition |
shutdownRoute(org.apache.camel.ShutdownRoute shutdownRoute)
Configures a shutdown route option.
|
RouteDefinition |
shutdownRoute(String shutdownRoute)
Configures a shutdown route option.
|
RouteDefinition |
shutdownRunningTask(org.apache.camel.ShutdownRunningTask shutdownRunningTask)
Configures a shutdown running task option.
|
RouteDefinition |
shutdownRunningTask(String shutdownRunningTask)
Configures a shutdown running task option.
|
RouteDefinition |
startupOrder(int order)
Configures the startup order for this route
Camel will reorder routes and star them ordered by 0..N where 0 is the lowest number and N the highest number.
|
RouteDefinition |
streamCaching()
Enable stream caching for this route.
|
RouteDefinition |
streamCaching(String streamCache)
Enable stream caching for this route.
|
String |
toString() |
RouteDefinition |
tracing()
Enable tracing for this route.
|
RouteDefinition |
tracing(String tracing)
Enable tracing for this route.
|
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, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endCircuitBreaker, endDoTry, endParent, endRest, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, filter, filter, filter, filter, getIndex, getInterceptStrategies, getParent, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, isTopLevelOnly, isWrappingEntireOutput, 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, 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, rollback, rollback, routingSlip, routingSlip, routingSlip, saga, sample, sample, sample, sample, script, script, serviceCall, serviceCall, serviceCall, setBody, setBody, setBody, setExchangePattern, setHeader, setHeader, setHeader, setInheritErrorHandler, setParent, setProperty, setProperty, setProperty, sort, sort, sort, split, split, split, split, 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, validate, validate, validate, wireTap, wireTap, wireTap
description, description, getCustomId, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setId
public RouteDefinition()
public RouteDefinition(@AsEndpointUri String uri)
public RouteDefinition(org.apache.camel.Endpoint endpoint)
public void fromRest(@AsEndpointUri String uri)
public boolean isPrepared()
RouteDefinitionHelper#prepareRoute(ModelCamelContext, RouteDefinition)
public void markPrepared()
public void markUnprepared()
public String toString()
toString
in class OutputDefinition<RouteDefinition>
public String getShortName()
getShortName
in interface org.apache.camel.NamedNode
getShortName
in class OutputDefinition<RouteDefinition>
public String getLabel()
ProcessorDefinition
getLabel
in interface org.apache.camel.NamedNode
getLabel
in class ProcessorDefinition<RouteDefinition>
public String getRouteId()
getRouteId
in interface org.apache.camel.NamedRoute
public String getEndpointUrl()
getEndpointUrl
in interface org.apache.camel.NamedRoute
public RouteDefinition from(@AsEndpointUri String uri)
uri
- the from uripublic RouteDefinition from(org.apache.camel.Endpoint endpoint)
endpoint
- the from endpointpublic RouteDefinition from(EndpointConsumerBuilder endpoint)
endpoint
- the from endpointpublic RouteDefinition group(String name)
name
- the group namepublic RouteDefinition routeGroup(String group)
routeGroup
in class ProcessorDefinition<RouteDefinition>
group
- the route grouppublic RouteDefinition routeId(String id)
routeId
in class ProcessorDefinition<RouteDefinition>
id
- the route idpublic RouteDefinition routeDescription(String description)
routeDescription
in class ProcessorDefinition<RouteDefinition>
description
- the route descriptionpublic RouteDefinition noStreamCaching()
public RouteDefinition streamCaching()
public RouteDefinition streamCaching(String streamCache)
streamCache
- whether to use stream caching (true or false), the value can be a property placeholderpublic RouteDefinition noTracing()
public RouteDefinition tracing()
public RouteDefinition tracing(String tracing)
tracing
- whether to use tracing (true or false), the value can be a property placeholderpublic RouteDefinition messageHistory()
public RouteDefinition messageHistory(String messageHistory)
messageHistory
- whether to use message history (true or false), the value can be a property placeholderpublic RouteDefinition logMask()
public RouteDefinition logMask(String logMask)
logMask
- whether to enable security mask for Logging (true or false), the value can be a property
placeholderpublic RouteDefinition noMessageHistory()
public RouteDefinition noDelayer()
public RouteDefinition delayer(long delay)
delay
- delay in millispublic RouteDefinition errorHandler(org.apache.camel.ErrorHandlerFactory errorHandlerBuilder)
errorHandlerBuilder
- the error handler to be used by default for all child routespublic RouteDefinition noAutoStartup()
public RouteDefinition autoStartup(String autoStartup)
autoStartup
- whether to auto startup (true or false), the value can be a property placeholderpublic RouteDefinition autoStartup(boolean autoStartup)
autoStartup
- - boolean indicatorpublic RouteDefinition startupOrder(int order)
startupOrder
in class ProcessorDefinition<RouteDefinition>
order
- the order represented as a numberpublic RouteDefinition routePolicy(org.apache.camel.spi.RoutePolicy... policies)
policies
- the route policiespublic RouteDefinition routePolicy(Supplier<org.apache.camel.spi.RoutePolicy> policy)
policy
- route policypublic RouteDefinition routePolicyRef(String routePolicyRef)
routePolicyRef
- reference to a RoutePolicy
to lookup and use. You can specify multiple references
by separating using comma.public RouteDefinition shutdownRoute(org.apache.camel.ShutdownRoute shutdownRoute)
shutdownRoute
- the option to use when shutting down this routepublic RouteDefinition shutdownRoute(String shutdownRoute)
shutdownRoute
- the option to use when shutting down this routepublic RouteDefinition shutdownRunningTask(org.apache.camel.ShutdownRunningTask shutdownRunningTask)
shutdownRunningTask
- the option to use when shutting down and how to act upon running tasks.public RouteDefinition shutdownRunningTask(String shutdownRunningTask)
shutdownRunningTask
- the option to use when shutting down and how to act upon running tasks.public RouteDefinition inputType(String urn)
Transformer
and apply if exists. The type name consists of two
parts, 'scheme' and 'name' connected with ':'. For Java type 'name' is a fully qualified class name. For example
java:java.lang.String
, json:ABCOrder
.urn
- input type URNTransformer
public RouteDefinition inputTypeWithValidate(String urn)
Transformer
and apply if exists,
and then applies Validator
as well. The type name consists of two parts, 'scheme'
and 'name' connected with ':'. For Java type 'name' is a fully qualified class name. For example
java:java.lang.String
, json:ABCOrder
.urn
- input type URNTransformer
,
Validator
public RouteDefinition inputType(Class clazz)
Transformer
and apply if exists.clazz
- Class object of the input typeTransformer
public RouteDefinition inputTypeWithValidate(Class clazz)
Transformer
and
apply if exists, and then applies Validator
as well.clazz
- Class object of the input typeTransformer
,
Validator
public RouteDefinition outputType(String urn)
Transformer
and apply if exists. The type name consists of two
parts, 'scheme' and 'name' connected with ':'. For Java type 'name' is a fully qualified class name. For example
java:java.lang.String
, json:ABCOrder
.urn
- output type URNTransformer
public RouteDefinition outputTypeWithValidate(String urn)
Transformer
and apply if exists,
and then applies Validator
as well. The type name consists of two parts, 'scheme'
and 'name' connected with ':'. For Java type 'name' is a fully qualified class name. For example
java:java.lang.String
, json:ABCOrder
.urn
- output type URNTransformer
,
Validator
public RouteDefinition outputType(Class clazz)
Transformer
and apply if exists.clazz
- Class object of the output typeTransformer
public RouteDefinition outputTypeWithValidate(Class clazz)
Transformer
and
apply if exists, and then applies Validator
as well.clazz
- Class object of the output typeTransformer
,
Validator
public RouteDefinition routeProperty(String key, String value)
public FromDefinition getInput()
public void setInput(FromDefinition input)
public List<ProcessorDefinition<?>> getOutputs()
getOutputs
in class OutputDefinition<RouteDefinition>
public void setOutputs(List<ProcessorDefinition<?>> outputs)
setOutputs
in class OutputDefinition<RouteDefinition>
public String getGroup()
public void setGroup(String group)
public String getStreamCache()
@Metadata(javaType="java.lang.Boolean") public void setStreamCache(String streamCache)
public String getTrace()
@Metadata(javaType="java.lang.Boolean") public void setTrace(String trace)
public String getMessageHistory()
@Metadata(javaType="java.lang.Boolean", defaultValue="true") public void setMessageHistory(String messageHistory)
public String getLogMask()
@Metadata(javaType="java.lang.Boolean") public void setLogMask(String logMask)
public String getDelayer()
@Metadata(javaType="java.lang.Long") public void setDelayer(String delayer)
public String getAutoStartup()
@Metadata(javaType="java.lang.Boolean", defaultValue="true") public void setAutoStartup(String autoStartup)
public Integer getStartupOrder()
@Metadata(javaType="java.lang.Integer") public void setStartupOrder(Integer startupOrder)
public void setErrorHandlerRef(String errorHandlerRef)
public String getErrorHandlerRef()
public void setErrorHandlerFactoryIfNull(org.apache.camel.ErrorHandlerFactory errorHandlerFactory)
public void setRoutePolicyRef(String routePolicyRef)
RoutePolicy
to use by the route. Multiple policies can be
configured by separating values using comma.public String getRoutePolicyRef()
RoutePolicy
to use by the route. Multiple policies can be
configured by separating values using comma.public List<org.apache.camel.spi.RoutePolicy> getRoutePolicies()
public void setRoutePolicies(List<org.apache.camel.spi.RoutePolicy> routePolicies)
public String getShutdownRoute()
@Metadata(javaType="org.apache.camel.ShutdownRoute", defaultValue="Default", enums="Default,Defer") public void setShutdownRoute(String shutdownRoute)
public String getShutdownRunningTask()
@Metadata(javaType="org.apache.camel.ShutdownRunningTask", defaultValue="CompleteCurrentTaskOnly", enums="CompleteCurrentTaskOnly,CompleteAllTasks") public void setShutdownRunningTask(String shutdownRunningTask)
public org.apache.camel.ErrorHandlerFactory getErrorHandlerFactory()
public void setErrorHandlerFactory(org.apache.camel.ErrorHandlerFactory errorHandlerFactory)
public void setRest(Boolean rest)
public Boolean isRest()
public void setTemplate(Boolean template)
public Boolean isTemplate()
public RestDefinition getRestDefinition()
public void setRestDefinition(RestDefinition restDefinition)
public RestBindingDefinition getRestBindingDefinition()
public void setRestBindingDefinition(RestBindingDefinition restBindingDefinition)
public boolean isContextScopedErrorHandler()
public void setInputType(InputTypeDefinition inputType)
public InputTypeDefinition getInputType()
public void setOutputType(OutputTypeDefinition outputType)
public OutputTypeDefinition getOutputType()
public List<PropertyDefinition> getRouteProperties()
@Metadata(label="advanced") public void setRouteProperties(List<PropertyDefinition> routeProperties)
public static RouteDefinition fromUri(String uri)
public static RouteDefinition fromEndpoint(org.apache.camel.Endpoint endpoint)
Apache Camel