inpro.incremental.processor
Class AbstractDialogueManager

java.lang.Object
  extended by inpro.incremental.PushBuffer
      extended by inpro.incremental.IUModule
          extended by inpro.incremental.processor.AbstractDialogueManager
All Implemented Interfaces:
edu.cmu.sphinx.instrumentation.Resetable, edu.cmu.sphinx.util.props.Configurable, AbstractFloorTracker.Listener, AudioActionManager.Listener
Direct Known Subclasses:
EchoDialogueManager, IUNetworkDialogueManager

public abstract class AbstractDialogueManager
extends IUModule
implements AbstractFloorTracker.Listener, AudioActionManager.Listener

An abstract DM. Has basic provisions for action management and floor tracking. Also provides mechanisms for queuing input while its updating.

Author:
timo, okko

Nested Class Summary
 
Nested classes/interfaces inherited from class inpro.incremental.IUModule
IUModule.RightBuffer
 
Field Summary
protected  java.util.List<DialogueActIU> doneQueue
          Queue for performed DialogueActs for post-update processing
protected  java.util.List<AbstractFloorTracker.Signal> floorSignalQueue
          Queue for incoming floor signals for post-update processing
protected  java.util.List<EditMessage<IU>> leftBufferQueue
          Queue for left-buffer EditMessages for post-update processing
protected  boolean updating
          Flag for whether the DM is currently updating itself
 
Fields inherited from class inpro.incremental.IUModule
iulisteners, logger, PROP_HYP_CHANGE_LISTENERS, PROP_LOG_TO_TEDVIEW, PROP_TEDVIEW_LOG_ADDRESS, PROP_TEDVIEW_LOG_PORT, rightBuffer, tedLogAdapter
 
Constructor Summary
AbstractDialogueManager()
           
 
Method Summary
 void done(DialogueActIU iu)
          Listens to an action manager.
 void floor(AbstractFloorTracker.Signal signal, AbstractFloorTracker floorManager)
          Listens for floor changes and updates the InformationState Must call postUpdate() if calling this method.
 void leftBufferUpdate(java.util.Collection<? extends IU> ius, java.util.List<? extends EditMessage<? extends IU>> edits)
          Queues edits for later processing.
protected  void postUpdate()
          To call when updates are done.
 
Methods inherited from class inpro.incremental.IUModule
getTime, hypChange, logToTedView, newProperties
 
Methods inherited from class inpro.incremental.PushBuffer
reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.cmu.sphinx.util.props.Configurable
newProperties
 

Field Detail

updating

protected boolean updating
Flag for whether the DM is currently updating itself


leftBufferQueue

protected java.util.List<EditMessage<IU>> leftBufferQueue
Queue for left-buffer EditMessages for post-update processing


doneQueue

protected java.util.List<DialogueActIU> doneQueue
Queue for performed DialogueActs for post-update processing


floorSignalQueue

protected java.util.List<AbstractFloorTracker.Signal> floorSignalQueue
Queue for incoming floor signals for post-update processing

Constructor Detail

AbstractDialogueManager

public AbstractDialogueManager()
Method Detail

floor

public void floor(AbstractFloorTracker.Signal signal,
                  AbstractFloorTracker floorManager)
Listens for floor changes and updates the InformationState Must call postUpdate() if calling this method.

Specified by:
floor in interface AbstractFloorTracker.Listener
Parameters:
signal - the signal describing the change in the floor
floorManager - the floor manager itself. in this way a consumer can request e.g. to change timeouts

leftBufferUpdate

public void leftBufferUpdate(java.util.Collection<? extends IU> ius,
                             java.util.List<? extends EditMessage<? extends IU>> edits)
Queues edits for later processing. Must call postUpdate() if calling this method.

Specified by:
leftBufferUpdate in class IUModule
Parameters:
ius - list of IUs that make up the current hypothesis
edits - a list of edits since the last call

done

public void done(DialogueActIU iu)
Listens to an action manager. Queues all done IUs for post-update processing. Must call postUpdate() if calling this method.

Specified by:
done in interface AudioActionManager.Listener

postUpdate

protected void postUpdate()
To call when updates are done. Implements the queue/dequeue logic. Must be called after/at end of done(), floor() and leftBufferUpdate().