|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.smartgears.lifecycle.DefaultLifecycle<S>
public class DefaultLifecycle<S extends State<S>>
| Constructor Summary | |
|---|---|
DefaultLifecycle(org.gcube.common.events.Hub hub,
String name,
S startState)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultLifecycle(org.gcube.common.events.Hub hub,
String name,
S startState)
| Method Detail |
|---|
public S state()
Lifecycle
state in interface Lifecycle<S extends State<S>>public void moveTo(S next)
Lifecycle
moveTo in interface Lifecycle<S extends State<S>>next - the statepublic boolean tryMoveTo(S next)
Lifecycle
tryMoveTo in interface Lifecycle<S extends State<S>>next - the state
true if this lifecycle has transitioned to the given statepublic S previous()
Lifecycle
previous in interface Lifecycle<S extends State<S>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||