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.EngineEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.speech.SpeechEvent
              |
              +--javax.speech.EngineEvent
Subclasses:
EngineErrorEvent, RecognizerEvent, SynthesizerEvent

public class EngineEvent
extends SpeechEvent
EngineEvent notifies changes in state of a speech synthesis or recognition engine. EngineEvents are issued to each EngineListener attached to an engine. The RecognizerEvent and SynthesizerEvent classes both extend EngineEvent to provide specific events for recognizers and synthesizers.

See Also:
EngineListener, RecognizerEvent, SynthesizerEvent, Serialized Form

Field Summary
static int ENGINE_ALLOCATED
          Identifier for event issued when engine allocation is complete.
static int ENGINE_ALLOCATING_RESOURCES
          Identifier for event issued when engine allocation has commenced.
static int ENGINE_DEALLOCATED
          Identifier for event issued when engine deallocation is complete.
static int ENGINE_DEALLOCATING_RESOURCES
          Identifier for event issued when engine deallocation has commenced.
static int ENGINE_PAUSED
          Identifier for event issued when engine is paused.
static int ENGINE_RESUMED
          Identifier for event issued when engine is resumed.
long newEngineState
          Engine state following this event.
long oldEngineState
          Engine state following prior to this event.
 
Fields inherited from class javax.speech.SpeechEvent
id
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
EngineEvent(Engine source, int id, long oldEngineState, long newEngineState)
          Constructs an EngineEvent with an event identifier, old engine state and new engine state.
 
Method Summary
long getNewEngineState()
          Return the state following this EngineEvent.
long getOldEngineState()
          Return the state prior to this EngineEvent.
String paramString()
          Returns a parameter string identifying this event.
 
Methods inherited from class javax.speech.SpeechEvent
getId, paramString, toString
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

ENGINE_ALLOCATED

public static final int ENGINE_ALLOCATED
Identifier for event issued when engine allocation is complete. The ALLOCATED flag of the newEngineState is set.

See Also:
getNewEngineState, getId, allocate, engineAllocated

ENGINE_DEALLOCATED

public static final int ENGINE_DEALLOCATED
Identifier for event issued when engine deallocation is complete. The DEALLOCATED flag of the newEngineState is set.

See Also:
getNewEngineState, getId, allocate, engineDeallocated

ENGINE_ALLOCATING_RESOURCES

public static final int ENGINE_ALLOCATING_RESOURCES
Identifier for event issued when engine allocation has commenced. The ALLOCATING_RESOURCES flag of the newEngineState is set.

See Also:
getNewEngineState, getId, allocate, engineAllocatingResources

ENGINE_DEALLOCATING_RESOURCES

public static final int ENGINE_DEALLOCATING_RESOURCES
Identifier for event issued when engine deallocation has commenced. The DEALLOCATING_RESOURCES flag of the newEngineState is set.

See Also:
getNewEngineState, getId, allocate, engineDeallocatingResources

ENGINE_PAUSED

public static final int ENGINE_PAUSED
Identifier for event issued when engine is paused. The PAUSED flag of the newEngineState is set.

See Also:
getNewEngineState, getId, pause, enginePaused

ENGINE_RESUMED

public static final int ENGINE_RESUMED
Identifier for event issued when engine is resumed. The RESUMED flag of the newEngineState is set.

See Also:
getNewEngineState, getId, resume, engineResumed

newEngineState

protected long newEngineState
Engine state following this event.

See Also:
getNewEngineState

oldEngineState

protected long oldEngineState
Engine state following prior to this event.

See Also:
getOldEngineState
Constructor Detail

EngineEvent

public EngineEvent(Engine source,
                   int id,
                   long oldEngineState,
                   long newEngineState)
Constructs an EngineEvent with an event identifier, old engine state and new engine state.

Parameters:
source - the object that issued the event
id - the identifier for the event type
oldEngineState - engine state prior to this event
newEngineState - engine state following this event
See Also:
getEngineState
Method Detail

getNewEngineState

public long getNewEngineState()
Return the state following this EngineEvent. The value matches the getEngineState method.

See Also:
getEngineState

getOldEngineState

public long getOldEngineState()
Return the state prior to this EngineEvent. The value matches the getEngineState method.

See Also:
getEngineState

paramString

public String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.

Returns:
a string identifying the event
Overrides:
paramString in class SpeechEvent

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