public abstract class BaseMainSupport
extends org.apache.camel.support.service.BaseService
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.camel.CamelContext |
camelContext |
static String |
DEFAULT_PROPERTY_PLACEHOLDER_LOCATION |
protected String |
defaultPropertyPlaceholderLocation |
static String |
INITIAL_PROPERTIES_LOCATION |
protected Properties |
initialProperties |
protected List<MainListener> |
listeners |
protected MainConfigurationProperties |
mainConfigurationProperties |
static String |
OVERRIDE_PROPERTIES_LOCATION |
protected Properties |
overrideProperties |
static String |
PROPERTY_PLACEHOLDER_LOCATION |
protected String |
propertyPlaceholderLocations |
protected RoutesCollector |
routesCollector |
protected boolean |
standalone |
protected Properties |
wildcardProperties |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseMainSupport() |
protected |
BaseMainSupport(org.apache.camel.CamelContext camelContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInitialProperty(String key,
String value)
Adds a initial property for the properties component, which will be used before any locations are resolved.
|
void |
addMainListener(MainListener listener)
Adds a
MainListener to receive callbacks when the main is started or stopping |
void |
addOverrideProperty(String key,
String value)
Adds an override property that take precedence and will use first, if a property exist.
|
void |
addProperty(String key,
String value)
Adds a property (initial) for the properties component, which will be used before any locations are resolved.
|
protected void |
autoConfigurationFailFast(org.apache.camel.CamelContext camelContext,
Map<String,String> autoConfiguredProperties) |
protected void |
autoConfigurationFromProperties(org.apache.camel.CamelContext camelContext,
Map<String,String> autoConfiguredProperties) |
protected void |
autoConfigurationMainConfiguration(org.apache.camel.CamelContext camelContext,
MainConfigurationProperties config,
Map<String,String> autoConfiguredProperties) |
protected void |
autoConfigurationPropertiesComponent(org.apache.camel.CamelContext camelContext,
Map<String,String> autoConfiguredProperties) |
protected void |
autoconfigure(org.apache.camel.CamelContext camelContext) |
protected void |
autowireWildcardProperties(org.apache.camel.CamelContext camelContext) |
MainConfigurationProperties |
configure()
To configure options on Camel Main.
|
protected void |
configureLifecycle(org.apache.camel.CamelContext camelContext) |
protected void |
configurePropertiesService(org.apache.camel.CamelContext camelContext) |
protected void |
configureRoutes(org.apache.camel.CamelContext camelContext) |
protected void |
configureStartupRecorder(org.apache.camel.CamelContext camelContext) |
protected void |
doAutowireWildcardProperties(String name,
org.apache.camel.Component component) |
protected void |
doConfigureCamelContextFromMainConfiguration(org.apache.camel.CamelContext camelContext,
MainConfigurationProperties config,
Map<String,String> autoConfiguredProperties)
Configures CamelContext from the
MainConfigurationProperties properties. |
org.apache.camel.CamelContext |
getCamelContext() |
String |
getDefaultPropertyPlaceholderLocation() |
Properties |
getInitialProperties() |
Properties |
getOverrideProperties() |
String |
getPropertyPlaceholderLocations() |
RoutesCollector |
getRoutesCollector() |
boolean |
isAutoConfigurationEnabled()
Deprecated.
|
protected void |
loadConfigurations(org.apache.camel.CamelContext camelContext) |
protected void |
postProcessCamelContext(org.apache.camel.CamelContext camelContext) |
void |
removeMainListener(MainListener listener)
Removes the
MainListener |
void |
setAutoConfigurationEnabled(boolean autoConfigurationEnabled)
Deprecated.
use
configure() |
void |
setDefaultPropertyPlaceholderLocation(String defaultPropertyPlaceholderLocation)
Set the default location for application properties if no locations have been set.
|
void |
setInitialProperties(Map<String,Object> initialProperties)
Sets initial properties for the properties component, which will be used before any locations are resolved.
|
void |
setInitialProperties(Properties initialProperties)
Sets initial properties for the properties component, which will be used before any locations are resolved.
|
void |
setOverrideProperties(Map<String,Object> initialProperties)
Sets a special list of override properties that take precedence and will use first, if a property exist.
|
void |
setOverrideProperties(Properties overrideProperties)
Sets a special list of override properties that take precedence and will use first, if a property exist.
|
void |
setPropertyPlaceholderLocations(String location)
A list of locations to add for loading properties.
|
void |
setRoutesCollector(RoutesCollector routesCollector)
To use a custom
RoutesCollector. |
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic static final String DEFAULT_PROPERTY_PLACEHOLDER_LOCATION
public static final String INITIAL_PROPERTIES_LOCATION
public static final String OVERRIDE_PROPERTIES_LOCATION
public static final String PROPERTY_PLACEHOLDER_LOCATION
protected final List<MainListener> listeners
protected volatile org.apache.camel.CamelContext camelContext
protected MainConfigurationProperties mainConfigurationProperties
protected Properties wildcardProperties
protected RoutesCollector routesCollector
protected String propertyPlaceholderLocations
protected String defaultPropertyPlaceholderLocation
protected Properties initialProperties
protected Properties overrideProperties
protected boolean standalone
protected BaseMainSupport()
protected BaseMainSupport(org.apache.camel.CamelContext camelContext)
public MainConfigurationProperties configure()
public RoutesCollector getRoutesCollector()
public void setRoutesCollector(RoutesCollector routesCollector)
RoutesCollector.public String getPropertyPlaceholderLocations()
public void setPropertyPlaceholderLocations(String location)
public String getDefaultPropertyPlaceholderLocation()
public void setDefaultPropertyPlaceholderLocation(String defaultPropertyPlaceholderLocation)
@Deprecated public boolean isAutoConfigurationEnabled()
@Deprecated public void setAutoConfigurationEnabled(boolean autoConfigurationEnabled)
configure()Registry.bind(String, Object) method or by using the
BindToRegistry annotation style.
This option is default enabled.public Properties getInitialProperties()
public void setInitialProperties(Properties initialProperties)
public void setInitialProperties(Map<String,Object> initialProperties)
public void addProperty(String key, String value)
key - the property keyvalue - the property valueaddInitialProperty(String, String),
addOverrideProperty(String, String)public void addInitialProperty(String key, String value)
key - the property keyvalue - the property valuepublic Properties getOverrideProperties()
public void setOverrideProperties(Properties overrideProperties)
public void setOverrideProperties(Map<String,Object> initialProperties)
public void addOverrideProperty(String key, String value)
key - the property keyvalue - the property valuepublic org.apache.camel.CamelContext getCamelContext()
public void addMainListener(MainListener listener)
MainListener to receive callbacks when the main is started or stoppinglistener - the listenerpublic void removeMainListener(MainListener listener)
MainListenerlistener - the listenerprotected void loadConfigurations(org.apache.camel.CamelContext camelContext)
throws Exception
Exceptionprotected void configurePropertiesService(org.apache.camel.CamelContext camelContext)
throws Exception
Exceptionprotected void configureLifecycle(org.apache.camel.CamelContext camelContext)
throws Exception
Exceptionprotected void autoconfigure(org.apache.camel.CamelContext camelContext)
throws Exception
Exceptionprotected void configureStartupRecorder(org.apache.camel.CamelContext camelContext)
protected void configureRoutes(org.apache.camel.CamelContext camelContext)
throws Exception
Exceptionprotected void postProcessCamelContext(org.apache.camel.CamelContext camelContext)
throws Exception
Exceptionprotected void autoConfigurationFailFast(org.apache.camel.CamelContext camelContext,
Map<String,String> autoConfiguredProperties)
throws Exception
Exceptionprotected void doConfigureCamelContextFromMainConfiguration(org.apache.camel.CamelContext camelContext,
MainConfigurationProperties config,
Map<String,String> autoConfiguredProperties)
throws Exception
MainConfigurationProperties properties.Exceptionprotected void autoConfigurationPropertiesComponent(org.apache.camel.CamelContext camelContext,
Map<String,String> autoConfiguredProperties)
throws Exception
Exceptionprotected void autoConfigurationMainConfiguration(org.apache.camel.CamelContext camelContext,
MainConfigurationProperties config,
Map<String,String> autoConfiguredProperties)
throws Exception
Exceptionprotected void autoConfigurationFromProperties(org.apache.camel.CamelContext camelContext,
Map<String,String> autoConfiguredProperties)
throws Exception
Exceptionprotected void autowireWildcardProperties(org.apache.camel.CamelContext camelContext)
protected void doAutowireWildcardProperties(String name, org.apache.camel.Component component)
Apache Camel