public class DeferServiceStartupListener extends Object implements StartupListener
StartupListener
that defers starting Service
s.Constructor and Description |
---|
DeferServiceStartupListener() |
Modifier and Type | Method and Description |
---|---|
void |
addService(Service service) |
void |
onCamelContextStarted(CamelContext context,
boolean alreadyStarted)
Callback invoked when the
CamelContext has just been started. |
public DeferServiceStartupListener()
public void addService(Service service)
public void onCamelContextStarted(CamelContext context, boolean alreadyStarted) throws Exception
StartupListener
CamelContext
has just been started.onCamelContextStarted
in interface StartupListener
context
- the Camel contextalreadyStarted
- 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.Exception
- can be thrown in case of errors to fail the startup process and have the application
fail on startup.Apache Camel