Interface LifecycleComponent
- All Superinterfaces:
Destroyable, Initializable, Pausable, Resumable, Startable, Stoppable
- All Known Subinterfaces:
ComponentComposite, ComponentComposite.ExtendedComponentComposite<CTX,CON>, LifecycleComponent.LifecycleAutomaton, LifecycleComponent.UncheckedLifecycleComponent
- All Known Implementing Classes:
AbstractComponentComposite, AbstractComponentComposite.ExtendedCompositeComponentImpl, LifecycleMachine, LifecycleMachine.ManualLifecycleMachine
public interface LifecycleComponent
extends Initializable, Startable, Pausable, Resumable, Stoppable, Destroyable
A component implementing the
LifecycleComponent interface supports a
life-cycle. I.e. such a component may be instructed from the outside to run
through several stages from getting started till being destroyed. The valid
state changes are mainly as follows: "initialize" - "start" - "pause" -
"resume" - "stop" - "destroy" For example: "initialize" - "start" - "pause" -
"resume" - "pause" - "resume" - "stop" - "start" - "pause" - "resume" -
"stop" - "destroy" The LifecycleComponentHandle.LifecycleAutomatonHandle is a component
managing various LifecycleComponents each identified by a dedicated
handle. Operations on the LifecycleComponent are invoked by this
LifecycleComponentHandle.LifecycleAutomatonHandle with a handle identifying the according
LifecycleComponent.
The LifecycleComponent contains the business-logic where as the
LifecycleComponentHandle.LifecycleAutomatonHandle provides the frame for managing this
business-logic. The LifecycleComponent.LifecycleAutomaton takes care of the correct
life-cycle applied on a LifecycleComponent.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA system implementing theLifecycleComponent.LifecycleAutomatoninterface supports managingLifecycleComponentinstances and takes care that the life-cycle stages are invoked in the correct order by throwing according exceptions in case the life-cycle is invoked in the wrong order.static interfaceSame as theLifecycleComponentthough without the need to try-catch any exceptions on the various life-cycle stages.Nested classes/interfaces inherited from interface Destroyable
Destroyable.DestroyAutomatonNested classes/interfaces inherited from interface Initializable
Initializable.InitializeAutomaton, Initializable.InitializeBuilder<B>, Initializable.UncheckedInitializableNested classes/interfaces inherited from interface Pausable
Pausable.PauseAutomaton, Pausable.PauseBuilder<B>, Pausable.UncheckedPausableNested classes/interfaces inherited from interface Resumable
Resumable.ResumeAutomaton, Resumable.ResumeBuilder<B>, Resumable.UncheckedResumableNested classes/interfaces inherited from interface Startable
Startable.StartAutomaton, Startable.StartBuilder<B>, Startable.UncheckedStartableNested classes/interfaces inherited from interface Stoppable
Stoppable.StopAutomaton, Stoppable.StopBuilder<B>, Stoppable.UncheckedStoppable -
Method Summary
Methods inherited from interface Destroyable
destroyMethods inherited from interface Initializable
initialize, initializeUncheckedMethods inherited from interface Pausable
pause, pauseUncheckedMethods inherited from interface Resumable
resume, resumeUncheckedMethods inherited from interface Startable
start, startUncheckedMethods inherited from interface Stoppable
stop, stopUnchecked