public class ActivationLifeCycle
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ActivationLifeCycle.Transition |
| Modifier | Constructor and Description |
|---|---|
protected |
ActivationLifeCycle(ActivationState inactiveState) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addStateTransition(ActivationLifeCycle.Transition transition)
Extends the life cycle with a new transition that is created
from the given state, labeled with the given event and leading
to the given state.
|
boolean |
addStateTransition(ActivationState from,
EventType event,
ActivationState to)
Extends the life cycle with a new transition that is created
from the given state, labeled with the given event and leading
to the given state.
|
boolean |
containsFrom(ActivationState state)
Check that the life-cycle contains a transition from the given state.
|
boolean |
containsTo(ActivationState state)
Check that the life-cycle contains a transition to the given state.
|
static ActivationLifeCycle |
copyOf(ActivationLifeCycle lifeCycle)
Creates a complete copy of the life-cycle
|
static ActivationLifeCycle |
create(ActivationState inactiveState) |
ActivationState |
getInactiveState() |
java.util.Set<ActivationLifeCycle.Transition> |
getStateTransitions()
Returns a copy of the transition table.
|
ActivationState |
nextActivationState(ActivationState currentState,
EventType event)
Returns the state in the life cycle that is defined as the next state
from the given current state in response to the given event.
|
java.lang.String |
toString() |
protected ActivationLifeCycle(ActivationState inactiveState)
public ActivationState nextActivationState(ActivationState currentState, EventType event)
currentState - the current state of the activationevent - the event that causes the state transitionpublic boolean addStateTransition(ActivationState from, EventType event, ActivationState to)
from - the source state of the transitionevent - the event causing the transitionto - the target state of the transitionpublic boolean addStateTransition(ActivationLifeCycle.Transition transition)
from - the source state of the transitionevent - the event causing the transitionto - the target state of the transitionpublic boolean containsFrom(ActivationState state)
state - public boolean containsTo(ActivationState state)
state - public static ActivationLifeCycle copyOf(ActivationLifeCycle lifeCycle)
lifeCycle - the life-cycée to be copiedpublic static ActivationLifeCycle create(ActivationState inactiveState)
public java.util.Set<ActivationLifeCycle.Transition> getStateTransitions()
public ActivationState getInactiveState()
public java.lang.String toString()
toString in class java.lang.Object