org.alchar.jdtk
Class Client

java.lang.Object
  extended by org.alchar.jdtk.Client

public class Client
extends Object

This class provides the client end of the client/server API for the DECtalk software speech synthesizer. It provides the facilities for sending requests, receiving responses, and processing callback messages.


Constructor Summary
Client(DECtalk dtk)
          Create a new Client object.
 
Method Summary
 void addResponse(String response)
          Add a response to the receive queue for processing.
 void close()
          Handle a close connection event.
 String[] sendRequest(String cmd, String args)
          Send a request to the DECtalk server.
 void terminate()
          Handle a request to terminate the communication.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client

public Client(DECtalk dtk)
       throws DECtalkException
Create a new Client object.

Throws:
DECtalkException - If fail to connect
Method Detail

addResponse

public void addResponse(String response)
Add a response to the receive queue for processing.

Parameters:
response - Response

terminate

public void terminate()
Handle a request to terminate the communication.


close

public void close()
Handle a close connection event.


sendRequest

public String[] sendRequest(String cmd,
                            String args)
                     throws DECtalkException
Send a request to the DECtalk server.

Parameters:
cmd - Command
args - Argument string
Returns:
Token array containing response
Throws:
DECtalkException - if the operation fails


Copyright © 2007-2009 Kris Van Hees. All Rights Reserved.