com.vhosting.netconf.messages
Class NotificationMsg

java.lang.Object
  extended by com.vhosting.netconf.messages.NotificationMsg
All Implemented Interfaces:
NotificationEvent

public class NotificationMsg
extends java.lang.Object
implements NotificationEvent

This class represents the Notification message in the Netconf protocol.

Version:
1.00, 02/11/2010
Author:
Giuseppe Palmeri

Method Summary
static NotificationMsg createNotification(byte[] message)
          Create the server Notification message from a byte array as source.
 java.util.Date getEventTime()
          Returns the time when the event was actually generated by the server.
 boolean load(Notification notification)
          Load into a notification structure the values for it if exist.
 boolean validate()
          Validate the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createNotification

public static final NotificationMsg createNotification(byte[] message)
                                                throws org.xml.sax.SAXException,
                                                       java.io.IOException
Create the server Notification message from a byte array as source.

Parameters:
message - The byte array.
Returns:
The Notification message or null if the message is not a valid Notification message.
Throws:
org.xml.sax.SAXException - Throw this exception if there are parsing troubles.
java.io.IOException - Throw this exception if there are reading troubles.

getEventTime

public java.util.Date getEventTime()
Description copied from interface: NotificationEvent
Returns the time when the event was actually generated by the server.

Specified by:
getEventTime in interface NotificationEvent
Returns:
The time when the event was actually generated by the server.

load

public boolean load(Notification notification)
Description copied from interface: NotificationEvent
Load into a notification structure the values for it if exist.

Specified by:
load in interface NotificationEvent
Parameters:
notification - The notification structure.
Returns:
true if it has been possible to load values into the structure; false otherwise.

validate

public boolean validate()
Validate the message.

Returns:
true if the document is a validated Netconf XML Document; false otherwise.