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, Service, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener
public class SpringCamelContext
- extends DefaultCamelContext
- implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware, org.springframework.context.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: 781349 $
Methods inherited from class org.apache.camel.impl.DefaultCamelContext |
addComponent, addEndpoint, addEndpointToRegistry, addInterceptStrategy, addRegisterEndpointCallback, addRouteDefinitions, addRoutes, addService, addSingletonEndpoint, createComponentResolver, createConsumerTemplate, createEndpoint, createExchangeConverter, createProducerTemplate, createTypeConverter, doStop, forceLazyInitialization, getClassResolver, getComponent, getComponent, getComponentNames, getComponentResolver, getDataFormats, getDefaultFactoryFinder, getDelay, getEndpoint, getEndpoint, getEndpointKey, getEndpointMap, getEndpoints, getEndpoints, getErrorHandlerBuilder, getExchangeConverter, getFactoryFinder, getHandleFault, getInjector, getInterceptStrategies, getLanguageNames, getLanguageResolver, getLifecycleStrategy, getName, getOrCreateComponent, getPackageScanClassResolver, getProducerServicePool, getProperties, getRegistry, getRouteDefinitions, getRoutes, getRouteServices, getRouteStatus, getRouteStatus, getSingletonEndpoints, getStreamCaching, getTrace, getTypeConverter, getTypeConverterRegistry, isAutoCreateComponents, isDelayEnabled, isHandleFaultEnabled, isStreamCacheEnabled, isTraceEnabled, removeComponent, removeEndpoints, removeRouteDefinition, removeRouteDefinition, removeRouteDefinitions, removeSingletonEndpoint, resolveLanguage, setAutoCreateComponents, setClassResolver, setComponentResolver, setDataFormats, setDelay, setErrorHandlerBuilder, setExchangeConverter, setFactoryFinderResolver, setHandleFault, setInjector, setInterceptStrategies, setJndiContext, setLanguageResolver, setLifecycleStrategy, setName, setPackageScanClassResolver, setProducerServicePool, setProperties, setRegistry, setRoutes, setStreamCaching, setTrace, setTypeConverter, setTypeConverterRegistry, shouldStartRoutes, start, startRoute, startRouteDefinitions, startRouteService, stopRoute, stopRoute |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.camel.Service |
stop |
SpringCamelContext
public SpringCamelContext()
SpringCamelContext
public SpringCamelContext(org.springframework.context.ApplicationContext applicationContext)
springCamelContext
public static SpringCamelContext springCamelContext(org.springframework.context.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 org.springframework.beans.factory.InitializingBean
- Throws:
Exception
destroy
public void destroy()
throws Exception
- Specified by:
destroy
in interface org.springframework.beans.factory.DisposableBean
- Throws:
Exception
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
- Specified by:
onApplicationEvent
in interface org.springframework.context.ApplicationListener
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
getEventEndpoint
public EventEndpoint getEventEndpoint()
setEventEndpoint
public void setEventEndpoint(EventEndpoint eventEndpoint)
doStart
protected void doStart()
throws Exception
- Overrides:
doStart
in class DefaultCamelContext
- Throws:
Exception
maybeDoStart
protected void maybeDoStart()
throws Exception
- 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
setShouldStartContext
public void setShouldStartContext(boolean shouldStartContext)
getShouldStartContext
public boolean getShouldStartContext()
Copyright © 2009 Apache Software Foundation. All Rights Reserved.