Package org.gcube.smartgears.lifecycle
Class DefaultLifecycle<S extends State<S>>
java.lang.Object
org.gcube.smartgears.lifecycle.DefaultLifecycle<S>
- All Implemented Interfaces:
Lifecycle<S>
- Direct Known Subclasses:
ApplicationLifecycle,ContainerLifecycle
Default implementation of Lifecycle
- Author:
- Luca Frosini (ISTI-CNR)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultLifecycle(org.gcube.common.events.Hub hub, String name, S startState) -
Method Summary
Modifier and TypeMethodDescriptionvoidTransition this lifecycle to a given state.previous()Returns the state from which this lifecycle transitioned to its current state.state()Returns the current state of this lifecycle.booleanAttempts to transition this lifecycle to a given state, but does not fail if the transition is illegal for this lifecycle.
-
Constructor Details
-
DefaultLifecycle
-
-
Method Details
-
state
Description copied from interface:LifecycleReturns the current state of this lifecycle. -
moveTo
Description copied from interface:LifecycleTransition this lifecycle to a given state. -
tryMoveTo
Description copied from interface:LifecycleAttempts to transition this lifecycle to a given state, but does not fail if the transition is illegal for this lifecycle. -
previous
Description copied from interface:LifecycleReturns the state from which this lifecycle transitioned to its current state.
-