public class MainDurationEventNotifier
extends org.apache.camel.support.EventNotifierSupport
EventNotifier to trigger (shutdown of the Main JVM, or stopping all routes) when
maximum number of messages has been processed.| Constructor and Description |
|---|
MainDurationEventNotifier(org.apache.camel.CamelContext camelContext,
int maxMessages,
long maxIdleSeconds,
MainShutdownStrategy shutdownStrategy,
boolean stopCamelContext,
boolean restartDuration,
String action) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInit() |
protected void |
doNotify(org.apache.camel.spi.CamelEvent event) |
protected void |
doStart() |
boolean |
isEnabled(org.apache.camel.spi.CamelEvent event) |
void |
notify(org.apache.camel.spi.CamelEvent event) |
String |
toString() |
doStop, isDisabled, isIgnoreCamelContextEvents, isIgnoreExchangeCompletedEvent, isIgnoreExchangeCreatedEvent, isIgnoreExchangeEvents, isIgnoreExchangeFailedEvents, isIgnoreExchangeRedeliveryEvents, isIgnoreExchangeSendingEvents, isIgnoreExchangeSentEvents, isIgnoreRouteEvents, isIgnoreServiceEvents, isIgnoreStepEvents, setIgnoreCamelContextEvents, setIgnoreExchangeCompletedEvent, setIgnoreExchangeCreatedEvent, setIgnoreExchangeEvents, setIgnoreExchangeFailedEvents, setIgnoreExchangeRedeliveryEvents, setIgnoreExchangeSendingEvents, setIgnoreExchangeSentEvents, setIgnoreRouteEvents, setIgnoreServiceEvents, setIgnoreStepEventsisIgnoreCamelContextInitEvents, setIgnoreCamelContextInitEvents, setupIgnorebuild, doBuild, doFail, 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, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic MainDurationEventNotifier(org.apache.camel.CamelContext camelContext,
int maxMessages,
long maxIdleSeconds,
MainShutdownStrategy shutdownStrategy,
boolean stopCamelContext,
boolean restartDuration,
String action)
protected void doNotify(org.apache.camel.spi.CamelEvent event)
throws Exception
Exceptionpublic boolean isEnabled(org.apache.camel.spi.CamelEvent event)
isEnabled in interface org.apache.camel.spi.EventNotifierisEnabled in class org.apache.camel.support.EventNotifierSupportprotected void doInit()
throws Exception
doInit in class org.apache.camel.support.service.BaseServiceExceptionApache Camel