Class PALplate.mud.AudioClient
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class PALplate.mud.AudioClient

java.lang.Object
   |
   +----PALplate.mud.MudClient
           |
           +----PALplate.mud.AudioClient

public class AudioClient
extends MudClient
This class is similar to the MudClient, but instead of returning strings which are sent to it from the mud, it pipes them through a text->speech program and returns a way to play those strings to anyone using the client.

Variable Index

 o inputStream
This makes it easier to recieve messages from the socket connection which we accepted
 o outputStream
This makes it easier to send messages to the socket connection which we accepted

Constructor Index

 o AudioClient(String, int)
 o AudioClient(String, int, String)

Method Index

 o dealWithInputLine(String)
 o dealWithPrefixInputLine(String)
We're overriding this function so that instead of just sending the string straight to whoever's interested, we turn it into audio first.

Variables

 o outputStream
  protected PrintStream outputStream
This makes it easier to send messages to the socket connection which we accepted
 o inputStream
  protected DataInputStream inputStream
This makes it easier to recieve messages from the socket connection which we accepted

Constructors

 o AudioClient
  public AudioClient(String host,
                     int port,
                     String pr)
 o AudioClient
  public AudioClient(String host,
                     int port)

Methods

 o dealWithPrefixInputLine
  protected boolean dealWithPrefixInputLine(String inputLine)
We're overriding this function so that instead of just sending the string straight to whoever's interested, we turn it into audio first. is this the right place to do this? hmmm this is tricky. I shouldn't have a null prefix, 'cause any line with a prefix also has to have a tag. so since i have to have a tag, and many lines don't have tags, what do I do with the lines without tags? Those are the lines I"m most likely to want to speak right now. and for that matter, how can I allow someone to specify interest in every tag? for now, just print everything we get to the speech synthesizer, and do everything else the mudclient normally does.
Overrides:
dealWithPrefixInputLine in class MudClient
 o dealWithInputLine
  protected boolean dealWithInputLine(String inputLine)
Overrides:
dealWithInputLine in class MudClient

All Packages  Class Hierarchy  This Package  Previous  Next  Index