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.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 Constructor Description RouteConfigurationDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RouteConfigurationDefinitionerrorHandler(String ref)Sets the error handler to use, for routes that has not already been configured with an error handler.RouteConfigurationDefinitionerrorHandler(org.apache.camel.ErrorHandlerFactory errorHandler)Sets the error handler to use, for routes that has not already been configured with an error handler.ErrorHandlerDefinitiongetErrorHandler()List<InterceptFromDefinition>getInterceptFroms()List<InterceptDefinition>getIntercepts()List<InterceptSendToEndpointDefinition>getInterceptSendTos()StringgetLabel()List<OnCompletionDefinition>getOnCompletions()List<OnExceptionDefinition>getOnExceptions()StringgetPrecondition()The predicate of the precondition in simple language to evaluate in order to determine if this route configuration should be included or not.StringgetShortName()InterceptDefinitionintercept()Adds a route for an interceptor that intercepts every processing step.InterceptFromDefinitioninterceptFrom()Adds a route for an interceptor that intercepts incoming messages on any inputs in this routeInterceptFromDefinitioninterceptFrom(String uri)Adds a route for an interceptor that intercepts incoming messages on the given endpoint.InterceptSendToEndpointDefinitioninterceptSendToEndpoint(String uri)Applies a route for an interceptor if an exchange is send to the given endpointOnCompletionDefinitiononCompletion()On completion callback for doing custom routing when theExchangeis complete.OnExceptionDefinitiononException(Class<? extends Throwable> exceptionType)Exception clause for catching certain exceptions and handling them.OnExceptionDefinitiononException(Class<? extends Throwable>... exceptions)Exception clause for catching certain exceptions and handling them.RouteConfigurationDefinitionprecondition(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.StringtoString()-
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, description, getCamelContext, getCustomId, getDescription, getDescriptionText, getId, getLineNumber, getLocation, getParent, 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
-
-
-
-
Method Detail
-
getShortName
public String getShortName()
- Specified by:
getShortNamein interfaceorg.apache.camel.NamedNode
-
getLabel
public String getLabel()
- Specified by:
getLabelin interfaceorg.apache.camel.NamedNode
-
getErrorHandler
public ErrorHandlerDefinition getErrorHandler()
-
setErrorHandler
public void setErrorHandler(ErrorHandlerDefinition errorHandler)
-
getOnExceptions
public List<OnExceptionDefinition> getOnExceptions()
-
setOnExceptions
public void setOnExceptions(List<OnExceptionDefinition> onExceptions)
-
getOnCompletions
public List<OnCompletionDefinition> getOnCompletions()
-
setOnCompletions
public void setOnCompletions(List<OnCompletionDefinition> onCompletions)
-
getIntercepts
public List<InterceptDefinition> getIntercepts()
-
setIntercepts
public void setIntercepts(List<InterceptDefinition> intercepts)
-
getInterceptFroms
public List<InterceptFromDefinition> getInterceptFroms()
-
setInterceptFroms
public void setInterceptFroms(List<InterceptFromDefinition> interceptFroms)
-
getInterceptSendTos
public List<InterceptSendToEndpointDefinition> getInterceptSendTos()
-
setInterceptSendTos
public void setInterceptSendTos(List<InterceptSendToEndpointDefinition> interceptSendTos)
-
getPrecondition
public String 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
public void setPrecondition(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.- Specified by:
setPreconditionin interfacePreconditionContainer
-
errorHandler
public RouteConfigurationDefinition errorHandler(String ref)
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
public RouteConfigurationDefinition errorHandler(org.apache.camel.ErrorHandlerFactory 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
public RouteConfigurationDefinition 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.- Parameters:
precondition- the predicate corresponding to the test to evaluate.- Returns:
- the builder
-
onException
public OnExceptionDefinition onException(Class<? extends Throwable> exceptionType)
Exception clause for catching certain exceptions and handling them.- Parameters:
exceptionType- the exception to catch- Returns:
- the exception builder to configure
-
onException
public OnExceptionDefinition onException(Class<? extends Throwable>... exceptions)
Exception clause for catching certain exceptions and handling them.- Parameters:
exceptions- list of exceptions to catch- Returns:
- the exception builder to configure
-
onCompletion
public OnCompletionDefinition onCompletion()
On completion callback for doing custom routing when theExchangeis complete.- Returns:
- the on completion builder to configure
-
intercept
public InterceptDefinition intercept()
Adds a route for an interceptor that intercepts every processing step.- Returns:
- the builder
-
interceptFrom
public InterceptFromDefinition interceptFrom()
Adds a route for an interceptor that intercepts incoming messages on any inputs in this route- Returns:
- the builder
-
interceptFrom
public InterceptFromDefinition interceptFrom(String uri)
Adds a route for an interceptor that intercepts incoming messages on the given endpoint.- Parameters:
uri- endpoint uri- Returns:
- the builder
-
interceptSendToEndpoint
public InterceptSendToEndpointDefinition interceptSendToEndpoint(String uri)
Applies a route for an interceptor if an exchange is send to the given endpoint- Parameters:
uri- endpoint uri- Returns:
- the builder
-
-