public abstract class MainSupport extends BaseMainSupport
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.camel.ProducerTemplate |
camelTemplate |
protected static int |
DEFAULT_EXIT_CODE |
protected AtomicInteger |
exitCode |
protected static org.slf4j.Logger |
LOG |
protected MainShutdownStrategy |
shutdownStrategy |
protected static int |
UNINITIALIZED_EXIT_CODE |
camelContext, DEFAULT_PROPERTY_PLACEHOLDER_LOCATION, defaultPropertyPlaceholderLocation, INITIAL_PROPERTIES_LOCATION, initialProperties, listeners, mainConfigurationProperties, OVERRIDE_PROPERTIES_LOCATION, overrideProperties, PROPERTY_PLACEHOLDER_LOCATION, propertyPlaceholderLocations, routesCollector, standalone, wildcardProperties| Modifier | Constructor and Description |
|---|---|
protected |
MainSupport() |
protected |
MainSupport(Class<?>... configurationClasses) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterStart()
Callback to run custom logic after CamelContext has been started.
|
protected void |
afterStop()
Callback to run custom logic after CamelContext has been stopped.
|
protected void |
beforeStart()
Callback to run custom logic before CamelContext is being started.
|
protected void |
beforeStop()
Callback to run custom logic before CamelContext is being stopped.
|
void |
completed()
Marks this process as being completed.
|
protected void |
configureLifecycle(org.apache.camel.CamelContext camelContext) |
protected abstract org.apache.camel.CamelContext |
createCamelContext() |
protected void |
doStart() |
protected void |
doStop() |
void |
enableTrace() |
void |
enableTraceStandby() |
protected abstract org.apache.camel.ProducerTemplate |
findOrCreateCamelTemplate() |
org.apache.camel.ProducerTemplate |
getCamelTemplate() |
Runnable |
getCompleteTask()
Gets the complete task which allows to trigger this on demand.
|
int |
getDuration()
Deprecated.
|
int |
getDurationHitExitCode()
Deprecated.
|
int |
getDurationIdle()
Deprecated.
|
int |
getDurationMaxMessages()
Deprecated.
|
int |
getExitCode() |
MainShutdownStrategy |
getShutdownStrategy() |
protected void |
initCamelContext() |
boolean |
isTrace() |
void |
run()
Runs this process with the given arguments, and will wait until completed, or the JVM terminates.
|
void |
setDuration(int duration)
Deprecated.
|
void |
setDurationHitExitCode(int durationHitExitCode)
Deprecated.
|
void |
setDurationIdle(int durationIdle)
Deprecated.
|
void |
setDurationMaxMessages(int durationMaxMessages)
Deprecated.
|
void |
setShutdownStrategy(MainShutdownStrategy shutdownStrategy)
Set the
MainShutdownStrategy used to properly shut-down the main instance. |
protected void |
waitUntilCompleted() |
addInitialProperty, addMainListener, addOverrideProperty, addProperty, autoConfigurationFailFast, autoConfigurationFromProperties, autoConfigurationMainConfiguration, autoConfigurationPropertiesComponent, autoconfigure, autowireWildcardProperties, configure, configurePropertiesService, configureRoutes, configureStartupRecorder, doAutowireWildcardProperties, doConfigureCamelContextFromMainConfiguration, getCamelContext, getDefaultPropertyPlaceholderLocation, getInitialProperties, getOverrideProperties, getPropertyPlaceholderLocations, getRoutesCollector, isAutoConfigurationEnabled, loadConfigurations, postProcessCamelContext, removeMainListener, setAutoConfigurationEnabled, setDefaultPropertyPlaceholderLocation, setInitialProperties, setInitialProperties, setOverrideProperties, setOverrideProperties, setPropertyPlaceholderLocations, setRoutesCollectorbuild, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendprotected static final org.slf4j.Logger LOG
protected static final int UNINITIALIZED_EXIT_CODE
protected static final int DEFAULT_EXIT_CODE
protected final AtomicInteger exitCode
protected MainShutdownStrategy shutdownStrategy
protected volatile org.apache.camel.ProducerTemplate camelTemplate
protected MainSupport(Class<?>... configurationClasses)
protected MainSupport()
public void run()
throws Exception
Exceptionprotected void beforeStart()
throws Exception
MainListener instead.Exceptionprotected void afterStart()
throws Exception
MainListener instead.Exceptionprotected void beforeStop()
throws Exception
MainListener instead.Exceptionprotected void afterStop()
throws Exception
MainListener instead.Exceptionpublic void completed()
public Runnable getCompleteTask()
@Deprecated public int getDuration()
@Deprecated public void setDuration(int duration)
BaseMainSupport.configure()@Deprecated public int getDurationIdle()
@Deprecated public void setDurationIdle(int durationIdle)
BaseMainSupport.configure()@Deprecated public int getDurationMaxMessages()
@Deprecated public void setDurationMaxMessages(int durationMaxMessages)
BaseMainSupport.configure()@Deprecated public void setDurationHitExitCode(int durationHitExitCode)
BaseMainSupport.configure()@Deprecated public int getDurationHitExitCode()
public int getExitCode()
public boolean isTrace()
public void enableTrace()
public void enableTraceStandby()
public MainShutdownStrategy getShutdownStrategy()
public void setShutdownStrategy(MainShutdownStrategy shutdownStrategy)
MainShutdownStrategy used to properly shut-down the main instance. By default a
DefaultMainShutdownStrategy will be used.shutdownStrategy - the shutdown strategyprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.service.BaseServiceExceptionprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.service.BaseServiceExceptionprotected void configureLifecycle(org.apache.camel.CamelContext camelContext)
throws Exception
configureLifecycle in class BaseMainSupportExceptionprotected void waitUntilCompleted()
protected abstract org.apache.camel.ProducerTemplate findOrCreateCamelTemplate()
protected abstract org.apache.camel.CamelContext createCamelContext()
public org.apache.camel.ProducerTemplate getCamelTemplate()
throws Exception
ExceptionApache Camel