Package org.apache.camel.spi
Interface EventFactory
public interface EventFactory
-
Method Summary
Modifier and TypeMethodDescriptionCreates anCamelEvent
for Camel has been initialized successfully.Creates anCamelEvent
for Camel is initializing.createCamelContextReloaded
(CamelContext context, Object source) Creates anCamelEvent
forCamelContext
has been reloaded successfully.createCamelContextReloadFailure
(CamelContext context, Object source, Throwable cause) Creates anCamelEvent
forCamelContext
failed reload.createCamelContextReloading
(CamelContext context, Object source) Creates anCamelEvent
forCamelContext
being reloaded.Creates anCamelEvent
for Camel has been resumed successfully.createCamelContextResumeFailureEvent
(CamelContext context, Throwable cause) Creates anCamelEvent
for Camel failing to resumeCreates anCamelEvent
for Camel is resuming.Creates anCamelEvent
for Camel routes started.Creates anCamelEvent
for Camel routes starting.Creates anCamelEvent
for Camel routes stopped.Creates anCamelEvent
for Camel routes stopping.Creates anCamelEvent
for Camel has been started successfully.Creates anCamelEvent
for Camel is starting.createCamelContextStartupFailureEvent
(CamelContext context, Throwable cause) Creates anCamelEvent
for Camel failing to startcreateCamelContextStopFailureEvent
(CamelContext context, Throwable cause) Creates anCamelEvent
for Camel failing to stop cleanlyCreates anCamelEvent
for Camel has been stopped successfully.Creates anCamelEvent
for Camel is stopping.Creates anCamelEvent
for Camel has been suspended successfully.Creates anCamelEvent
for Camel is suspending.Creates anCamelEvent
when anExchange
asynchronous processing has been started.createExchangeCompletedEvent
(Exchange exchange) Creates anCamelEvent
when anExchange
has been completed successfullycreateExchangeCreatedEvent
(Exchange exchange) Creates anCamelEvent
when anExchange
has been createdcreateExchangeFailedEvent
(Exchange exchange) Creates anCamelEvent
when anExchange
has failedcreateExchangeFailureHandledEvent
(Exchange exchange, Processor failureHandler, boolean deadLetterChannel, String deadLetterUri) Creates anCamelEvent
when anExchange
has failed but was handled by the Camel error handlers such as an dead letter channel, or a doTry ..createExchangeFailureHandlingEvent
(Exchange exchange, Processor failureHandler, boolean deadLetterChannel, String deadLetterUri) Creates anCamelEvent
when anExchange
has failed but is being handled by the Camel error handlers such as an dead letter channel, or a doTry ..createExchangeRedeliveryEvent
(Exchange exchange, int attempt) Creates anCamelEvent
when anExchange
is about to be redeliveredcreateExchangeSendingEvent
(Exchange exchange, Endpoint endpoint) Creates anCamelEvent
when anExchange
is about to be sent to the endpoint (eg before).createExchangeSentEvent
(Exchange exchange, Endpoint endpoint, long timeTaken) Creates anCamelEvent
when anExchange
has completely been sent to the endpoint (eg after).createRouteAddedEvent
(Route route) Creates anCamelEvent
forRoute
has been added successfully.createRouteReloaded
(Route route, int index, int total) Creates anCamelEvent
forRoute
has been reloaded successfully.createRouteRemovedEvent
(Route route) Creates anCamelEvent
forRoute
has been removed successfully.createRouteStartedEvent
(Route route) Creates anCamelEvent
forRoute
has been started successfully.createRouteStartingEvent
(Route route) Creates anCamelEvent
forRoute
is starting.createRouteStoppedEvent
(Route route) Creates anCamelEvent
forRoute
has been stopped successfully.createRouteStoppingEvent
(Route route) Creates anCamelEvent
forRoute
is stopping.createServiceStartupFailureEvent
(CamelContext context, Object service, Throwable cause) Creates anCamelEvent
for a Service failed to start cleanlycreateServiceStopFailureEvent
(CamelContext context, Object service, Throwable cause) Creates anCamelEvent
for a Service failed to stop cleanlycreateStepCompletedEvent
(Exchange exchange, String stepId) Creates anCamelEvent
when a step has been completed successfullycreateStepFailedEvent
(Exchange exchange, String stepId) Creates anCamelEvent
when a step has failedcreateStepStartedEvent
(Exchange exchange, String stepId) Creates anCamelEvent
when a step has been startedboolean
Whether to include timestamp for each event, when the event occurred.void
setTimestampEnabled
(boolean timestampEnabled) Whether to include timestamp for each event, when the event occurred.
-
Method Details
-
isTimestampEnabled
boolean isTimestampEnabled()Whether to include timestamp for each event, when the event occurred. This is by default false. -
setTimestampEnabled
void setTimestampEnabled(boolean timestampEnabled) Whether to include timestamp for each event, when the event occurred. -
createCamelContextInitializingEvent
Creates anCamelEvent
for Camel is initializing.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextInitializedEvent
Creates anCamelEvent
for Camel has been initialized successfully.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextStartingEvent
Creates anCamelEvent
for Camel is starting.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextStartedEvent
Creates anCamelEvent
for Camel has been started successfully.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextStartupFailureEvent
Creates anCamelEvent
for Camel failing to start- Parameters:
context
- camel contextcause
- the cause exception- Returns:
- the created event
-
createCamelContextStopFailureEvent
Creates anCamelEvent
for Camel failing to stop cleanly- Parameters:
context
- camel contextcause
- the cause exception- Returns:
- the created event
-
createCamelContextStoppingEvent
Creates anCamelEvent
for Camel is stopping.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextStoppedEvent
Creates anCamelEvent
for Camel has been stopped successfully.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextRoutesStartingEvent
Creates anCamelEvent
for Camel routes starting.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextRoutesStartedEvent
Creates anCamelEvent
for Camel routes started.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextRoutesStoppingEvent
Creates anCamelEvent
for Camel routes stopping.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextRoutesStoppedEvent
Creates anCamelEvent
for Camel routes stopped.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextReloading
Creates anCamelEvent
forCamelContext
being reloaded.- Parameters:
context
- camel contextsource
- the source triggered reload- Returns:
- the reloading event
-
createCamelContextReloaded
Creates anCamelEvent
forCamelContext
has been reloaded successfully.- Parameters:
context
- camel contextsource
- the source triggered reload- Returns:
- the reloaded event
-
createCamelContextReloadFailure
Creates anCamelEvent
forCamelContext
failed reload.- Parameters:
context
- camel contextsource
- the source triggered reloadcause
- the caused of the failure- Returns:
- the reloaded failed event
-
createServiceStartupFailureEvent
Creates anCamelEvent
for a Service failed to start cleanly- Parameters:
context
- camel contextservice
- the servicecause
- the cause exception- Returns:
- the created event
-
createServiceStopFailureEvent
Creates anCamelEvent
for a Service failed to stop cleanly- Parameters:
context
- camel contextservice
- the servicecause
- the cause exception- Returns:
- the created event
-
createRouteStartingEvent
Creates anCamelEvent
forRoute
is starting.- Parameters:
route
- the route- Returns:
- the created event
-
createRouteStartedEvent
Creates anCamelEvent
forRoute
has been started successfully.- Parameters:
route
- the route- Returns:
- the created event
-
createRouteStoppingEvent
Creates anCamelEvent
forRoute
is stopping.- Parameters:
route
- the route- Returns:
- the created event
-
createRouteStoppedEvent
Creates anCamelEvent
forRoute
has been stopped successfully.- Parameters:
route
- the route- Returns:
- the created event
-
createRouteAddedEvent
Creates anCamelEvent
forRoute
has been added successfully.- Parameters:
route
- the route- Returns:
- the created event
-
createRouteRemovedEvent
Creates anCamelEvent
forRoute
has been removed successfully.- Parameters:
route
- the route- Returns:
- the created event
-
createRouteReloaded
Creates anCamelEvent
forRoute
has been reloaded successfully.- Parameters:
route
- the routeindex
- the route index in this batchtotal
- total number of routes being reloaded in this batch- Returns:
- the reloaded event
-
createExchangeCreatedEvent
Creates anCamelEvent
when anExchange
has been created- Parameters:
exchange
- the exchange- Returns:
- the created event
-
createExchangeCompletedEvent
Creates anCamelEvent
when anExchange
has been completed successfully- Parameters:
exchange
- the exchange- Returns:
- the created event
-
createExchangeFailedEvent
Creates anCamelEvent
when anExchange
has failed- Parameters:
exchange
- the exchange- Returns:
- the created event
-
createExchangeFailureHandlingEvent
CamelEvent createExchangeFailureHandlingEvent(Exchange exchange, Processor failureHandler, boolean deadLetterChannel, String deadLetterUri) Creates anCamelEvent
when anExchange
has failed but is being handled by the Camel error handlers such as an dead letter channel, or a doTry .. doCatch block. This event is triggered before sending the failure handler, where as createExchangeFailureHandledEvent if the event after.- Parameters:
exchange
- the exchangefailureHandler
- the failure handler such as moving the message to a dead letter queuedeadLetterChannel
- whether it was a dead letter channel or not handling the failuredeadLetterUri
- the dead letter uri, if its a dead letter channel- Returns:
- the created event
-
createExchangeFailureHandledEvent
CamelEvent createExchangeFailureHandledEvent(Exchange exchange, Processor failureHandler, boolean deadLetterChannel, String deadLetterUri) Creates anCamelEvent
when anExchange
has failed but was handled by the Camel error handlers such as an dead letter channel, or a doTry .. doCatch block. This event is triggered after the exchange was sent to failure handler, where as createExchangeFailureHandlingEvent if the event before.- Parameters:
exchange
- the exchangefailureHandler
- the failure handler such as moving the message to a dead letter queuedeadLetterChannel
- whether it was a dead letter channel or not handling the failuredeadLetterUri
- the dead letter uri, if its a dead letter channel- Returns:
- the created event
-
createExchangeRedeliveryEvent
Creates anCamelEvent
when anExchange
is about to be redelivered- Parameters:
exchange
- the exchangeattempt
- the current redelivery attempt (starts from 1)- Returns:
- the created event
-
createExchangeSendingEvent
Creates anCamelEvent
when anExchange
is about to be sent to the endpoint (eg before).- Parameters:
exchange
- the exchangeendpoint
- the destination- Returns:
- the created event
-
createCamelExchangeAsyncProcessingStartedEvent
Creates anCamelEvent
when anExchange
asynchronous processing has been started. This is guaranteed to run on the same thread on whichRoutePolicySupport.onExchangeBegin
was called and/orExchangeSendingEvent
was fired. Special event only in use for camel-tracing / camel-opentelemetry. This event is NOT (by default) in use.- Parameters:
exchange
- the exchange- Returns:
- the created event
-
createExchangeSentEvent
Creates anCamelEvent
when anExchange
has completely been sent to the endpoint (eg after).- Parameters:
exchange
- the exchangeendpoint
- the destinationtimeTaken
- time in millis taken- Returns:
- the created event
-
createStepStartedEvent
Creates anCamelEvent
when a step has been started- Parameters:
exchange
- the exchangestepId
- the step id- Returns:
- the created event
-
createStepCompletedEvent
Creates anCamelEvent
when a step has been completed successfully- Parameters:
exchange
- the exchangestepId
- the step id- Returns:
- the created event
-
createStepFailedEvent
Creates anCamelEvent
when a step has failed- Parameters:
exchange
- the exchangestepId
- the step id- Returns:
- the created event
-
createCamelContextSuspendingEvent
Creates anCamelEvent
for Camel is suspending.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextSuspendedEvent
Creates anCamelEvent
for Camel has been suspended successfully.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextResumingEvent
Creates anCamelEvent
for Camel is resuming.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextResumedEvent
Creates anCamelEvent
for Camel has been resumed successfully.- Parameters:
context
- camel context- Returns:
- the created event
-
createCamelContextResumeFailureEvent
Creates anCamelEvent
for Camel failing to resume- Parameters:
context
- camel contextcause
- the cause exception- Returns:
- the created event
-