org.apache.camel.spi
Interface EventFactory

All Known Implementing Classes:
DefaultEventFactory

public interface EventFactory

Factory to create EventObject events} that are emitted when such an event occur.

For example when an Exchange is being created and then later when its done.

Version:
$Revision: 813876 $

Method Summary
 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, Exception cause)
          Creates an EventObject for Camel failing to start
 EventObject createCamelContextStopFailureEvent(CamelContext context, Exception 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 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 createExchangeFailureEvent(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 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, Exception cause)
          Creates an EventObject for a Service failed to start cleanly
 EventObject createServiceStopFailureEvent(CamelContext context, Object service, Exception cause)
          Creates an EventObject for a Service failed to stop cleanly
 

Method Detail

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,
                                                  Exception cause)
Creates an EventObject for Camel failing to start

Parameters:
context - camel context
cause - the cause exception
Returns:
the created event

createCamelContextStopFailureEvent

EventObject createCamelContextStopFailureEvent(CamelContext context,
                                               Exception cause)
Creates an EventObject for Camel failing to stop cleanly

Parameters:
context - camel context
cause - 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,
                                             Exception cause)
Creates an EventObject for a Service failed to start cleanly

Parameters:
context - camel context
service - the service
cause - the cause exception
Returns:
the created event

createServiceStopFailureEvent

EventObject createServiceStopFailureEvent(CamelContext context,
                                          Object service,
                                          Exception cause)
Creates an EventObject for a Service failed to stop cleanly

Parameters:
context - camel context
service - the service
cause - 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

createExchangeFailureEvent

EventObject createExchangeFailureEvent(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 exchange
failureHandler - the failure handler such as moving the message to a dead letter queue
deadLetterChannel - whether it was a dead letter channel or not handling the failure
Returns:
the created event


Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.