org.jvoicexml.event
Class JVoiceXMLEvent

java.lang.Object
  extended by java.lang.Throwable
      extended by org.jvoicexml.event.JVoiceXMLEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ErrorEvent, GenericVoiceXmlEvent, PlainEvent

public abstract class JVoiceXMLEvent
extends Throwable

Base class for all events.

The platform throws events when the user does not respond, doesn't respond in a way that the application understands, requests help, etc. The interpreter throws events if it finds a semantic error in a VoiceXML document, or when it encounters a <throw> element. Events are identified by character strings.

Events are subdivided into plain events (things that happen normally), and error events (abnormal occurrences).

Version:
$Revision: 2476 $
Author:
Dirk Schnelle-Walka
See Also:
Serialized Form

Constructor Summary
JVoiceXMLEvent()
          Constructs a new event with the event type as its detail message.
JVoiceXMLEvent(String message)
          Constructs a new event with the specified detail message. the given detail message is expanded to the form <EVENT_TYPE>>: <message>.
JVoiceXMLEvent(String message, Throwable cause)
          Constructs a new event with the specified detail message and cause.
JVoiceXMLEvent(Throwable cause)
          Constructs a new event with the specified cause and a detail message of (cause==null ?
 
Method Summary
abstract  String getEventType()
          Get the event type of this event.
 String getMessage()
           Preceed the type to the original message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JVoiceXMLEvent

public JVoiceXMLEvent()
Constructs a new event with the event type as its detail message. The cause is not initialized.

See Also:
getEventType()

JVoiceXMLEvent

public JVoiceXMLEvent(String message)
Constructs a new event with the specified detail message. the given detail message is expanded to the form <EVENT_TYPE>>: <message>. The cause is not initialized.

Parameters:
message - The detail message.
See Also:
getEventType()

JVoiceXMLEvent

public JVoiceXMLEvent(Throwable cause)
Constructs a new event with the specified cause and a detail message of (cause==null ? getEventType() : cause.toString()) (which typically contains the class and detail message of cause).

Parameters:
cause - The cause.
See Also:
getEventType()

JVoiceXMLEvent

public JVoiceXMLEvent(String message,
                      Throwable cause)
Constructs a new event with the specified detail message and cause.

Parameters:
message - The detail message.
cause - The cause.
Method Detail

getEventType

public abstract String getEventType()
Get the event type of this event.

Returns:
Event type.

getMessage

public final String getMessage()

Preceed the type to the original message. The returned String evaluates to type: message.

Overrides:
getMessage in class Throwable


Copyright © 2005-2010JVoiceXML group.