public class DefaultLifecycle<S extends State<S>> extends Object implements Lifecycle<S>
| Constructor and Description |
|---|
DefaultLifecycle(org.gcube.common.events.Hub hub,
String name,
S startState) |
| Modifier and Type | Method and Description |
|---|---|
void |
moveTo(S next)
Transition this lifecycle to a given state.
|
S |
previous()
Returns the state from which this lifecycle transitioned to its current state.
|
S |
state()
Returns the current state of this lifecycle.
|
boolean |
tryMoveTo(S next)
Attempts to transition this lifecycle to a given state, but does not fail if the transition is illegal for this lifecycle.
|
public S state()
Lifecyclepublic void moveTo(S next)
Lifecyclepublic boolean tryMoveTo(S next)
LifecycleCopyright © 2014. All Rights Reserved.