public abstract class AbstractLifeCycle extends Object implements ContainerLifecycle
Modifier and Type | Field and Description |
---|---|
protected ContextsService |
contextsService |
protected Logger |
logger |
protected ScannerService |
scannerService
Discover bean classes
|
protected AtomicBoolean |
started |
protected WebBeansContext |
webBeansContext |
Modifier | Constructor and Description |
---|---|
protected |
AbstractLifeCycle() |
protected |
AbstractLifeCycle(Properties properties) |
protected |
AbstractLifeCycle(Properties properties,
WebBeansContext webBeansContext) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterInitApplication(Properties properties) |
protected void |
afterStartApplication(Object startupObject) |
protected void |
afterStopApplication(Object stopObject) |
protected void |
beforeInitApplication(Properties properties) |
protected void |
beforeStartApplication(Object startupObject) |
protected void |
beforeStopApplication(Object stopObject) |
protected void |
bootstrapApplication(Object startupObject) |
javax.enterprise.inject.spi.BeanManager |
getBeanManager()
Get the underlying
BeanManager instance for the current application. |
ContextsService |
getContextService()
Gets container's context service implementation.
|
WebBeansContext |
getWebBeansContext() |
void |
initApplication(Properties properties)
Initialize lifecycle.
|
void |
startApplication(Object startupObject)
Starts container.
|
void |
stopApplication(Object endObject)
Stopping the Application means that the container destroys all bean instances
it stores, cleans and removes all contexts and does other necessary
cleanup actions.
|
protected AtomicBoolean started
protected Logger logger
protected ScannerService scannerService
protected final ContextsService contextsService
protected final WebBeansContext webBeansContext
protected AbstractLifeCycle()
protected AbstractLifeCycle(Properties properties)
protected AbstractLifeCycle(Properties properties, WebBeansContext webBeansContext)
public WebBeansContext getWebBeansContext()
public javax.enterprise.inject.spi.BeanManager getBeanManager()
ContainerLifecycle
BeanManager
instance for the current application.
There is 1-1 correspondence between a bean manager and a deployed (web-) application.getBeanManager
in interface ContainerLifecycle
BeanManager
instancepublic void startApplication(Object startupObject)
ContainerLifecycle
For Java EE artifact deployment, it scans all classes and libraries in all deployment archives in the classpath. There are several types of deployment archives;
Container uses ScannerService
SPI for scanning archives
and act accordingly. If there is an exception while starting,
it must abort the deployment and provides information to the
developer.
startApplication
in interface ContainerLifecycle
startupObject
- any startup object.protected void bootstrapApplication(Object startupObject)
public void stopApplication(Object endObject)
ContainerLifecycle
Stopping the Application means that the container destroys all bean instances it stores, cleans and removes all contexts and does other necessary cleanup actions.
Attention: Accessing the BeanManager or any bean proxy after the shutdown will result in non-portable behaviour!
stopApplication
in interface ContainerLifecycle
endObject
- any object provided by application implementor. This can be a ServletContext, etcpublic ContextsService getContextService()
ContainerLifecycle
getContextService
in interface ContainerLifecycle
public void initApplication(Properties properties)
ContainerLifecycle
Implementors can configure their initialization specific actions here.
initApplication
in interface ContainerLifecycle
properties
- any propertiesprotected void beforeInitApplication(Properties properties)
protected void afterInitApplication(Properties properties)
protected void afterStartApplication(Object startupObject)
protected void afterStopApplication(Object stopObject)
protected void beforeStartApplication(Object startupObject)
protected void beforeStopApplication(Object stopObject)
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.