Destroyable, Destroyable.DestroyAutomaton, Initializable, Initializable.InitializeAutomaton, InitializedAccessor, LifeCycleComponent, LifeCycleComponent.LifeCycleAutomaton, LifeCycleStatusAccessor, Pausable, Pausable.PauseAutomaton, Resumable, Resumable.ResumeAutomaton, RunningAccessor, Startable, Startable.StartAutomaton, Stoppable, Stoppable.StopAutomatonLifeCycleAutomatonImpl.ManualLifeCycleAutomatonImplpublic class LifeCycleAutomatonImpl extends Object implements LifeCycleComponent.LifeCycleAutomaton
LifeCycleComponent.LifeCycleAutomaton.| Modifier and Type | Class | Description |
|---|---|---|
static class |
LifeCycleAutomatonImpl.ManualLifeCycleAutomatonImpl |
Opens the otherwise protected
LifeCycleAutomatonImpl.ManualLifeCycleAutomatonImpl.setLifeCycleStatus(LifeCycleStatus) to be public in order to
force any lifecycle status to be set. |
Destroyable.DestroyAutomatonInitializable.InitializeAutomaton, Initializable.InitializeBuilder<B extends Initializable.InitializeBuilder<B>>, Initializable.UncheckedInitializableInitializedAccessor.InitializedMutator, InitializedAccessor.InitializedPropertyLifeCycleComponent.LifeCycleAutomaton, LifeCycleComponent.UncheckedLifeCycleComponentLifeCycleStatusAccessor.LifeCycleStatusBuilder<B extends LifeCycleStatusAccessor.LifeCycleStatusBuilder<B>>, LifeCycleStatusAccessor.LifeCycleStatusMutator, LifeCycleStatusAccessor.LifeCycleStatusPropertyPausable.PauseAutomaton, Pausable.PauseBuilder<B extends Pausable.PauseBuilder<B>>, Pausable.UncheckedPausableResumable.ResumeAutomaton, Resumable.ResumeBuilder<B extends Resumable.ResumeBuilder<B>>, Resumable.UncheckedResumableRunningAccessor.RunningMutator, RunningAccessor.RunningPropertyStartable.StartAutomaton, Startable.StartBuilder<B extends Startable.StartBuilder<B>>, Startable.UncheckedStartableStoppable.StopAutomaton, Stoppable.StopBuilder<B extends Stoppable.StopBuilder<B>>, Stoppable.UncheckedStoppable| Constructor | Description |
|---|---|
LifeCycleAutomatonImpl() |
Empty constructor, such
LifeCycleComponent.LifeCycleAutomaton cannot do much more
than decline the various LifeCycleStatus states for you. |
LifeCycleAutomatonImpl(LifeCycleComponent aLifeCycleComponent) |
This constructor uses a
LifeCycleStatus for wrapping it inside
the LifeCycleAutomatonImpl, making sure of obeying and guarding
the correct LifeCycleStatus's order of LifeCycleStatus
states for you. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
destroy() |
Destroys the component.
|
protected LifeCycleComponent |
getLifeCycleComponent() |
Provides access to the
LifeCycleComponent instance. |
LifeCycleStatus |
getLifeCycleStatus() |
Retrieves the
LifeCycleStatus property from the property. |
void |
initialize() |
Initialize the component.
|
boolean |
isDestroyable() |
Determines whether the component may get destroyed.
|
boolean |
isDestroyed() |
Determines whether the component is destroyed.
|
boolean |
isInitalizable() |
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.
|
protected void |
setLifeCycleStatus(LifeCycleStatus aStatus) |
Provides means to set the
LifeCycleStatus manually. |
void |
start() |
Starts the component.
|
void |
stop() |
Stops the component.
|
initializeUncheckedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpauseUncheckedresumeUncheckedstartUncheckedstopUncheckedpublic LifeCycleAutomatonImpl()
LifeCycleComponent.LifeCycleAutomaton cannot do much more
than decline the various LifeCycleStatus states for you.public LifeCycleAutomatonImpl(LifeCycleComponent aLifeCycleComponent)
LifeCycleStatus for wrapping it inside
the LifeCycleAutomatonImpl, making sure of obeying and guarding
the correct LifeCycleStatus's order of LifeCycleStatus
states for you.aLifeCycleComponent - The component to be guarded regarding the
correct declination of the LifeCycleStatus states.public LifeCycleStatus getLifeCycleStatus()
LifeCycleStatus 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()
throws InitializeException
initialize in interface InitializableInitializeException - Thrown in case initializing fails.public boolean isInitalizable()
isInitalizable in interface Initializable.InitializeAutomatonInitializable.initialize() is possible.public boolean isInitialized()
Initializable.initialize() or
Configurable.initialize(Object).isInitialized in interface InitializedAccessorpublic boolean isStartable()
isStartable in interface Startable.StartAutomatonStartable.start() is possible.public void start()
throws StartException
start in interface StartableStartException - Thrown in case starting fails.public boolean isRunning()
Startable.start() or
Resumable.resume().isRunning in interface RunningAccessorpublic boolean isPausable()
isPausable in interface Pausable.PauseAutomatonPausable.pause() is possible.public void pause()
throws PauseException
pause in interface PausablePauseException - in case pausing fails.public boolean isPaused()
isPaused in interface Pausable.PauseAutomatonpublic boolean isResumable()
isResumable in interface Resumable.ResumeAutomatonResumable.resume() is possible.public void resume()
throws ResumeException
resume in interface ResumableResumeException - Thrown in case resuming fails.public boolean isStoppable()
isStoppable in interface Stoppable.StopAutomatonStoppable.stop() is possible.public void stop()
throws StopException
stop in interface StoppableStopException - Thrown in case stopping fails.public boolean isStopped()
isStopped in interface Stoppable.StopAutomatonpublic boolean isDestroyable()
isDestroyable in interface Destroyable.DestroyAutomatonDestroyable.destroy() is possible.public void destroy()
Component 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()
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.isDestroyed in interface Destroyable.DestroyAutomatonprotected LifeCycleComponent getLifeCycleComponent()
LifeCycleComponent instance.LifeCycleComponent instance being set.protected void setLifeCycleStatus(LifeCycleStatus aStatus)
LifeCycleStatus manually.aStatus - The LifeCycleStatus to be set.Copyright © 2018. All rights reserved.