Module org.refcodes.component
Package org.refcodes.component
Interface ConfigurableLifecycleComponent<CTX>
-
- Type Parameters:
CTX- the context used to initialize the implementing instance.
- All Superinterfaces:
Configurable<CTX>,Destroyable,Pausable,Resumable,Startable,Stoppable
- All Known Subinterfaces:
CompositeComponent.ExtendedCompositeComponent<CTX,CON>,ConfigurableLifecycleComponent.ConfigurableLifecycleAutomaton<CTX>
- All Known Implementing Classes:
CompositeComponentImpl.ExtendedCompositeComponentImpl,ConfigurableLifecycleAutomatonImpl
public interface ConfigurableLifecycleComponent<CTX> extends Configurable<CTX>, Startable, Pausable, Resumable, Stoppable, Destroyable
A component implementing theConfigurableLifecycleComponentinterface 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" TheLifecycleComponentHandle.LifecycleAutomatonHandleis a component managing variousConfigurableLifecycleComponents each identified by a dedicated handle. Operations on theConfigurableLifecycleComponentare invoked by thisLifecycleComponentHandle.LifecycleAutomatonHandlewith a handle identifying the accordingConfigurableLifecycleComponent. TheConfigurableLifecycleComponentcontains the business-logic where as theLifecycleComponentHandle.LifecycleAutomatonHandleprovides the frame for managing this business-logic. TheLifecycleComponent.LifecycleAutomatontakes care of the correct life-cycle applied on aConfigurableLifecycleComponent.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceConfigurableLifecycleComponent.ConfigurableLifecycleAutomaton<CTX>A system implementing theConfigurableLifecycleComponent.ConfigurableLifecycleAutomatoninterface supports managingConfigurableLifecycleComponentinstances and takes care that the open/close statuses are invoked in the correct order by throwing according exceptions in case the open/close-cycle is invoked in the wrong order.-
Nested classes/interfaces inherited from interface org.refcodes.component.Configurable
Configurable.ConfigureAutomaton<CTX>, Configurable.ConfigureBuilder<CTX,B extends Configurable.ConfigureBuilder<CTX,B>>
-
Nested classes/interfaces inherited from interface org.refcodes.component.Destroyable
Destroyable.DestroyAutomaton
-
Nested classes/interfaces inherited from interface org.refcodes.component.Pausable
Pausable.PauseAutomaton, Pausable.PauseBuilder<B extends Pausable.PauseBuilder<B>>, Pausable.UncheckedPausable
-
Nested classes/interfaces inherited from interface org.refcodes.component.Resumable
Resumable.ResumeAutomaton, Resumable.ResumeBuilder<B extends Resumable.ResumeBuilder<B>>, Resumable.UncheckedResumable
-
Nested classes/interfaces inherited from interface org.refcodes.component.Startable
Startable.StartAutomaton, Startable.StartBuilder<B extends Startable.StartBuilder<B>>, Startable.UncheckedStartable
-
Nested classes/interfaces inherited from interface org.refcodes.component.Stoppable
Stoppable.StopAutomaton, Stoppable.StopBuilder<B extends Stoppable.StopBuilder<B>>, Stoppable.UncheckedStoppable
-
-
Method Summary
-
Methods inherited from interface org.refcodes.component.Configurable
initialize, initializeUnchecked
-
Methods inherited from interface org.refcodes.component.Destroyable
destroy
-
Methods inherited from interface org.refcodes.component.Pausable
pause, pauseUnchecked
-
Methods inherited from interface org.refcodes.component.Resumable
resume, resumeUnchecked
-
Methods inherited from interface org.refcodes.component.Startable
start, startUnchecked
-
Methods inherited from interface org.refcodes.component.Stoppable
stop, stopUnchecked
-
-