com.jthomas.mailfaces
Class FaceAudio

java.lang.Object
  |
  +--com.jthomas.mailfaces.FaceAudio
All Implemented Interfaces:
java.lang.Runnable

public class FaceAudio
extends java.lang.Object
implements java.lang.Runnable

FaceAudio runs as a separate Thread and accepts requests to play an audio file (*.au) that is pointed to by a URL.


Constructor Summary
FaceAudio()
          The FaceAudio object is a Singleton and its constructor is called by MailFaces initialization() It creates a queue that other components can place audio requests using the queuePut(String url) method.
 
Method Summary
 void queuePut(java.lang.Object obj)
          queuePut is used by other objects to place an audiourl String into the FaceAudio work queue.
 void run()
          run() method will wait for audio requests and play them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FaceAudio

public FaceAudio()
The FaceAudio object is a Singleton and its constructor is called by MailFaces initialization() It creates a queue that other components can place audio requests using the queuePut(String url) method.

Method Detail

run

public void run()
run() method will wait for audio requests and play them.

The run() method is given control when the thread is started. It will get requests from the Queue which are urls that represent an audio .au file. It will invode the play(url) method to actually play the audio.

Specified by:
run in interface java.lang.Runnable

queuePut

public void queuePut(java.lang.Object obj)
queuePut is used by other objects to place an audiourl String into the FaceAudio work queue.