public class XMLParserNotification
extends java.beans.PropertyChangeEvent
Modifier and Type | Field and Description |
---|---|
protected javax.xml.stream.events.XMLEvent |
event
The
XMLEvent associated with the notification, if any. |
protected java.lang.Exception |
exception
For exception notifications, the exception that occurred.
|
static java.lang.String |
EXCEPTION
A notification type indicating that an exception occurred during parsing.
|
protected java.lang.String |
message
The message sent from the object sending the notification.
|
protected java.lang.Object |
notificationSource
The object initiating the notification.
|
protected java.lang.String |
notificationType
Indicates the cause of the notification.
|
static java.lang.String |
UNRECOGNIZED
A notification type indicating that a parser encounter an element it did not recognize.
|
Constructor and Description |
---|
XMLParserNotification(java.lang.Object source,
java.lang.String notificationType,
javax.xml.stream.events.XMLEvent event,
java.lang.String msg,
java.lang.Object oldValue,
java.lang.Object newValue)
Construct a notification object.
|
Modifier and Type | Method and Description |
---|---|
javax.xml.stream.events.XMLEvent |
getEvent()
Return the event associated with the notification, if any.
|
java.lang.Exception |
getException()
Return the exception associated with an exception notification.
|
java.lang.String |
getMessage()
The message associated with the exception, suitable for writing to a log.
|
java.lang.String |
getNotificationType()
The notification type.
|
java.lang.Object |
getSource()
Return the object initiating the notification.
|
void |
setSource(java.lang.Object notificationSource)
Respecifies the notification source.
|
java.lang.String |
toString() |
protected final javax.xml.stream.events.XMLEvent event
XMLEvent
associated with the notification, if any.protected java.lang.Exception exception
public static final java.lang.String EXCEPTION
protected final java.lang.String message
protected java.lang.Object notificationSource
protected final java.lang.String notificationType
public static final java.lang.String UNRECOGNIZED
public XMLParserNotification(java.lang.Object source, java.lang.String notificationType, javax.xml.stream.events.XMLEvent event, java.lang.String msg, java.lang.Object oldValue, java.lang.Object newValue)
source
- the object initiating the notification.notificationType
- the notification type, such as EXCEPTION
or UNRECOGNIZED
.event
- if an event is associated with the notification, that event. May be null.msg
- a message from the notification source suitable for logging.oldValue
- any old value associated with the notification. Not typically used.newValue
- any new value associated with the notification. if this is an exception notification, the
exception that occurred is passed via this parameter. May be null.public javax.xml.stream.events.XMLEvent getEvent()
public java.lang.Exception getException()
public java.lang.String getMessage()
public java.lang.String getNotificationType()
EXCEPTION
,
UNRECOGNIZED
public java.lang.Object getSource()
getSource
in class java.util.EventObject
public void setSource(java.lang.Object notificationSource)
notificationSource
- the source to assign the exception.public java.lang.String toString()
toString
in class java.beans.PropertyChangeEvent