public class LifeCycleComponent extends Object implements ComponentLifeCycle
When extending this class you must:
super.start()
operation to start the children.
super.shutdown
operation toConstructor and Description |
---|
LifeCycleComponent() |
Modifier and Type | Method and Description |
---|---|
void |
addChild(ComponentLifeCycle childComponent)
Adds a child
ComponentLifeCycle . |
void |
shutdown()
The inverse of the
start() method. |
void |
start()
Implements functionality for starting an instances of this
ComponentLifeCycle object. |
public LifeCycleComponent()
public void start()
ComponentLifeCycle
ComponentLifeCycle
object. This may be
loading files, establish connections, initializing data, starting threads, etc.start
in interface ComponentLifeCycle
public void shutdown()
ComponentLifeCycle
start()
method. Contains functionality for deallocation of ressources, clearing
data, closing connections, stopping threads, etcshutdown
in interface ComponentLifeCycle
public void addChild(ComponentLifeCycle childComponent)
ComponentLifeCycle
. The childs lifecycle will be managed by by the
LifeCycleComponent
.childComponent
- The child to addCopyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.