org.jvoicexml.client.text
Class TextClient

java.lang.Object
  extended by java.lang.Thread
      extended by org.jvoicexml.client.text.TextClient
All Implemented Interfaces:
Runnable

public final class TextClient
extends Thread

A client for the TextCallManager.

Since:
0.7.5
Version:
$Revision: $
Author:
Dirk Schnelle-Walka

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TextClient(InetAddress callmanagerAddress, int callmanagerPort)
          Constructs a new object.
TextClient(int callmanagerPort)
          Constructs a new object.
TextClient(String callmanagerAddress, int callmanagerPort)
          Constructs a new object.
 
Method Summary
 void addTextListener(TextListener textListener)
          Adds the given text listener to the list of known listeners.
 void call(URI uri)
          Calls the application with the given URI.
 void hangup()
          Hangup.
 void run()
          
 void sendInput(String input)
          Send the given input as a recognition result to JVoiceXml.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextClient

public TextClient(int callmanagerPort)
           throws UnknownHostException
Constructs a new object.

Parameters:
callmanagerPort - of the text based call manager
Throws:
UnknownHostException - Unable to determine the local host

TextClient

public TextClient(String callmanagerAddress,
                  int callmanagerPort)
           throws UnknownHostException
Constructs a new object.

Parameters:
callmanagerAddress - address of the text based call manager
callmanagerPort - of the text based call manager
Throws:
UnknownHostException - Unable to determine the local host

TextClient

public TextClient(InetAddress callmanagerAddress,
                  int callmanagerPort)
Constructs a new object.

Parameters:
callmanagerAddress - address of the text based call manager
callmanagerPort - of the text based call manager
Method Detail

addTextListener

public void addTextListener(TextListener textListener)
Adds the given text listener to the list of known listeners.

Parameters:
textListener - the listener to add.

call

public void call(URI uri)
          throws IOException
Calls the application with the given URI.

Parameters:
uri - the URI of the application to call
Throws:
IOException - error connecting to the call manager

hangup

public void hangup()
            throws IOException
Hangup.

Throws:
IOException - error disconnecting

run

public void run()

Specified by:
run in interface Runnable
Overrides:
run in class Thread

sendInput

public void sendInput(String input)
               throws IOException
Send the given input as a recognition result to JVoiceXml.

Parameters:
input - the input to send.
Throws:
IOException - Error sending the input.


Copyright © 2005-2009JVoiceXML group.