CTX - the context used to initialize the implementing instance.public class ConfigurableLifeCycleAutomatonImpl<CTX> extends Object implements ConfigurableLifeCycleComponent.ConfigurableLifeCycleAutomaton<CTX>
ConfigurableLifeCycleComponent.ConfigurableLifeCycleAutomaton.ConfigurableLifeCycleComponent.ConfigurableLifeCycleAutomaton<CTX>Configurable.ConfigureAutomaton<CTX>, Configurable.ConfigureBuilder<CTX,B extends Configurable.ConfigureBuilder<CTX,B>>InitializedAccessor.InitializedMutator, InitializedAccessor.InitializedPropertyStartable.StartAutomaton, Startable.StartBuilder<B extends Startable.StartBuilder<B>>, Startable.UncheckedStartablePausable.PauseAutomaton, Pausable.PauseBuilder<B extends Pausable.PauseBuilder<B>>, Pausable.UncheckedPausableResumable.ResumeAutomaton, Resumable.ResumeBuilder<B extends Resumable.ResumeBuilder<B>>, Resumable.UncheckedResumableRunningAccessor.RunningMutator, RunningAccessor.RunningPropertyStoppable.StopAutomaton, Stoppable.StopBuilder<B extends Stoppable.StopBuilder<B>>, Stoppable.UncheckedStoppableDestroyable.DestroyAutomatonLifeCycleStatusAccessor.LifeCycleStatusMutator, LifeCycleStatusAccessor.LifeCycleStatusProperty| Constructor and Description |
|---|
ConfigurableLifeCycleAutomatonImpl()
Empty constructor, such
LifeCycleComponent.LifeCycleAutomaton cannot do much more
than decline the various LifeCycleStatus states for you. |
ConfigurableLifeCycleAutomatonImpl(ConfigurableLifeCycleComponent<CTX> aLifeConfigurableCycleComponent)
This constructor uses a
LifeCycleStatus for wrapping it inside
the ConfigurableLifeCycleAutomatonImpl, making sure of obeying
and guarding the correct LifeCycleStatus's order of
LifeCycleStatus states for you. |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys the component.
|
protected ConfigurableLifeCycleComponent<CTX> |
getLifeCycleComponent()
Provides access to the
LifeCycleComponent instance. |
LifeCycleStatus |
getLifeCycleStatus()
Retrieves the
LifeCycleStatus property from the property. |
void |
initialize(CTX aContext)
Initializes and configures the component.
|
boolean |
isDestroyable()
Determines whether the component may get destroyed.
|
boolean |
isDestroyed()
Determines whether the component is destroyed.
|
boolean |
isInitalizable(CTX aContext)
Determines whether the component may get initialized.
|
boolean |
isInitialized()
Retrieves the is-initialized property from the initialized property.
|
boolean |
isPausable()
Determines whether the component may get paused.
|
boolean |
isPaused()
Determines whether the component is paused.
|
boolean |
isResumable()
Determines whether the component may get resumed.
|
boolean |
isRunning()
Retrieves the is-running property from the running property.
|
boolean |
isStartable()
Determines whether the component may get started.
|
boolean |
isStoppable()
Determines whether the component may get stopped.
|
boolean |
isStopped()
Determines whether the component is stopped.
|
void |
pause()
Pauses the component.
|
void |
resume()
Resumes the component.
|
void |
start()
Starts the component.
|
void |
stop()
Stops the component.
|
public ConfigurableLifeCycleAutomatonImpl()
LifeCycleComponent.LifeCycleAutomaton cannot do much more
than decline the various LifeCycleStatus states for you.public ConfigurableLifeCycleAutomatonImpl(ConfigurableLifeCycleComponent<CTX> aLifeConfigurableCycleComponent)
LifeCycleStatus for wrapping it inside
the ConfigurableLifeCycleAutomatonImpl, making sure of obeying
and guarding the correct LifeCycleStatus's order of
LifeCycleStatus states for you.aLifeConfigurableCycleComponent - The component to be guarded
regarding the correct declination of the LifeCycleStatus
states.public LifeCycleStatus getLifeCycleStatus()
LifeCycleStatusAccessorLifeCycleStatus property from the property.
Determines in which LifeCycleStatus status a component is in.getLifeCycleStatus in interface LifeCycleStatusAccessorLifeCycleStatus property stored by the
property.public void initialize(CTX aContext) throws ConfigureException
Configurableinitialize in interface Configurable<CTX>aContext - The context to be passed to the implementing instance.ConfigureException - Thrown in case initializing fails.public boolean isInitalizable(CTX aContext)
Configurable.ConfigureAutomatonisInitalizable in interface Configurable.ConfigureAutomaton<CTX>aContext - The context to be passed to the implementing
instance.#initialize() is possible.public boolean isInitialized()
InitializedAccessorInitializable.initialize() or
Configurable.initialize(Object).isInitialized in interface InitializedAccessorpublic boolean isStartable()
Startable.StartAutomatonisStartable in interface Startable.StartAutomatonStartable.start() is possible.public void start()
throws StartException
Startablestart in interface StartableStartException - Thrown in case starting fails.public boolean isRunning()
RunningAccessorStartable.start() or
Resumable.resume().isRunning in interface RunningAccessorpublic boolean isPausable()
Pausable.PauseAutomatonisPausable in interface Pausable.PauseAutomatonPausable.pause() is possible.public void pause()
throws PauseException
Pausablepause in interface PausablePauseException - in case pausing fails.public boolean isPaused()
Pausable.PauseAutomatonisPaused in interface Pausable.PauseAutomatonpublic boolean isResumable()
Resumable.ResumeAutomatonisResumable in interface Resumable.ResumeAutomatonResumable.resume() is possible.public void resume()
throws ResumeException
Resumableresume in interface ResumableResumeException - Thrown in case resuming fails.public boolean isStoppable()
Stoppable.StopAutomatonisStoppable in interface Stoppable.StopAutomatonStoppable.stop() is possible.public void stop()
throws StopException
Stoppablestop in interface StoppableStopException - Thrown in case stopping fails.public boolean isStopped()
Stoppable.StopAutomatonisStopped in interface Stoppable.StopAutomatonpublic boolean isDestroyable()
Destroyable.DestroyAutomatonisDestroyable in interface Destroyable.DestroyAutomatonDestroyable.destroy() is possible.public void destroy()
DestroyableComponent has been destroyed, then invoking any of that
Component instance's methods (except the Destroyable.destroy()
method) must throw an IllegalStateException as by definition a
once destroyed Component is in the state of being destroyed which
is irreversible.destroy in interface Destroyablepublic boolean isDestroyed()
Destroyable.DestroyAutomatonComponent instance's methods
(except the Destroyable.destroy() method) must throw an
IllegalStateException as by definition a once destroyed
Component is in the state of being destroyed which is
irreversible.isDestroyed in interface Destroyable.DestroyAutomatonprotected ConfigurableLifeCycleComponent<CTX> getLifeCycleComponent()
LifeCycleComponent instance.LifeCycleComponent instance being set.Copyright © 2017. All rights reserved.