public interface Container
Container
interface defines an object that can be used
to customize all Camel CONTEXTS created.
A container can be used to globally intercept and customize CamelContext
s,
by registering a LifecycleStrategy
, a ProcessorFactory
,
or any other SPI object.
This implementation is not thread-safe. The manage(org.apache.camel.CamelContext)
method
may be invoked concurrently if multiple Camel applications is being started concurrently, such as from
application servers that may start deployments concurrently.Modifier and Type | Interface and Description |
---|---|
static class |
Container.Instance
Deprecated.
The
Instance class holds a Container singleton. |
Modifier and Type | Method and Description |
---|---|
void |
manage(CamelContext camelContext)
Deprecated.
Called by Camel when a
CamelContext has been created by its constructor. |
void manage(CamelContext camelContext)
CamelContext
has been created by its constructor.
Notice this method is invoked when the CamelContext
has been created by its constructor.
The context is not yet finished being configured. For example the id/name of the CamelContext
has not been resolved yet, and may return null.
The intention is implementations of Container
is able to configure the CamelContext
before its being started.
To receive callbacks when the CamelContext
has finished being configured and is being started, then
use EventNotifier
to listen for the CamelContextStartedEvent
event.camelContext
- the newly created CamelContext by its constructorApache Camel