org.apache.camel.spring
Class SpringCamelContext
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.impl.DefaultCamelContext
org.apache.camel.spring.SpringCamelContext
- All Implemented Interfaces:
- EventListener, CamelContext, RuntimeConfiguration, Service, DisposableBean, InitializingBean, ApplicationContextAware, ApplicationListener
public class SpringCamelContext
- extends DefaultCamelContext
- implements InitializingBean, DisposableBean, ApplicationContextAware, ApplicationListener
A Spring aware implementation of CamelContext
which
will automatically register itself with Springs lifecycle methods plus allows
spring to be used to customize a any Type Converters
as well as supporting accessing components and beans via the Spring
ApplicationContext
- Version:
- $Revision: 833859 $
Methods inherited from class org.apache.camel.impl.DefaultCamelContext |
addComponent, addEndpoint, addEndpointToRegistry, addInterceptStrategy, addLifecycleStrategy, addRegisterEndpointCallback, addRouteDefinitions, addRoutes, addService, createComponentResolver, createConsumerTemplate, createEndpoint, createManagementStrategy, createProducerTemplate, createTypeConverter, disableJMX, doStop, forceLazyInitialization, getApplicationContextClassLoader, getClassResolver, getComponent, getComponent, getComponentNames, getComponentResolver, getDataFormatResolver, getDataFormats, getDefaultFactoryFinder, getDefaultTracer, getDelayer, getEndpoint, getEndpoint, getEndpointKey, getEndpointMap, getEndpoints, getEndpoints, getErrorHandlerBuilder, getFactoryFinder, getInflightRepository, getInjector, getInterceptStrategies, getLanguageNames, getLanguageResolver, getLifecycleStrategies, getManagementStrategy, getName, getNodeIdFactory, getOrCreateComponent, getPackageScanClassResolver, getProducerServicePool, getProperties, getRegistry, getRouteDefinition, getRouteDefinitions, getRoutes, getRouteServices, getRouteStartupOrder, getRouteStatus, getRouteStatus, getShutdownRoute, getShutdownRunningTask, getShutdownStrategy, getSingletonEndpoints, getTypeConverter, getTypeConverterRegistry, hasComponent, hasEndpoint, hasService, isAutoCreateComponents, isAutoStartup, isHandleFault, isStreamCaching, isTracing, removeComponent, removeEndpoints, removeRouteDefinition, removeRouteDefinition, removeRouteDefinitions, resolveDataFormat, resolveDataFormatDefinition, resolveLanguage, setApplicationContextClassLoader, setAutoCreateComponents, setAutoStartup, setClassResolver, setComponentResolver, setDataFormatResolver, setDataFormats, setDelayer, setErrorHandlerBuilder, setFactoryFinderResolver, setHandleFault, setInflightRepository, setInjector, setInterceptStrategies, setJndiContext, setLanguageResolver, setLifecycleStrategies, setManagementStrategy, setName, setNodeIdFactory, setPackageScanClassResolver, setProducerServicePool, setProperties, setRegistry, setRoutes, setShutdownRoute, setShutdownRunningTask, setShutdownStrategy, setStreamCaching, setTracing, setTypeConverter, setTypeConverterRegistry, shouldStartRoutes, start, startRoute, startRoute, startRouteDefinitions, startRouteService, stopRoute, stopRoute |
Methods inherited from interface org.apache.camel.Service |
stop |
SpringCamelContext
public SpringCamelContext()
SpringCamelContext
public SpringCamelContext(ApplicationContext applicationContext)
springCamelContext
public static SpringCamelContext springCamelContext(ApplicationContext applicationContext)
throws Exception
- Throws:
Exception
springCamelContext
public static SpringCamelContext springCamelContext(String configLocations)
throws Exception
- Throws:
Exception
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Throws:
Exception
destroy
public void destroy()
throws Exception
- Specified by:
destroy
in interface DisposableBean
- Throws:
Exception
onApplicationEvent
public void onApplicationEvent(ApplicationEvent event)
- Specified by:
onApplicationEvent
in interface ApplicationListener
getApplicationContext
public ApplicationContext getApplicationContext()
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException
- Specified by:
setApplicationContext
in interface ApplicationContextAware
- Throws:
BeansException
getEventEndpoint
public EventEndpoint getEventEndpoint()
setEventEndpoint
public void setEventEndpoint(EventEndpoint eventEndpoint)
doStart
protected void doStart()
throws Exception
- Overrides:
doStart
in class DefaultCamelContext
- Throws:
Exception
createInjector
protected Injector createInjector()
- Overrides:
createInjector
in class DefaultCamelContext
createEventEndpoint
protected EventEndpoint createEventEndpoint()
convertBeanToEndpoint
protected Endpoint convertBeanToEndpoint(String uri,
Object bean)
- Overrides:
convertBeanToEndpoint
in class DefaultCamelContext
createRegistry
protected Registry createRegistry()
- Overrides:
createRegistry
in class DefaultCamelContext
toString
public String toString()
- Overrides:
toString
in class DefaultCamelContext
Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.