|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectavignon.handlers.MessagePlayer
Plays Allows the Allows the sequential playing of WAV files started at different times.
| Constructor Summary | |
protected |
MessagePlayer()
Protected constructor to be used internally and by subclasses during unit testing. |
| Method Summary | |
boolean |
anyQueuedMessages()
Allows the programmer to determine if any messages remain in the queue. |
static void |
enqueueAudioMessage(java.lang.String message)
Addeds a message to the playlist. |
protected javax.sound.sampled.AudioInputStream |
getAudioInputStream(java.lang.String message)
Creates an AudioInputStream for a WAV file specified by the parameter. |
protected javax.sound.sampled.Clip |
getClip()
Creates a Clip that can be used to play an AudioInputStream. |
static MessagePlayer |
getInstance()
Allows access to the single instance of the message player. |
static java.lang.String |
getLastEnqueuedMessage()
Used in unit testing to determine the last message added to the queue. |
void |
run()
Run method for Thread. |
static void |
shunt(boolean on)
Allows the programmer to turn off the actual message playing during unit testing. |
void |
stop()
Stops the message playing thread. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected MessagePlayer()
| Method Detail |
protected javax.sound.sampled.AudioInputStream getAudioInputStream(java.lang.String message)
message - File name of the WAV file to be played.
protected javax.sound.sampled.Clip getClip()
public static java.lang.String getLastEnqueuedMessage()
public static void enqueueAudioMessage(java.lang.String message)
message - The file name of the WAV file to play.public static void shunt(boolean on)
on - True to turn off message playing.public static MessagePlayer getInstance()
public void run()
run in interface java.lang.Runnablepublic boolean anyQueuedMessages()
public void stop()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||