Package org.apache.camel.model
Class RouteConfigurationDefinition
java.lang.Object
org.apache.camel.model.OptionalIdentifiedDefinition<RouteConfigurationDefinition>
org.apache.camel.model.RouteConfigurationDefinition
- All Implemented Interfaces:
org.apache.camel.CamelContextAware,org.apache.camel.LineNumberAware,PreconditionContainer,org.apache.camel.NamedNode,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.HasId,org.apache.camel.spi.IdAware
@Metadata(label="configuration")
public class RouteConfigurationDefinition
extends OptionalIdentifiedDefinition<RouteConfigurationDefinition>
implements PreconditionContainer
Reusable configuration for Camel route(s).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionerrorHandler(String ref) Sets the error handler to use, for routes that has not already been configured with an error handler.errorHandler(org.apache.camel.ErrorHandlerFactory errorHandler) Sets the error handler to use, for routes that has not already been configured with an error handler.getLabel()The predicate of the precondition in simple language to evaluate in order to determine if this route configuration should be included or not.Adds a route for an interceptor that intercepts every processing step.Adds a route for an interceptor that intercepts incoming messages on any inputs in this routeinterceptFrom(String uri) Adds a route for an interceptor that intercepts incoming messages on the given endpoint.Applies a route for an interceptor if an exchange is send to the given endpointOn completion callback for doing custom routing when theExchangeis complete.onException(Class<? extends Throwable> exceptionType) Exception clause for catching certain exceptions and handling them.onException(Class<? extends Throwable>... exceptions) Exception clause for catching certain exceptions and handling them.precondition(String precondition) Sets the predicate of the precondition in simple language to evaluate in order to determine if this route configuration should be included or not.voidsetErrorHandler(ErrorHandlerDefinition errorHandler) voidsetInterceptFroms(List<InterceptFromDefinition> interceptFroms) voidsetIntercepts(List<InterceptDefinition> intercepts) voidsetInterceptSendTos(List<InterceptSendToEndpointDefinition> interceptSendTos) voidsetOnCompletions(List<OnCompletionDefinition> onCompletions) voidsetOnExceptions(List<OnExceptionDefinition> onExceptions) voidsetPrecondition(String precondition) The predicate of the precondition in simple language to evaluate in order to determine if this route configuration should be included or not.toString()Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, getCamelContext, getCustomId, getDescription, getDescriptionText, getId, getLineNumber, getLocation, getParent, hasCustomIdAssigned, id, idOrCreate, setCamelContext, setCustomId, setDescription, setGeneratedId, setId, setLineNumber, setLocationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.LineNumberAware
getLineNumber, getLocation, setLineNumber, setLocationMethods inherited from interface org.apache.camel.NamedNode
getDescriptionText, getId, getParent
-
Constructor Details
-
RouteConfigurationDefinition
public RouteConfigurationDefinition()
-
-
Method Details
-
toString
-
getShortName
- Specified by:
getShortNamein interfaceorg.apache.camel.NamedNode
-
getLabel
- Specified by:
getLabelin interfaceorg.apache.camel.NamedNode
-
getErrorHandler
-
setErrorHandler
-
getOnExceptions
-
setOnExceptions
-
getOnCompletions
-
setOnCompletions
-
getIntercepts
-
setIntercepts
-
getInterceptFroms
-
setInterceptFroms
-
getInterceptSendTos
-
setInterceptSendTos
-
getPrecondition
The predicate of the precondition in simple language to evaluate in order to determine if this route configuration should be included or not.- Specified by:
getPreconditionin interfacePreconditionContainer
-
setPrecondition
The predicate of the precondition in simple language to evaluate in order to determine if this route configuration should be included or not.- Specified by:
setPreconditionin interfacePreconditionContainer
-
errorHandler
Sets the error handler to use, for routes that has not already been configured with an error handler.- Parameters:
ref- reference to existing error handler- Returns:
- the builder
-
errorHandler
Sets the error handler to use, for routes that has not already been configured with an error handler.- Parameters:
errorHandler- the error handler- Returns:
- the builder
-
precondition
Sets the predicate of the precondition in simple language to evaluate in order to determine if this route configuration should be included or not.- Parameters:
precondition- the predicate corresponding to the test to evaluate.- Returns:
- the builder
-
onException
Exception clause for catching certain exceptions and handling them.- Parameters:
exceptionType- the exception to catch- Returns:
- the exception builder to configure
-
onException
Exception clause for catching certain exceptions and handling them.- Parameters:
exceptions- list of exceptions to catch- Returns:
- the exception builder to configure
-
onCompletion
On completion callback for doing custom routing when theExchangeis complete.- Returns:
- the on completion builder to configure
-
intercept
Adds a route for an interceptor that intercepts every processing step.- Returns:
- the builder
-
interceptFrom
Adds a route for an interceptor that intercepts incoming messages on any inputs in this route- Returns:
- the builder
-
interceptFrom
Adds a route for an interceptor that intercepts incoming messages on the given endpoint.- Parameters:
uri- endpoint uri- Returns:
- the builder
-
interceptSendToEndpoint
Applies a route for an interceptor if an exchange is send to the given endpoint- Parameters:
uri- endpoint uri- Returns:
- the builder
-