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 List<InterceptFromDefinition>
getInterceptFroms()
List<InterceptDefinition>
getIntercepts()
List<InterceptSendToEndpointDefinition>
getInterceptSendTos()
String
getLabel()
List<OnCompletionDefinition>
getOnCompletions()
List<OnExceptionDefinition>
getOnExceptions()
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.String
getShortName()
InterceptDefinition
intercept()
Adds a route for an interceptor that intercepts every processing step.InterceptFromDefinition
interceptFrom()
Adds a route for an interceptor that intercepts incoming messages on any inputs in this routeInterceptFromDefinition
interceptFrom(String uri)
Adds a route for an interceptor that intercepts incoming messages on the given endpoint.InterceptSendToEndpointDefinition
interceptSendToEndpoint(String uri)
Applies a route for an interceptor if an exchange is send to the given endpointOnCompletionDefinition
onCompletion()
On completion callback for doing custom routing when theExchange
is complete.OnExceptionDefinition
onException(Class<? extends Throwable> exceptionType)
Exception clause for catching certain exceptions and handling them.OnExceptionDefinition
onException(Class<? extends Throwable>... exceptions)
Exception clause for catching certain exceptions and handling them.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.void
setInterceptFroms(List<InterceptFromDefinition> interceptFroms)
void
setIntercepts(List<InterceptDefinition> intercepts)
void
setInterceptSendTos(List<InterceptSendToEndpointDefinition> interceptSendTos)
void
setOnCompletions(List<OnCompletionDefinition> onCompletions)
void
setOnExceptions(List<OnExceptionDefinition> onExceptions)
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.String
toString()
-
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:
getShortName
in interfaceorg.apache.camel.NamedNode
-
getLabel
public String getLabel()
- Specified by:
getLabel
in interfaceorg.apache.camel.NamedNode
-
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:
getPrecondition
in 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:
setPrecondition
in interfacePreconditionContainer
-
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 theExchange
is 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
-
-