org.apache.camel.spi
Interface EventFactory
- All Known Implementing Classes:
- DefaultEventFactory
public interface EventFactory
Factory to create events
that are emitted when such an event occur.
For example when an Exchange
is being created and then later when its done.
- Version:
Method Summary |
EventObject |
createCamelContextResumedEvent(CamelContext context)
Creates an EventObject for Camel has been resumed successfully. |
EventObject |
createCamelContextResumeFailureEvent(CamelContext context,
Throwable cause)
Creates an EventObject for Camel failing to resume |
EventObject |
createCamelContextResumingEvent(CamelContext context)
Creates an EventObject for Camel is resuming. |
EventObject |
createCamelContextStartedEvent(CamelContext context)
Creates an EventObject for Camel has been started successfully. |
EventObject |
createCamelContextStartingEvent(CamelContext context)
Creates an EventObject for Camel is starting. |
EventObject |
createCamelContextStartupFailureEvent(CamelContext context,
Throwable cause)
Creates an EventObject for Camel failing to start |
EventObject |
createCamelContextStopFailureEvent(CamelContext context,
Throwable cause)
Creates an EventObject for Camel failing to stop cleanly |
EventObject |
createCamelContextStoppedEvent(CamelContext context)
Creates an EventObject for Camel has been stopped successfully. |
EventObject |
createCamelContextStoppingEvent(CamelContext context)
Creates an EventObject for Camel is stopping. |
EventObject |
createCamelContextSuspendedEvent(CamelContext context)
Creates an EventObject for Camel has been suspended successfully. |
EventObject |
createCamelContextSuspendingEvent(CamelContext context)
Creates an EventObject for Camel is suspending. |
EventObject |
createExchangeCompletedEvent(Exchange exchange)
Creates an EventObject when an Exchange has been completed successfully |
EventObject |
createExchangeCreatedEvent(Exchange exchange)
Creates an EventObject when an Exchange has been created |
EventObject |
createExchangeFailedEvent(Exchange exchange)
Creates an EventObject when an Exchange has failed |
EventObject |
createExchangeFailureHandledEvent(Exchange exchange,
Processor failureHandler,
boolean deadLetterChannel)
Creates an EventObject when an Exchange has failed
but was handled by the Camel error handlers such as an dead letter channel. |
EventObject |
createExchangeRedeliveryEvent(Exchange exchange,
int attempt)
Creates an EventObject when an Exchange is about to be redelivered |
EventObject |
createExchangeSentEvent(Exchange exchange,
Endpoint endpoint,
long timeTaken)
Creates an EventObject when an Exchange has completely been sent to the endpoint. |
EventObject |
createRouteStartedEvent(Route route)
Creates an EventObject for Route has been started successfully. |
EventObject |
createRouteStoppedEvent(Route route)
Creates an EventObject for Route has been stopped successfully. |
EventObject |
createServiceStartupFailureEvent(CamelContext context,
Object service,
Throwable cause)
Creates an EventObject for a Service failed to start cleanly |
EventObject |
createServiceStopFailureEvent(CamelContext context,
Object service,
Throwable cause)
Creates an EventObject for a Service failed to stop cleanly |
createCamelContextStartingEvent
EventObject createCamelContextStartingEvent(CamelContext context)
- Creates an
EventObject
for Camel is starting.
- Parameters:
context
- camel context
- Returns:
- the created event
createCamelContextStartedEvent
EventObject createCamelContextStartedEvent(CamelContext context)
- Creates an
EventObject
for Camel has been started successfully.
- Parameters:
context
- camel context
- Returns:
- the created event
createCamelContextStartupFailureEvent
EventObject createCamelContextStartupFailureEvent(CamelContext context,
Throwable cause)
- Creates an
EventObject
for Camel failing to start
- Parameters:
context
- camel contextcause
- the cause exception
- Returns:
- the created event
createCamelContextStopFailureEvent
EventObject createCamelContextStopFailureEvent(CamelContext context,
Throwable cause)
- Creates an
EventObject
for Camel failing to stop cleanly
- Parameters:
context
- camel contextcause
- the cause exception
- Returns:
- the created event
createCamelContextStoppingEvent
EventObject createCamelContextStoppingEvent(CamelContext context)
- Creates an
EventObject
for Camel is stopping.
- Parameters:
context
- camel context
- Returns:
- the created event
createCamelContextStoppedEvent
EventObject createCamelContextStoppedEvent(CamelContext context)
- Creates an
EventObject
for Camel has been stopped successfully.
- Parameters:
context
- camel context
- Returns:
- the created event
createServiceStartupFailureEvent
EventObject createServiceStartupFailureEvent(CamelContext context,
Object service,
Throwable cause)
- Creates an
EventObject
for a Service failed to start cleanly
- Parameters:
context
- camel contextservice
- the servicecause
- the cause exception
- Returns:
- the created event
createServiceStopFailureEvent
EventObject createServiceStopFailureEvent(CamelContext context,
Object service,
Throwable cause)
- Creates an
EventObject
for a Service failed to stop cleanly
- Parameters:
context
- camel contextservice
- the servicecause
- the cause exception
- Returns:
- the created event
createRouteStartedEvent
EventObject createRouteStartedEvent(Route route)
- Creates an
EventObject
for Route
has been started successfully.
- Parameters:
route
- the route
- Returns:
- the created event
createRouteStoppedEvent
EventObject createRouteStoppedEvent(Route route)
- Creates an
EventObject
for Route
has been stopped successfully.
- Parameters:
route
- the route
- Returns:
- the created event
createExchangeCreatedEvent
EventObject createExchangeCreatedEvent(Exchange exchange)
- Creates an
EventObject
when an Exchange
has been created
- Parameters:
exchange
- the exchange
- Returns:
- the created event
createExchangeCompletedEvent
EventObject createExchangeCompletedEvent(Exchange exchange)
- Creates an
EventObject
when an Exchange
has been completed successfully
- Parameters:
exchange
- the exchange
- Returns:
- the created event
createExchangeFailedEvent
EventObject createExchangeFailedEvent(Exchange exchange)
- Creates an
EventObject
when an Exchange
has failed
- Parameters:
exchange
- the exchange
- Returns:
- the created event
createExchangeFailureHandledEvent
EventObject createExchangeFailureHandledEvent(Exchange exchange,
Processor failureHandler,
boolean deadLetterChannel)
- Creates an
EventObject
when an Exchange
has failed
but was handled by the Camel error handlers such as an dead letter channel.
- 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 failure
- Returns:
- the created event
createExchangeRedeliveryEvent
EventObject createExchangeRedeliveryEvent(Exchange exchange,
int attempt)
- Creates an
EventObject
when an Exchange
is about to be redelivered
- Parameters:
exchange
- the exchangeattempt
- the current redelivery attempt (starts from 1)
- Returns:
- the created event
createExchangeSentEvent
EventObject createExchangeSentEvent(Exchange exchange,
Endpoint endpoint,
long timeTaken)
- Creates an
EventObject
when an Exchange
has completely been sent to the endpoint.
- Parameters:
exchange
- the exchangeendpoint
- the destinationtimeTaken
- time in millis taken
- Returns:
- the created event
createCamelContextSuspendingEvent
EventObject createCamelContextSuspendingEvent(CamelContext context)
- Creates an
EventObject
for Camel is suspending.
- Parameters:
context
- camel context
- Returns:
- the created event
createCamelContextSuspendedEvent
EventObject createCamelContextSuspendedEvent(CamelContext context)
- Creates an
EventObject
for Camel has been suspended successfully.
- Parameters:
context
- camel context
- Returns:
- the created event
createCamelContextResumingEvent
EventObject createCamelContextResumingEvent(CamelContext context)
- Creates an
EventObject
for Camel is resuming.
- Parameters:
context
- camel context
- Returns:
- the created event
createCamelContextResumedEvent
EventObject createCamelContextResumedEvent(CamelContext context)
- Creates an
EventObject
for Camel has been resumed successfully.
- Parameters:
context
- camel context
- Returns:
- the created event
createCamelContextResumeFailureEvent
EventObject createCamelContextResumeFailureEvent(CamelContext context,
Throwable cause)
- Creates an
EventObject
for Camel failing to resume
- Parameters:
context
- camel contextcause
- the cause exception
- Returns:
- the created event
Apache CAMEL