Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class javax.speech.synthesis.SynthesizerQueueItem

java.lang.Object
  |
  +--javax.speech.synthesis.SynthesizerQueueItem

public class SynthesizerQueueItem
extends Object
Represents an object on the speech output queue of a Synthesizer. The item is described by the source object, the speakable text, a boolean value indicating whether it is a plain text object, and the SpeakableListener for the object.

The source object is the object provided to a speak method (a Speakable objects, a URL, or a String). The text is the Java Speech Markup Language string or plain text obtained from the source object. The listener is the SpeakableListener object passed to the speak method, or null.

The enumerateQueue method of a Synthesizer provides a snapshot of the speech output queue. It returns an enumeration object that is null if the queue is empty or contains a set of SynthesizerQueueItems. The Synthesizer's queue cannot be manipulated through this enumeration object.

See Also:
Synthesizer, enumerateQueue

Field Summary
SpeakableListener listener
          The listener for this object passed to the speak method or null.
boolean plainText
          True if the text object is plain text (not Java Speech Markup Language).
Object source
          The soure object for an item on the speech output queue.
String text
          The speakable text for an item on the speech output queue.
 
Constructor Summary
SynthesizerQueueItem(Object source, String text, boolean plainText, SpeakableListener listener)
          Construct a SynthesizerQueueItem with the source object and speakable text.
 
Method Summary
Object getSource()
          Return the source object for an item on the speech output queue of a Synthesizer.
SpeakableListener getSpeakableListener()
          Return the SpeakableListener object for this speech output queue item, or null if none was provided to the speak method.
String getText()
          Return the speakable text for an item on the speech output queue of a Synthesizer.
boolean isPlainText()
          Return true if the item contains plain text (not Java Speech Markup Language text).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

source

protected Object source
The soure object for an item on the speech output queue.

See Also:
getSource

text

protected String text
The speakable text for an item on the speech output queue.

See Also:
getText

plainText

protected boolean plainText
True if the text object is plain text (not Java Speech Markup Language).

See Also:
isPlainText

listener

protected SpeakableListener listener
The listener for this object passed to the speak method or null.

See Also:
getSpeakableListener
Constructor Detail

SynthesizerQueueItem

public SynthesizerQueueItem(Object source,
                            String text,
                            boolean plainText,
                            SpeakableListener listener)
Construct a SynthesizerQueueItem with the source object and speakable text.
Method Detail

getSource

public Object getSource()
Return the source object for an item on the speech output queue of a Synthesizer. The source is one of the three object types passed to the speak or speakPlainText methods of Synthesizer: a Speakable objects, a URL, or a String.

getText

public String getText()
Return the speakable text for an item on the speech output queue of a Synthesizer. The text is either a Java Speech Markup Language string or a plain text string that was obtained from source object.

isPlainText

public boolean isPlainText()
Return true if the item contains plain text (not Java Speech Markup Language text).

getSpeakableListener

public SpeakableListener getSpeakableListener()
Return the SpeakableListener object for this speech output queue item, or null if none was provided to the speak method.

Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

JavaTM Speech API
Copyright 1997-1998 Sun Microsystems, Inc. All rights reserved
Send comments to javaspeech-comments@sun.com