|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable gui.transact.Transaction
public class Transaction
This class models a transaction (i.e. a communication with the speech/dialogue server) . This class contains the "context" of the state machine. A Transaction object records which instance of TrState is the current state and a history of the states. Subclasses of TrState use a Transition object to communicate changes in the state back to the Transaction.
Field Summary | |
---|---|
private ApplicationState |
appState
|
private SpeechHandler |
calRecHandler
|
private static java.lang.String |
CMD_REMOVE_CONTEXT
|
private CalendarConfiguration |
config
|
(package private) ClientCom |
dialClient
|
private DialogueServerHandler |
dialServHandler
|
static java.util.logging.Logger |
logger
|
private Dialogue |
observableDialog
|
private static java.lang.String |
OK_RESPONSE_REMOVE_CONTEXT
|
private TrState |
state
|
private boolean |
visitedReadyState
|
private java.util.Vector<TrState> |
visitedStates
|
Constructor Summary | |
---|---|
Transaction(CalendarConfiguration config,
ApplicationState appState,
Dialogue observableDialog)
|
Method Summary | |
---|---|
protected void |
addVisitedState(TrState visitedState)
|
(package private) ApplicationState |
getAppState()
|
(package private) SpeechHandler |
getCalRecHandler()
|
(package private) CalendarConfiguration |
getConfig()
|
protected ClientCom |
getDialClient()
|
(package private) DialogueServerHandler |
getDialServHandler()
|
(package private) Dialogue |
getObservableDialog()
|
protected java.util.Vector<TrState> |
getVisitedStates()
|
(package private) boolean |
isVisitedReadyState()
|
void |
nextStep()
When the tasks for this state were executed already, then the user can ask for the next state. |
void |
removeVisitedStates()
Removes all visited states, except TRInitGlobalProcesses state |
void |
runTasks()
Executes the tasks for the current state. |
void |
sendRemoveContextCmdToDialogueServer()
Invokes the dialogue server |
(package private) java.lang.String |
sendRequestToDialogueServer(java.lang.String msg4DialogueServer)
Sends a message to the dialogue server. |
protected void |
setDialClient(ClientCom dialClient)
|
void |
setState(TrState state)
Changes the current state and notifies observers of Transaction. |
(package private) void |
setVisitedReadyState(boolean visitedReadyState)
|
java.lang.String |
status()
|
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.util.logging.Logger logger
private static final java.lang.String CMD_REMOVE_CONTEXT
private static final java.lang.String OK_RESPONSE_REMOVE_CONTEXT
private TrState state
private java.util.Vector<TrState> visitedStates
private boolean visitedReadyState
private CalendarConfiguration config
private ApplicationState appState
private Dialogue observableDialog
private SpeechHandler calRecHandler
private DialogueServerHandler dialServHandler
ClientCom dialClient
Constructor Detail |
---|
public Transaction(CalendarConfiguration config, ApplicationState appState, Dialogue observableDialog)
Method Detail |
---|
boolean isVisitedReadyState()
void setVisitedReadyState(boolean visitedReadyState)
protected java.util.Vector<TrState> getVisitedStates()
protected void addVisitedState(TrState visitedState)
Dialogue getObservableDialog()
CalendarConfiguration getConfig()
ApplicationState getAppState()
SpeechHandler getCalRecHandler()
DialogueServerHandler getDialServHandler()
public void nextStep()
public void runTasks()
public void setState(TrState state)
public java.lang.String status()
public void removeVisitedStates()
protected ClientCom getDialClient()
protected void setDialClient(ClientCom dialClient)
java.lang.String sendRequestToDialogueServer(java.lang.String msg4DialogueServer)
msg4DialogueServer
- message to be send to the dialogue server. e.g., msg4DialogueServer contains the N-best list previously received from the regServer.
public void sendRemoveContextCmdToDialogueServer()
msg4DialogueServer
- message to be send to the dialogue server
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |