org.jvoicexml.implementation
Class BufferedCharacterInput

java.lang.Object
  extended by org.jvoicexml.implementation.BufferedCharacterInput
All Implemented Interfaces:
CharacterInput, ObservableUserInput, InputDevice, RemoteConnectable

public final class BufferedCharacterInput
extends Object
implements CharacterInput, ObservableUserInput

Buffered DTMF input.

Since:
0.5
Version:
$LastChangedRevision: 216 $

Copyright © 2006-2007 JVoiceXML group - http://jvoicexml.sourceforge.net/

Author:
Dirk Schnelle

Constructor Summary
BufferedCharacterInput()
          Constructs a new object.
 
Method Summary
 void addCharacter(char dtmf)
          The user entered a DTMF.
 void connect(RemoteClient client)
          Establishes a connection from the given RemoteClient to this object.
 void setUserInputListener(UserInputListener listener)
          Sets the listener for user input events.
 void startRecognition()
          Detects and reports character and/or spoken input simultaneously.
 void stopRecognition()
          Stops a previously started recognition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferedCharacterInput

public BufferedCharacterInput()
Constructs a new object.

Method Detail

addCharacter

public void addCharacter(char dtmf)
The user entered a DTMF.

Specified by:
addCharacter in interface CharacterInput
Parameters:
dtmf - Entered DTMF.

startRecognition

public void startRecognition()
                      throws NoresourceError,
                             BadFetchError
Detects and reports character and/or spoken input simultaneously.

Specified by:
startRecognition in interface CharacterInput
Specified by:
startRecognition in interface InputDevice
Throws:
NoresourceError - The input resource is not available.
BadFetchError - The active grammar contains some errors.

stopRecognition

public void stopRecognition()
Stops a previously started recognition.

Specified by:
stopRecognition in interface CharacterInput
Specified by:
stopRecognition in interface InputDevice
See Also:
CharacterInput.startRecognition()

setUserInputListener

public void setUserInputListener(UserInputListener listener)
Sets the listener for user input events.

The implementation of this interface must notify the listener about all events.

Note: This method might not be called, e.g. if there is no UserInput.

Specified by:
setUserInputListener in interface ObservableUserInput
Parameters:
listener - The listener.

connect

public void connect(RemoteClient client)
             throws IOException
Establishes a connection from the given RemoteClient to this object.

Specified by:
connect in interface RemoteConnectable
Parameters:
client - data container with connection relevant data.
Throws:
IOException - error establishing the connection.
Stuff to complete
implement this method.


Copyright © 2005-2007 JVoiceXML group.