|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.jvoicexml.client.text.TextServer
public final class TextServer
Socket server to stream text from and to the JVoiceXML interpreter using a text based client interface.
After starting the server using Thread.start()
and registering TextListeners using
addTextListener(TextListener) the output of JVoiceXml can be
observed via the registered TextListener.
The ConnectionInformation object that has to be passed to the
JVoiceXml.createSession(ConnectionInformation) method can
be obtained via the getConnectionInformation() method.
| 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 | |
|---|---|
TextServer(int serverPort)
Constructs a new object. |
|
| Method Summary | |
|---|---|
void |
addTextListener(TextListener textListener)
Adds the given text listener to the list of known listeners. |
ConnectionInformation |
getConnectionInformation()
Creates a connection information container that can be used when making a call. |
void |
run()
|
void |
sendInput(String input)
Send the given input as a recognition result to JVoiceXml. |
void |
stopServer()
Stops this server. |
void |
waitConnected()
Waits until a connection to JVoiceXml has been established after an application has been called. |
| 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 |
|---|
public TextServer(int serverPort)
serverPort - port number to use.| Method Detail |
|---|
public void addTextListener(TextListener textListener)
textListener - the listener to add.
public ConnectionInformation getConnectionInformation()
throws UnknownHostException
UnknownHostException - IP address could not be determined.public void run()
run in interface Runnablerun in class Thread
public void waitConnected()
throws IOException
IOException - Error in connection.
public void sendInput(String input)
throws IOException
input - the input to send.
IOException - Error sending the input.public void stopServer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||