Package org.apache.camel.spi
Interface EventFactory
public interface EventFactory
-
Method Summary
Modifier and TypeMethodDescriptionCreates anCamelEventfor Camel has been initialized successfully.Creates anCamelEventfor Camel is initializing.createCamelContextReloaded(CamelContext context, Object source) Creates anCamelEventforCamelContexthas been reloaded successfully.createCamelContextReloadFailure(CamelContext context, Object source, Throwable cause) Creates anCamelEventforCamelContextfailed reload.createCamelContextReloading(CamelContext context, Object source) Creates anCamelEventforCamelContextbeing reloaded.Creates anCamelEventfor Camel has been resumed successfully.createCamelContextResumeFailureEvent(CamelContext context, Throwable cause) Creates anCamelEventfor Camel failing to resumeCreates anCamelEventfor Camel is resuming.Creates anCamelEventfor Camel routes started.Creates anCamelEventfor Camel routes starting.Creates anCamelEventfor Camel routes stopped.Creates anCamelEventfor Camel routes stopping.Creates anCamelEventfor Camel has been started successfully.Creates anCamelEventfor Camel is starting.createCamelContextStartupFailureEvent(CamelContext context, Throwable cause) Creates anCamelEventfor Camel failing to startcreateCamelContextStopFailureEvent(CamelContext context, Throwable cause) Creates anCamelEventfor Camel failing to stop cleanlyCreates anCamelEventfor Camel has been stopped successfully.Creates anCamelEventfor Camel is stopping.Creates anCamelEventfor Camel has been suspended successfully.Creates anCamelEventfor Camel is suspending.Creates anCamelEventwhen anExchangeasynchronous processing has been started.createExchangeCompletedEvent(Exchange exchange) Creates anCamelEventwhen anExchangehas been completed successfullycreateExchangeCreatedEvent(Exchange exchange) Creates anCamelEventwhen anExchangehas been createdcreateExchangeFailedEvent(Exchange exchange) Creates anCamelEventwhen anExchangehas failedcreateExchangeFailureHandledEvent(Exchange exchange, Processor failureHandler, boolean deadLetterChannel, String deadLetterUri) Creates anCamelEventwhen anExchangehas 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 anCamelEventwhen anExchangehas 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 anCamelEventwhen anExchangeis about to be redeliveredcreateExchangeSendingEvent(Exchange exchange, Endpoint endpoint) Creates anCamelEventwhen anExchangeis about to be sent to the endpoint (eg before).createExchangeSentEvent(Exchange exchange, Endpoint endpoint, long timeTaken) Creates anCamelEventwhen anExchangehas completely been sent to the endpoint (eg after).createRouteAddedEvent(Route route) Creates anCamelEventforRoutehas been added successfully.createRouteReloaded(Route route, int index, int total) Creates anCamelEventforRoutehas been reloaded successfully.createRouteRemovedEvent(Route route) Creates anCamelEventforRoutehas been removed successfully.createRouteStartedEvent(Route route) Creates anCamelEventforRoutehas been started successfully.createRouteStartingEvent(Route route) Creates anCamelEventforRouteis starting.createRouteStoppedEvent(Route route) Creates anCamelEventforRoutehas been stopped successfully.createRouteStoppingEvent(Route route) Creates anCamelEventforRouteis stopping.createServiceStartupFailureEvent(CamelContext context, Object service, Throwable cause) Creates anCamelEventfor a Service failed to start cleanlycreateServiceStopFailureEvent(CamelContext context, Object service, Throwable cause) Creates anCamelEventfor a Service failed to stop cleanlycreateStepCompletedEvent(Exchange exchange, String stepId) Creates anCamelEventwhen a step has been completed successfullycreateStepFailedEvent(Exchange exchange, String stepId) Creates anCamelEventwhen a step has failedcreateStepStartedEvent(Exchange exchange, String stepId) Creates anCamelEventwhen a step has been startedbooleanWhether to include timestamp for each event, when the event occurred.voidsetTimestampEnabled(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 anCamelEventfor Camel is initializing.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextInitializedEvent
Creates anCamelEventfor Camel has been initialized successfully.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextStartingEvent
Creates anCamelEventfor Camel is starting.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextStartedEvent
Creates anCamelEventfor Camel has been started successfully.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextStartupFailureEvent
Creates anCamelEventfor Camel failing to start- Parameters:
context- camel contextcause- the cause exception- Returns:
- the created event
-
createCamelContextStopFailureEvent
Creates anCamelEventfor Camel failing to stop cleanly- Parameters:
context- camel contextcause- the cause exception- Returns:
- the created event
-
createCamelContextStoppingEvent
Creates anCamelEventfor Camel is stopping.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextStoppedEvent
Creates anCamelEventfor Camel has been stopped successfully.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextRoutesStartingEvent
Creates anCamelEventfor Camel routes starting.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextRoutesStartedEvent
Creates anCamelEventfor Camel routes started.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextRoutesStoppingEvent
Creates anCamelEventfor Camel routes stopping.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextRoutesStoppedEvent
Creates anCamelEventfor Camel routes stopped.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextReloading
Creates anCamelEventforCamelContextbeing reloaded.- Parameters:
context- camel contextsource- the source triggered reload- Returns:
- the reloading event
-
createCamelContextReloaded
Creates anCamelEventforCamelContexthas been reloaded successfully.- Parameters:
context- camel contextsource- the source triggered reload- Returns:
- the reloaded event
-
createCamelContextReloadFailure
Creates anCamelEventforCamelContextfailed reload.- Parameters:
context- camel contextsource- the source triggered reloadcause- the caused of the failure- Returns:
- the reloaded failed event
-
createServiceStartupFailureEvent
Creates anCamelEventfor a Service failed to start cleanly- Parameters:
context- camel contextservice- the servicecause- the cause exception- Returns:
- the created event
-
createServiceStopFailureEvent
Creates anCamelEventfor a Service failed to stop cleanly- Parameters:
context- camel contextservice- the servicecause- the cause exception- Returns:
- the created event
-
createRouteStartingEvent
Creates anCamelEventforRouteis starting.- Parameters:
route- the route- Returns:
- the created event
-
createRouteStartedEvent
Creates anCamelEventforRoutehas been started successfully.- Parameters:
route- the route- Returns:
- the created event
-
createRouteStoppingEvent
Creates anCamelEventforRouteis stopping.- Parameters:
route- the route- Returns:
- the created event
-
createRouteStoppedEvent
Creates anCamelEventforRoutehas been stopped successfully.- Parameters:
route- the route- Returns:
- the created event
-
createRouteAddedEvent
Creates anCamelEventforRoutehas been added successfully.- Parameters:
route- the route- Returns:
- the created event
-
createRouteRemovedEvent
Creates anCamelEventforRoutehas been removed successfully.- Parameters:
route- the route- Returns:
- the created event
-
createRouteReloaded
Creates anCamelEventforRoutehas 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 anCamelEventwhen anExchangehas been created- Parameters:
exchange- the exchange- Returns:
- the created event
-
createExchangeCompletedEvent
Creates anCamelEventwhen anExchangehas been completed successfully- Parameters:
exchange- the exchange- Returns:
- the created event
-
createExchangeFailedEvent
Creates anCamelEventwhen anExchangehas failed- Parameters:
exchange- the exchange- Returns:
- the created event
-
createExchangeFailureHandlingEvent
CamelEvent createExchangeFailureHandlingEvent(Exchange exchange, Processor failureHandler, boolean deadLetterChannel, String deadLetterUri) Creates anCamelEventwhen anExchangehas 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 anCamelEventwhen anExchangehas 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 anCamelEventwhen anExchangeis about to be redelivered- Parameters:
exchange- the exchangeattempt- the current redelivery attempt (starts from 1)- Returns:
- the created event
-
createExchangeSendingEvent
Creates anCamelEventwhen anExchangeis about to be sent to the endpoint (eg before).- Parameters:
exchange- the exchangeendpoint- the destination- Returns:
- the created event
-
createCamelExchangeAsyncProcessingStartedEvent
Creates anCamelEventwhen anExchangeasynchronous processing has been started. This is guaranteed to run on the same thread on whichRoutePolicySupport.onExchangeBeginwas called and/orExchangeSendingEventwas 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 anCamelEventwhen anExchangehas completely been sent to the endpoint (eg after).- Parameters:
exchange- the exchangeendpoint- the destinationtimeTaken- time in millis taken- Returns:
- the created event
-
createStepStartedEvent
Creates anCamelEventwhen a step has been started- Parameters:
exchange- the exchangestepId- the step id- Returns:
- the created event
-
createStepCompletedEvent
Creates anCamelEventwhen a step has been completed successfully- Parameters:
exchange- the exchangestepId- the step id- Returns:
- the created event
-
createStepFailedEvent
Creates anCamelEventwhen a step has failed- Parameters:
exchange- the exchangestepId- the step id- Returns:
- the created event
-
createCamelContextSuspendingEvent
Creates anCamelEventfor Camel is suspending.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextSuspendedEvent
Creates anCamelEventfor Camel has been suspended successfully.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextResumingEvent
Creates anCamelEventfor Camel is resuming.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextResumedEvent
Creates anCamelEventfor Camel has been resumed successfully.- Parameters:
context- camel context- Returns:
- the created event
-
createCamelContextResumeFailureEvent
Creates anCamelEventfor Camel failing to resume- Parameters:
context- camel contextcause- the cause exception- Returns:
- the created event
-