public abstract class MainSupport extends BaseMainSupport
| Modifier and Type | Class and Description |
|---|---|
class |
MainSupport.Option |
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_EXIT_CODE |
protected AtomicInteger |
exitCode |
protected CountDownLatch |
latch |
protected static org.slf4j.Logger |
LOG |
protected static int |
UNINITIALIZED_EXIT_CODE |
camelContext, camelTemplate, completed, configurationClasses, configurations, defaultPropertyPlaceholderLocation, initialProperties, listeners, mainConfigurationProperties, overrideProperties, propertyPlaceholderLocations, routeBuilderClasses, routeBuilders, routesCollector, 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) |
void |
disableHangupSupport()
Disable the hangup support.
|
protected void |
doStart() |
protected void |
doStop() |
void |
enableHangupSupport()
Hangup support is enabled by default.
|
void |
enableTrace() |
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() |
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.
|
protected void |
waitUntilCompleted() |
addConfiguration, addConfigurationClass, addInitialProperty, addMainListener, addOverrideProperty, addProperty, addRouteBuilder, addRouteBuilder, addRoutesBuilder, autoConfigurationFailFast, autoConfigurationFromProperties, autoConfigurationMainConfiguration, autoConfigurationPropertiesComponent, autoconfigure, autowireConfigurationFromRegistry, autowireWildcardProperties, computeProperties, configure, configurePropertiesService, configureRoutes, createCamelContext, doAutowireWildcardProperties, doConfigureCamelContextFromMainConfiguration, findOrCreateCamelTemplate, getCamelContext, getCamelTemplate, getConfigurationClasses, getConfigurations, getDefaultPropertyPlaceholderLocation, getInitialProperties, getOverrideProperties, getPropertyPlaceholderLocations, getRouteBuilderClasses, getRouteBuilders, getRouteDefinitions, getRoutesBuilders, getRoutesCollector, initCamelContext, isAutoConfigurationEnabled, isServiceEnabled, loadConfigurations, loadEnvironmentVariablesAsProperties, loadRouteBuilders, optionKey, postProcessCamelContext, removeMainListener, setAutoConfigurationEnabled, setConfigurationClasses, setConfigurations, setDefaultPropertyPlaceholderLocation, setInitialProperties, setOverrideProperties, setPropertiesOnTarget, setPropertyPlaceholderLocations, setRouteBuilderClasses, setRouteBuilders, setRoutesBuilders, setRoutesCollector, validateOptionAndValuebuild, 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 final CountDownLatch latch
protected MainSupport(Class... configurationClasses)
protected MainSupport()
public void run()
throws Exception
Exceptionpublic void disableHangupSupport()
public void enableHangupSupport()
protected 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()
protected 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()
Apache Camel