public final class LifeCycleManager extends Object
| Constructor and Description |
|---|
LifeCycleManager(List<Object> managedInstances,
io.airlift.bootstrap.LifeCycleMethodsMap methodsMap) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInstance(Object instance)
Add an additional managed instance
|
int |
size()
Returns the number of managed instances
|
void |
start()
Start the life cycle - all instances will have their
PostConstruct method(s) called |
void |
stop()
Stop the life cycle - all instances will have their
PreDestroy method(s) called |
public LifeCycleManager(List<Object> managedInstances, io.airlift.bootstrap.LifeCycleMethodsMap methodsMap) throws Exception
managedInstances - list of objects that have life cycle annotationsmethodsMap - existing or new methods mapException - exceptions starting instances (depending on mode)public int size()
public void start()
throws Exception
PostConstruct method(s) calledException - errorspublic void stop()
throws Exception
PreDestroy method(s) calledException - errorsCopyright © 2010-2014 Airlift. All Rights Reserved.