public abstract class AbstractExtensionConfigurationLoader extends Object implements org.springframework.context.ApplicationContextAware, org.apache.camel.CamelContextAware
loadExtensions(String...)
.
If isAutoRouteAdding()
is true then route definitions which extends AbstractExtRoute
)
will be automatically added to CamelContext
.
ClassPathXmlApplicationContext
Modifier | Constructor and Description |
---|---|
protected |
AbstractExtensionConfigurationLoader()
Creates new configuration loader.
|
protected |
AbstractExtensionConfigurationLoader(org.springframework.context.ApplicationContext parentContext,
org.apache.camel.CamelContext camelContext)
Creates new configuration loader.
|
Modifier and Type | Method and Description |
---|---|
org.apache.camel.CamelContext |
getCamelContext() |
boolean |
isAutoRouteAdding()
Returns whether automatically detect Camel routes (those which extends
AbstractExtRoute ) and add them
to Camel context. |
protected void |
loadExtensions(String... extConfigLocations)
Loads Spring configuration files.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext parentContext)
Sets parent Spring application context.
|
void |
setAutoRouteAdding(boolean autoRouteAdding)
Sets whether automatically detect Camel routes (those which extends
AbstractExtRoute ) and add them
to Camel context. |
void |
setCamelContext(org.apache.camel.CamelContext camelContext)
Sets Camel context.
|
protected AbstractExtensionConfigurationLoader()
protected AbstractExtensionConfigurationLoader(org.springframework.context.ApplicationContext parentContext, org.apache.camel.CamelContext camelContext)
parentContext
- the Spring parent contextcamelContext
- the Camel contextprotected final void loadExtensions(String... extConfigLocations)
extConfigLocations
- Extension configuration locationspublic void setApplicationContext(org.springframework.context.ApplicationContext parentContext)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
parentContext
- the application contextpublic void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext
in interface org.apache.camel.CamelContextAware
camelContext
- the Camel contextpublic org.apache.camel.CamelContext getCamelContext()
getCamelContext
in interface org.apache.camel.CamelContextAware
public boolean isAutoRouteAdding()
AbstractExtRoute
) and add them
to Camel context.true
for automatic adding routes, otherwise false
public void setAutoRouteAdding(boolean autoRouteAdding)
AbstractExtRoute
) and add them
to Camel context.
There is possibility to create own Camel context for specific extension and then it's not suitable to add routes automatically.
Default value is true
.
autoRouteAdding
- true
for automatic adding routes, otherwise false
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.