R
- the type of the Registry
being created
public abstract class CamelServletContextListener<R extends org.apache.camel.spi.Registry> extends Object implements javax.servlet.ServletContextListener
ServletContextListener
which is used to bootstrap
CamelContext
in web applications.Modifier and Type | Field and Description |
---|---|
static String |
CAMEL_CONTEXT_KEY
Key to store the created
CamelContext as an attribute on the ServletContext . |
protected ServletCamelContext |
camelContext |
protected CamelContextLifecycle<R> |
camelContextLifecycle |
static ServletCamelContext |
instance
instance is used for testing purpose
|
protected static org.slf4j.Logger |
LOG |
protected R |
registry |
protected boolean |
test |
Constructor and Description |
---|
CamelServletContextListener() |
Modifier and Type | Method and Description |
---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent sce) |
void |
contextInitialized(javax.servlet.ServletContextEvent sce) |
protected abstract R |
createRegistry()
Creates the
Registry implementation to use. |
public static ServletCamelContext instance
public static final String CAMEL_CONTEXT_KEY
CamelContext
as an attribute on the ServletContext
.protected static final org.slf4j.Logger LOG
protected ServletCamelContext camelContext
protected CamelContextLifecycle<R extends org.apache.camel.spi.Registry> camelContextLifecycle
protected boolean test
protected R extends org.apache.camel.spi.Registry registry
public void contextInitialized(javax.servlet.ServletContextEvent sce)
contextInitialized
in interface javax.servlet.ServletContextListener
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
contextDestroyed
in interface javax.servlet.ServletContextListener
Apache Camel