public class PublishEventNotifier extends org.apache.camel.support.EventNotifierSupport implements org.apache.camel.CamelContextAware
EventNotifier
which publishes the EventObject
to some
Endpoint
.
This notifier is only enabled when CamelContext
is started. This avoids problems when
sending notifications during start/shutdown of CamelContext
which causes problems by
sending those events to Camel routes by this notifier.Constructor and Description |
---|
PublishEventNotifier() |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.CamelContext |
getCamelContext() |
org.apache.camel.Endpoint |
getEndpoint() |
String |
getEndpointUri() |
boolean |
isEnabled(org.apache.camel.spi.CamelEvent event) |
void |
notify(org.apache.camel.spi.CamelEvent event) |
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
setEndpoint(org.apache.camel.Endpoint endpoint) |
void |
setEndpointUri(String endpointUri) |
String |
toString() |
isDisabled, isIgnoreCamelContextEvents, isIgnoreExchangeCompletedEvent, isIgnoreExchangeCreatedEvent, isIgnoreExchangeEvents, isIgnoreExchangeFailedEvents, isIgnoreExchangeRedeliveryEvents, isIgnoreExchangeSendingEvents, isIgnoreExchangeSentEvents, isIgnoreRouteEvents, isIgnoreServiceEvents, isIgnoreStepEvents, setIgnoreCamelContextEvents, setIgnoreExchangeCompletedEvent, setIgnoreExchangeCreatedEvent, setIgnoreExchangeEvents, setIgnoreExchangeFailedEvents, setIgnoreExchangeRedeliveryEvents, setIgnoreExchangeSendingEvents, setIgnoreExchangeSentEvents, setIgnoreRouteEvents, setIgnoreServiceEvents, setIgnoreStepEvents
build, 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, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public PublishEventNotifier()
public void notify(org.apache.camel.spi.CamelEvent event) throws Exception
notify
in interface org.apache.camel.spi.EventNotifier
Exception
public boolean isEnabled(org.apache.camel.spi.CamelEvent event)
isEnabled
in interface org.apache.camel.spi.EventNotifier
isEnabled
in class org.apache.camel.support.EventNotifierSupport
public org.apache.camel.CamelContext getCamelContext()
getCamelContext
in interface org.apache.camel.CamelContextAware
public void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext
in interface org.apache.camel.CamelContextAware
public org.apache.camel.Endpoint getEndpoint()
public void setEndpoint(org.apache.camel.Endpoint endpoint)
public String getEndpointUri()
public void setEndpointUri(String endpointUri)
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.EventNotifierSupport
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.EventNotifierSupport
Exception
Apache Camel