org.apache.camel.management.event
Class DefaultEventFactory

java.lang.Object
  extended by org.apache.camel.management.event.DefaultEventFactory
All Implemented Interfaces:
EventFactory

public class DefaultEventFactory
extends Object
implements EventFactory

Default implementation of the EventFactory.

Version:

Constructor Summary
DefaultEventFactory()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEventFactory

public DefaultEventFactory()
Method Detail

createCamelContextStartingEvent

public EventObject createCamelContextStartingEvent(CamelContext context)
Description copied from interface: EventFactory
Creates an EventObject for Camel is starting.

Specified by:
createCamelContextStartingEvent in interface EventFactory
Parameters:
context - camel context
Returns:
the created event

createCamelContextStartedEvent

public EventObject createCamelContextStartedEvent(CamelContext context)
Description copied from interface: EventFactory
Creates an EventObject for Camel has been started successfully.

Specified by:
createCamelContextStartedEvent in interface EventFactory
Parameters:
context - camel context
Returns:
the created event

createCamelContextStoppingEvent

public EventObject createCamelContextStoppingEvent(CamelContext context)
Description copied from interface: EventFactory
Creates an EventObject for Camel is stopping.

Specified by:
createCamelContextStoppingEvent in interface EventFactory
Parameters:
context - camel context
Returns:
the created event

createCamelContextStoppedEvent

public EventObject createCamelContextStoppedEvent(CamelContext context)
Description copied from interface: EventFactory
Creates an EventObject for Camel has been stopped successfully.

Specified by:
createCamelContextStoppedEvent in interface EventFactory
Parameters:
context - camel context
Returns:
the created event

createCamelContextStartupFailureEvent

public EventObject createCamelContextStartupFailureEvent(CamelContext context,
                                                         Throwable cause)
Description copied from interface: EventFactory
Creates an EventObject for Camel failing to start

Specified by:
createCamelContextStartupFailureEvent in interface EventFactory
Parameters:
context - camel context
cause - the cause exception
Returns:
the created event

createCamelContextStopFailureEvent

public EventObject createCamelContextStopFailureEvent(CamelContext context,
                                                      Throwable cause)
Description copied from interface: EventFactory
Creates an EventObject for Camel failing to stop cleanly

Specified by:
createCamelContextStopFailureEvent in interface EventFactory
Parameters:
context - camel context
cause - the cause exception
Returns:
the created event

createServiceStartupFailureEvent

public EventObject createServiceStartupFailureEvent(CamelContext context,
                                                    Object service,
                                                    Throwable cause)
Description copied from interface: EventFactory
Creates an EventObject for a Service failed to start cleanly

Specified by:
createServiceStartupFailureEvent in interface EventFactory
Parameters:
context - camel context
service - the service
cause - the cause exception
Returns:
the created event

createServiceStopFailureEvent

public EventObject createServiceStopFailureEvent(CamelContext context,
                                                 Object service,
                                                 Throwable cause)
Description copied from interface: EventFactory
Creates an EventObject for a Service failed to stop cleanly

Specified by:
createServiceStopFailureEvent in interface EventFactory
Parameters:
context - camel context
service - the service
cause - the cause exception
Returns:
the created event

createRouteStartedEvent

public EventObject createRouteStartedEvent(Route route)
Description copied from interface: EventFactory
Creates an EventObject for Route has been started successfully.

Specified by:
createRouteStartedEvent in interface EventFactory
Parameters:
route - the route
Returns:
the created event

createRouteStoppedEvent

public EventObject createRouteStoppedEvent(Route route)
Description copied from interface: EventFactory
Creates an EventObject for Route has been stopped successfully.

Specified by:
createRouteStoppedEvent in interface EventFactory
Parameters:
route - the route
Returns:
the created event

createExchangeCreatedEvent

public EventObject createExchangeCreatedEvent(Exchange exchange)
Description copied from interface: EventFactory
Creates an EventObject when an Exchange has been created

Specified by:
createExchangeCreatedEvent in interface EventFactory
Parameters:
exchange - the exchange
Returns:
the created event

createExchangeCompletedEvent

public EventObject createExchangeCompletedEvent(Exchange exchange)
Description copied from interface: EventFactory
Creates an EventObject when an Exchange has been completed successfully

Specified by:
createExchangeCompletedEvent in interface EventFactory
Parameters:
exchange - the exchange
Returns:
the created event

createExchangeFailedEvent

public EventObject createExchangeFailedEvent(Exchange exchange)
Description copied from interface: EventFactory
Creates an EventObject when an Exchange has failed

Specified by:
createExchangeFailedEvent in interface EventFactory
Parameters:
exchange - the exchange
Returns:
the created event

createExchangeFailureHandledEvent

public EventObject createExchangeFailureHandledEvent(Exchange exchange,
                                                     Processor failureHandler,
                                                     boolean deadLetterChannel)
Description copied from interface: EventFactory
Creates an EventObject when an Exchange has failed but was handled by the Camel error handlers such as an dead letter channel.

Specified by:
createExchangeFailureHandledEvent in interface EventFactory
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

createExchangeRedeliveryEvent

public EventObject createExchangeRedeliveryEvent(Exchange exchange,
                                                 int attempt)
Description copied from interface: EventFactory
Creates an EventObject when an Exchange is about to be redelivered

Specified by:
createExchangeRedeliveryEvent in interface EventFactory
Parameters:
exchange - the exchange
attempt - the current redelivery attempt (starts from 1)
Returns:
the created event

createExchangeSentEvent

public EventObject createExchangeSentEvent(Exchange exchange,
                                           Endpoint endpoint,
                                           long timeTaken)
Description copied from interface: EventFactory
Creates an EventObject when an Exchange has completely been sent to the endpoint.

Specified by:
createExchangeSentEvent in interface EventFactory
Parameters:
exchange - the exchange
endpoint - the destination
timeTaken - time in millis taken
Returns:
the created event

createCamelContextSuspendingEvent

public EventObject createCamelContextSuspendingEvent(CamelContext context)
Description copied from interface: EventFactory
Creates an EventObject for Camel is suspending.

Specified by:
createCamelContextSuspendingEvent in interface EventFactory
Parameters:
context - camel context
Returns:
the created event

createCamelContextSuspendedEvent

public EventObject createCamelContextSuspendedEvent(CamelContext context)
Description copied from interface: EventFactory
Creates an EventObject for Camel has been suspended successfully.

Specified by:
createCamelContextSuspendedEvent in interface EventFactory
Parameters:
context - camel context
Returns:
the created event

createCamelContextResumingEvent

public EventObject createCamelContextResumingEvent(CamelContext context)
Description copied from interface: EventFactory
Creates an EventObject for Camel is resuming.

Specified by:
createCamelContextResumingEvent in interface EventFactory
Parameters:
context - camel context
Returns:
the created event

createCamelContextResumedEvent

public EventObject createCamelContextResumedEvent(CamelContext context)
Description copied from interface: EventFactory
Creates an EventObject for Camel has been resumed successfully.

Specified by:
createCamelContextResumedEvent in interface EventFactory
Parameters:
context - camel context
Returns:
the created event

createCamelContextResumeFailureEvent

public EventObject createCamelContextResumeFailureEvent(CamelContext context,
                                                        Throwable cause)
Description copied from interface: EventFactory
Creates an EventObject for Camel failing to resume

Specified by:
createCamelContextResumeFailureEvent in interface EventFactory
Parameters:
context - camel context
cause - the cause exception
Returns:
the created event


Apache CAMEL