Package org.apache.camel.reactive.tomcat
Class TomcatReactiveExecutor
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.reactive.tomcat.TomcatReactiveExecutor
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.ReactiveExecutor,org.apache.camel.StatefulService,org.apache.camel.StaticService,org.apache.camel.SuspendableService
@ManagedResource(description="Managed TomcatReactiveExecutor")
@JdkService("reactive-executor")
public class TomcatReactiveExecutor
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.ReactiveExecutor, org.apache.camel.StaticService
This reactive executor is intended for users of Apache Tomcat, to let Camel applications shutdown cleanly when being
undeployed in Apache Tomcat.
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDINGFields inherited from interface org.apache.camel.spi.ReactiveExecutor
FACTORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voiddoStop()booleanintintintbooleanvoidvoidscheduleMain(Runnable runnable) voidscheduleQueue(Runnable runnable) voidscheduleSync(Runnable runnable) voidsetStatisticsEnabled(boolean statisticsEnabled) toString()Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doStart, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
TomcatReactiveExecutor
public TomcatReactiveExecutor()
-
-
Method Details
-
schedule
- Specified by:
schedulein interfaceorg.apache.camel.spi.ReactiveExecutor
-
scheduleMain
- Specified by:
scheduleMainin interfaceorg.apache.camel.spi.ReactiveExecutor
-
scheduleSync
- Specified by:
scheduleSyncin interfaceorg.apache.camel.spi.ReactiveExecutor
-
scheduleQueue
- Specified by:
scheduleQueuein interfaceorg.apache.camel.spi.ReactiveExecutor
-
executeFromQueue
public boolean executeFromQueue()- Specified by:
executeFromQueuein interfaceorg.apache.camel.spi.ReactiveExecutor
-
isStatisticsEnabled
@ManagedAttribute(description="Whether statistics is enabled") public boolean isStatisticsEnabled()- Specified by:
isStatisticsEnabledin interfaceorg.apache.camel.spi.ReactiveExecutor
-
setStatisticsEnabled
public void setStatisticsEnabled(boolean statisticsEnabled) - Specified by:
setStatisticsEnabledin interfaceorg.apache.camel.spi.ReactiveExecutor
-
getCreatedWorkers
@ManagedAttribute(description="Number of created workers") public int getCreatedWorkers() -
getRunningWorkers
@ManagedAttribute(description="Number of running workers") public int getRunningWorkers() -
getPendingTasks
@ManagedAttribute(description="Number of pending tasks") public int getPendingTasks() -
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doShutdown
- Overrides:
doShutdownin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
toString
-