public class SpringCamelContext
extends org.apache.camel.impl.DefaultCamelContext
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware
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
Constructor and Description |
---|
SpringCamelContext() |
SpringCamelContext(org.springframework.context.ApplicationContext applicationContext) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected org.apache.camel.Endpoint |
convertBeanToEndpoint(String uri,
Object bean) |
protected EventEndpoint |
createEventEndpoint() |
protected org.apache.camel.spi.Injector |
createInjector() |
protected org.apache.camel.spi.ManagementMBeanAssembler |
createManagementMBeanAssembler() |
protected org.apache.camel.spi.Registry |
createRegistry() |
void |
destroy() |
protected void |
doStart() |
org.springframework.context.ApplicationContext |
getApplicationContext() |
EventEndpoint |
getEventEndpoint() |
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setEventEndpoint(EventEndpoint eventEndpoint) |
static void |
setNoStart(boolean b) |
static SpringCamelContext |
springCamelContext(org.springframework.context.ApplicationContext applicationContext) |
static SpringCamelContext |
springCamelContext(org.springframework.context.ApplicationContext applicationContext,
boolean maybeStart) |
static SpringCamelContext |
springCamelContext(String configLocations) |
String |
toString() |
addComponent, addEndpoint, addEndpointToRegistry, addInterceptStrategy, addLifecycleStrategy, addRegisterEndpointCallback, addRouteDefinition, addRouteDefinitions, addRoutes, addService, addStartupListener, createComponentResolver, createConsumerTemplate, createConsumerTemplate, createEndpoint, createManagementStrategy, createProducerTemplate, createProducerTemplate, createTypeConverter, disableJMX, doResume, doStartOrResumeRoutes, doStop, doSuspend, findComponents, forceLazyInitialization, forceStopLazyInitialization, getApplicationContextClassLoader, getClassResolver, getComponent, getComponent, getComponent, getComponentDocumentation, getComponentNames, getComponentResolver, getDataFormatResolver, getDataFormats, getDebugger, getDefaultBacklogDebugger, getDefaultBacklogTracer, getDefaultFactoryFinder, getDefaultTracer, getDelayer, getEndpoint, getEndpoint, getEndpointKey, getEndpointKey, getEndpointMap, getEndpoints, getErrorHandlerBuilder, getErrorHandlerExecutorService, getExecutorServiceManager, getExecutorServiceStrategy, getFactoryFinder, getInflightRepository, getInjector, getInterceptStrategies, getLanguageNames, getLanguageResolver, getLifecycleStrategies, getManagementMBeanAssembler, getManagementName, getManagementNameStrategy, getManagementStrategy, getName, getNameStrategy, getNodeIdFactory, getPackageScanClassResolver, getProcessorFactory, getProducerServicePool, getProperties, getPropertiesComponent, getProperty, getPropertyPrefixToken, getPropertySuffixToken, getRegistry, getRoute, getRouteDefinition, getRouteDefinitions, getRoutes, getRouteServices, getRouteStartupOrder, getRouteStatus, getShutdownRoute, getShutdownRunningTask, getShutdownStrategy, getStreamCachingStrategy, getTypeConverter, getTypeConverterRegistry, getUptime, getUuidGenerator, hasComponent, hasEndpoint, hasService, isAutoCreateComponents, isAutoStartup, isHandleFault, isLazyLoadTypeConverters, isMessageHistory, isStartingRoutes, isStreamCaching, isTracing, isTypeConverterStatisticsEnabled, isUseBreadcrumb, isUseMDCLogging, loadRoutesDefinition, logRouteState, lookupPropertiesComponent, normalizeEndpointUri, removeComponent, removeEndpoints, removeRoute, removeRouteDefinition, removeRouteDefinition, removeRouteDefinitions, removeService, resolveDataFormat, resolveDataFormatDefinition, resolveLanguage, resolvePropertyPlaceholders, resumeRoute, resumeRouteService, routeSupportsSuspension, safelyStartRouteServices, safelyStartRouteServices, setApplicationContextClassLoader, setAutoCreateComponents, setAutoStartup, setClassResolver, setComponentResolver, setContextCounter, setDataFormatResolver, setDataFormats, setDebugger, setDefaultBacklogDebugger, setDefaultBacklogTracer, setDefaultTracer, setDelayer, setErrorHandlerBuilder, setExecutorServiceManager, setFactoryFinderResolver, setHandleFault, setInflightRepository, setInjector, setInterceptStrategies, setJndiContext, setLanguageResolver, setLazyLoadTypeConverters, setLifecycleStrategies, setManagementMBeanAssembler, setManagementName, setManagementNameStrategy, setManagementStrategy, setMessageHistory, setName, setNameStrategy, setNodeIdFactory, setPackageScanClassResolver, setProcessorFactory, setProducerServicePool, setProperties, setRegistry, setRoutes, setShutdownRoute, setShutdownRunningTask, setShutdownStrategy, setStreamCaching, setStreamCachingStrategy, setTracing, setTypeConverter, setTypeConverterRegistry, setTypeConverterStatisticsEnabled, setUseBreadcrumb, setUseMDCLogging, setUuidGenerator, shouldStartRoutes, shutdownRoute, shutdownRoute, shutdownRouteService, start, startRoute, startRoute, startRouteDefinitions, startRouteService, stopRoute, stopRoute, stopRoute, stopRoute, stopRouteService, stopRouteService, suspendRoute, suspendRoute, suspendRouteService
doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, stop, suspend
public SpringCamelContext()
public SpringCamelContext(org.springframework.context.ApplicationContext applicationContext)
public static void setNoStart(boolean b)
public static SpringCamelContext springCamelContext(org.springframework.context.ApplicationContext applicationContext) throws Exception
Exception
public static SpringCamelContext springCamelContext(org.springframework.context.ApplicationContext applicationContext, boolean maybeStart) throws Exception
Exception
public static SpringCamelContext springCamelContext(String configLocations) throws Exception
Exception
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public void destroy() throws Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
public org.springframework.context.ApplicationContext getApplicationContext()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public EventEndpoint getEventEndpoint()
public void setEventEndpoint(EventEndpoint eventEndpoint)
protected void doStart() throws Exception
doStart
in class org.apache.camel.impl.DefaultCamelContext
Exception
protected org.apache.camel.spi.Injector createInjector()
createInjector
in class org.apache.camel.impl.DefaultCamelContext
protected org.apache.camel.spi.ManagementMBeanAssembler createManagementMBeanAssembler()
createManagementMBeanAssembler
in class org.apache.camel.impl.DefaultCamelContext
protected EventEndpoint createEventEndpoint()
protected org.apache.camel.Endpoint convertBeanToEndpoint(String uri, Object bean)
convertBeanToEndpoint
in class org.apache.camel.impl.DefaultCamelContext
protected org.apache.camel.spi.Registry createRegistry()
createRegistry
in class org.apache.camel.impl.DefaultCamelContext
public String toString()
toString
in class org.apache.camel.impl.DefaultCamelContext
Apache Camel