org.apache.camel.spring
Class SpringRouteBuilder
java.lang.Object
org.apache.camel.builder.BuilderSupport
org.apache.camel.builder.RouteBuilder
org.apache.camel.spring.SpringRouteBuilder
- All Implemented Interfaces:
- Routes
public abstract class SpringRouteBuilder
- extends RouteBuilder
An extension of the RouteBuilder
to provide some additional helper
methods
- Version:
- $Revision: 36646 $
Method Summary |
|
bean(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 |
|
bean(Class<T> type,
String beanName)
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 |
org.springframework.context.ApplicationContext |
getApplicationContext()
Returns the application context which has been configured via the
setApplicationContext(ApplicationContext) method or from the
underlying SpringCamelContext |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Sets the application context to use to lookup beans |
TransactionInterceptor |
transactionInterceptor()
|
Methods inherited from class org.apache.camel.builder.RouteBuilder |
checkInitialized, configure, configureRoute, createContainer, errorHandler, exception, from, from, getContext, getRouteCollection, getRouteList, inheritErrorHandler, intercept, intercept, intercept, noStreamCaching, populateRoutes, setErrorHandlerBuilder, setInheritErrorHandler, setRouteCollection, streamCaching, toString |
Methods inherited from class org.apache.camel.builder.BuilderSupport |
body, body, constant, createErrorHandlerBuilder, deadLetterChannel, deadLetterChannel, deadLetterChannel, endpoint, endpoint, endpoints, endpoints, faultBody, faultBodyAs, getErrorHandlerBuilder, header, isInheritErrorHandler, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, noErrorHandler, outBody, outBody, setContext, systemProperty, systemProperty |
SpringRouteBuilder
public SpringRouteBuilder()
transactionInterceptor
public TransactionInterceptor transactionInterceptor()
bean
public <T> T bean(Class<T> type,
String beanName)
- 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
- Parameters:
type
- the type of the beanbeanName
- the name of the bean in the application context
- Returns:
- the bean
bean
public <T> T bean(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
- Parameters:
type
- the type of the bean
- Returns:
- the bean
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()
- Returns the application context which has been configured via the
setApplicationContext(ApplicationContext)
method or from the
underlying SpringCamelContext
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Sets the application context to use to lookup beans
Copyright © 2008 IONA Open Source Community. All Rights Reserved.