org.apache.camel
Interface StartupListener


public interface StartupListener

Allows objects to be notified when CamelContext have just been started.

This can be used to perform any custom work when the entire CamelContext has been initialized and started. For example this ensures that all the Camel routes has been started and are up and running, before this callback is being invoked.

For example the QuartzComponent leverages this to ensure the Quartz scheduler is started late, when all the Camel routes and services already have been started.

Version:
$Revision: 980370 $

Method Summary
 void onCamelContextStarted(CamelContext context, boolean alreadyStarted)
          Callback invoked when the CamelContext has just been started.
 

Method Detail

onCamelContextStarted

void onCamelContextStarted(CamelContext context,
                           boolean alreadyStarted)
                           throws Exception
Callback invoked when the CamelContext has just been started.

Parameters:
context - the Camel context
alreadyStarted - whether or not the CamelContext already has been started. For example the context could already have been started, and then a service is added/started later which still triggers this callback to be invoked.
Throws:
Exception - can be thrown in case of errors to fail the startup process and have the application fail on startup.


Apache CAMEL