|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shale.dialog.impl.AbstractState
public abstract class AbstractState
Abstract base class for State definitions. Each state is owned
by exactly one owning Dialog. While an application
is running, Dialog (and the constituent States and
other configuration information) is immutable, so that it may be
shared by multiple simultaneous paths of execution.
| Field Summary | |
|---|---|
protected Log |
log
Log instance for this instance. |
| Constructor Summary | |
|---|---|
AbstractState()
|
|
| Method Summary | |
|---|---|
void |
addTransition(Transition transition)
Add the specified Transition to the Transitions owned
by this State. |
Transition |
findTransition(String outcome)
Return the Transition for the specified logical outcome,
if any; otherwise, return null. |
Dialog |
getDialog()
|
String |
getName()
Return the identifier of this |
Iterator |
getTransitionOutcomes()
Return an |
void |
removeTransition(Transition transition)
Remove the specified Transition from the Transitions
owned by this State, if it is currently registered. |
void |
setDialog(Dialog dialog)
Set the Dialog that owns this State. |
void |
setName(String name)
Set the identifier of this State, which must be unique
among the States owned by the same Dialog. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Log log
Log instance for this instance.
| Constructor Detail |
|---|
public AbstractState()
| Method Detail |
|---|
public Dialog getDialog()
public String getName()
Return the identifier of this State, which must be unique
among the States owned by the same Dialog.
getName in interface Statepublic Iterator getTransitionOutcomes()
Return an Iterator over the logical outcomes of
local Transitions for this State. If there are
no such Transitions, an empty Iterator is
returned.
getTransitionOutcomes in interface Statepublic Transition findTransition(String outcome)
Return the Transition for the specified logical outcome,
if any; otherwise, return null.
findTransition in interface Stateoutcome - Logical outcome for which to return a Transition
public void addTransition(Transition transition)
throws IllegalArgumentException
Add the specified Transition to the Transitions owned
by this State.
transition - Transition to be added
IllegalArgumentException - if the specified Transition
cannot be added to this Statepublic void removeTransition(Transition transition)
Remove the specified Transition from the Transitions
owned by this State, if it is currently registered. Otherwise,
do nothing.
transition - Transition to be removedpublic void setDialog(Dialog dialog)
public void setName(String name)
Set the identifier of this State, which must be unique
among the States owned by the same Dialog.
name - New identifier
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||