public class MainDurationEventNotifier extends EventNotifierSupport
EventNotifier to trigger shutdown of the Main JVM
when maximum number of messages has been processed.logshutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Constructor and Description |
|---|
MainDurationEventNotifier(CamelContext camelContext,
int maxMessages,
long maxIdleSeconds,
AtomicBoolean completed,
CountDownLatch latch,
boolean stopCamelContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
boolean |
isEnabled(EventObject event)
Checks whether notification for the given event is enabled.
|
void |
notify(EventObject event)
Notifies the given event
|
String |
toString() |
doStop, isDisabled, isIgnoreCamelContextEvents, isIgnoreExchangeCompletedEvent, isIgnoreExchangeCreatedEvent, isIgnoreExchangeEvents, isIgnoreExchangeFailedEvents, isIgnoreExchangeRedeliveryEvents, isIgnoreExchangeSendingEvents, isIgnoreExchangeSentEvents, isIgnoreRouteEvents, isIgnoreServiceEvents, setIgnoreCamelContextEvents, setIgnoreExchangeCompletedEvent, setIgnoreExchangeCreatedEvent, setIgnoreExchangeEvents, setIgnoreExchangeFailedEvents, setIgnoreExchangeRedeliveryEvents, setIgnoreExchangeSendingEvents, setIgnoreExchangeSentEvents, setIgnoreRouteEvents, setIgnoreServiceEventsdoResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic MainDurationEventNotifier(CamelContext camelContext, int maxMessages, long maxIdleSeconds, AtomicBoolean completed, CountDownLatch latch, boolean stopCamelContext)
public void notify(EventObject event) throws Exception
EventNotifierevent - the eventException - can be thrown if notification failedpublic boolean isEnabled(EventObject event)
EventNotifierevent - the eventprotected void doStart() throws Exception
ServiceSupportServiceSupport.doStop() for more details.doStart in class EventNotifierSupportExceptionServiceSupport.doStop()Apache Camel