public abstract class SpringRouteBuilder extends org.apache.camel.builder.RouteBuilder implements ApplicationContextAware
RouteBuilder
to provide some additional helper
methodsConstructor and Description |
---|
SpringRouteBuilder() |
Modifier and Type | Method and Description |
---|---|
ApplicationContext |
getApplicationContext()
Returns the application context which has been configured via the
setApplicationContext(ApplicationContext) method or from the
underlying SpringCamelContext |
<T> T |
lookup(Class<T> type)
Looks up the bean with the given type in the application context and
returns it, or throws an exception if the bean is not present or there
are multiple possible beans to choose from for the given type
|
<T> T |
lookup(String beanName,
Class<T> type)
Looks up the bean with the given name in the application context and
returns it, or throws an exception if the bean is not present or is not
of the given type
|
void |
setApplicationContext(ApplicationContext applicationContext)
Sets the application context to use to lookup beans
|
TransactionErrorHandlerBuilder |
transactionErrorHandler()
Creates a transaction error handler that will lookup in application context for
an exiting transaction manager.
|
TransactionErrorHandlerBuilder |
transactionErrorHandler(PlatformTransactionManager transactionManager)
Creates a transaction error handler.
|
TransactionErrorHandlerBuilder |
transactionErrorHandler(SpringTransactionPolicy policy)
Creates a transaction error handler.
|
TransactionErrorHandlerBuilder |
transactionErrorHandler(TransactionTemplate template)
Creates a transaction error handler.
|
addRoutes, addRoutesToCamelContext, checkInitialized, configure, configureRest, configureRests, configureRoute, configureRoutes, createContainer, errorHandler, from, from, from, from, fromF, getContext, getRestCollection, getRestConfigurations, getRouteCollection, includeRoutes, intercept, interceptFrom, interceptFrom, interceptSendToEndpoint, onCompletion, onException, onException, populateRests, populateRoutes, populateTransformers, populateValidators, propertyInject, rest, rest, restConfiguration, restConfiguration, setErrorHandlerBuilder, setRestCollection, setRouteCollection, toString, transformer, validator
bean, bean, bean, bean, body, body, bodyAs, constant, createErrorHandlerBuilder, deadLetterChannel, deadLetterChannel, defaultErrorHandler, endpoint, endpoint, endpoints, endpoints, exceptionMessage, exchangeProperty, faultBody, faultBodyAs, getErrorHandlerBuilder, header, jsonpath, jsonpath, language, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, method, method, method, method, noErrorHandler, outBody, outBody, property, regexReplaceAll, regexReplaceAll, sendTo, setContext, setContext, simple, simple, simpleF, simpleF, systemProperty, systemProperty, xpath, xpath
public SpringRouteBuilder()
public <T> T lookup(String beanName, Class<T> type)
beanName
- the name of the bean in the application contexttype
- the type of the beanpublic <T> T lookup(Class<T> type)
type
- the type of the beanpublic ApplicationContext getApplicationContext()
setApplicationContext(ApplicationContext)
method or from the
underlying SpringCamelContext
public void setApplicationContext(ApplicationContext applicationContext)
setApplicationContext
in interface ApplicationContextAware
public TransactionErrorHandlerBuilder transactionErrorHandler()
public TransactionErrorHandlerBuilder transactionErrorHandler(SpringTransactionPolicy policy)
policy
- using this transaction policy (eg: required, supports, ...)public TransactionErrorHandlerBuilder transactionErrorHandler(TransactionTemplate template)
template
- the spring transaction templatepublic TransactionErrorHandlerBuilder transactionErrorHandler(PlatformTransactionManager transactionManager)
transactionManager
- the spring transaction managerApache Camel