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:
- CamelContext, RuntimeConfiguration, Service, ShutdownableService, SuspendableService, DisposableBean, InitializingBean, ApplicationContextAware
- Direct Known Subclasses:
- OsgiSpringCamelContext
public class SpringCamelContext
- extends DefaultCamelContext
- implements InitializingBean, DisposableBean, ApplicationContextAware
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: 930219 $
Methods inherited from class org.apache.camel.impl.DefaultCamelContext |
addComponent, addEndpoint, addEndpointToRegistry, addInterceptStrategy, addLifecycleStrategy, addRegisterEndpointCallback, addRouteDefinition, addRouteDefinitions, addRoutes, addService, addStartupListener, createComponentResolver, createConsumerTemplate, createConsumerTemplate, createEndpoint, createManagementStrategy, createProducerTemplate, createProducerTemplate, createTypeConverter, disableJMX, doResume, doStartOrResumeRoutes, doStop, doSuspend, forceLazyInitialization, forceStopLazyInitialization, getApplicationContextClassLoader, getClassResolver, getComponent, getComponent, getComponentNames, getComponentResolver, getDataFormatResolver, getDataFormats, getDebugger, getDefaultFactoryFinder, getDefaultTracer, getDelayer, getEndpoint, getEndpoint, getEndpointKey, getEndpointMap, getEndpoints, getErrorHandlerBuilder, getExecutorServiceStrategy, getFactoryFinder, getInflightRepository, getInjector, getInterceptStrategies, getLanguageNames, getLanguageResolver, getLifecycleStrategies, getManagementStrategy, getName, getNameStrategy, getNodeIdFactory, getPackageScanClassResolver, getProcessorFactory, getProducerServicePool, getProperties, getRegistry, getRoute, getRouteDefinition, getRouteDefinitions, getRoutes, getRouteServices, getRouteStartupOrder, getRouteStatus, getShutdownRoute, getShutdownRunningTask, getShutdownStrategy, getTypeConverter, getTypeConverterRegistry, getUptime, getUuidGenerator, hasComponent, hasEndpoint, hasService, isAutoCreateComponents, isAutoStartup, isHandleFault, isLazyLoadTypeConverters, isStreamCaching, isTracing, removeComponent, removeEndpoints, removeRoute, removeRouteDefinition, removeRouteDefinition, removeRouteDefinitions, resolveDataFormat, resolveDataFormatDefinition, resolveLanguage, resolvePropertyPlaceholders, resumeRoute, resumeRouteService, routeSupportsSuspension, safelyStartRouteServices, safelyStartRouteServices, setApplicationContextClassLoader, setAutoCreateComponents, setAutoStartup, setClassResolver, setComponentResolver, setContextCounter, setDataFormatResolver, setDataFormats, setDebugger, setDefaultTracer, setDelayer, setErrorHandlerBuilder, setExecutorServiceStrategy, setFactoryFinderResolver, setHandleFault, setInflightRepository, setInjector, setInterceptStrategies, setJndiContext, setLanguageResolver, setLazyLoadTypeConverters, setLifecycleStrategies, setManagementStrategy, setName, setNameStrategy, setNodeIdFactory, setPackageScanClassResolver, setProcessorFactory, setProducerServicePool, setProperties, setRegistry, setRoutes, setShutdownRoute, setShutdownRunningTask, setShutdownStrategy, setStreamCaching, setTracing, setTypeConverter, setTypeConverterRegistry, setUuidGenerator, shouldStartRoutes, shutdownRoute, shutdownRoute, shutdownRouteService, start, startRoute, startRoute, startRouteDefinitions, startRouteService, stopRoute, stopRoute, stopRoute, stopRouteService, suspendRoute, suspendRoute, suspendRouteService |
Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, stop, suspend |
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)
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
Apache CAMEL