"WEBNMS_5 API Docs"

com.adventnet.management
Class Event

java.lang.Object
  extended by com.adventnet.management.Event
All Implemented Interfaces:
java.io.Serializable

public abstract class Event
extends java.lang.Object
implements java.io.Serializable

This class defines the generic Event object used in the ManagementServer framework. The ProtocolProvider(s) implement this class for protocol specific details . The Event class has a basic set of data fields (or standard properties) to hold values that are vital for Event notification management.

See Also:
Serialized Form

Constructor Summary
Event()
           
 
Method Summary
abstract  void copy(Event e)
          This will copy the values in the Event object given as argument into current object.
 java.lang.String getCategory()
          Get the category of the event, like Threshold event etc.
 java.lang.String getDomain()
          Get the domain name of the Agent which generates this event.
 java.lang.String getEntity()
          Get the Entity (also known as Failure Object) of the Event.
 java.lang.String getNetwork()
          Get the Network in which the event is generated.
 java.lang.String getNode()
          Get the Node field of the Event generated.
 java.lang.Object getObject()
          Get the object associated with the Event.
abstract  java.util.Properties getProperties()
          This method returns the values of all the fields in this event object as a key,value pair in a java.util.Properties object.
 Property getProperty()
          Get the Property registered for this Notification.
 int getSeverity()
          Get the Severity of the Event object.
 java.lang.String getText()
          Get the descriptive text message of the event.
 long getTime()
          Get the time of occurrence (creation), in milliseconds, of this Event object.
 java.util.Hashtable getUserProperties()
          The method returns all the user properties set in this event object as a key,value pair in a java.lang.Properties object.
 java.lang.String getUserProperty(java.lang.String nam)
          The method returns the value of user property present matching the name passed as argument.
 java.lang.String removeUserProperty(java.lang.String nam)
          The method removes any user property present in the Event object matching the name passed as arguement and returns the value of the property if it exists, else null is returned.
 void setCategory(java.lang.String category)
          Set the category of the event, like Threshold event etc.
 void setDomain(java.lang.String domain)
          Set the domain name of the Agent which generates this event.
 void setEntity(java.lang.String entity)
          Set the Entity (also known as Failure Object) of the Event.
 void setNetwork(java.lang.String network)
          Modifier method to Set the Network where the event occurs.
 void setNode(java.lang.String node)
          Modifier method to Set the Node field of the Event.
 void setObject(java.lang.Object obj)
          Sets the given object as the object attribute of this Event.
abstract  void setProperties(java.util.Properties p)
          This method sets the properties of the Event Object.
 void setProperty(Property prop)
          Set the Property registered for this Notification.
 void setSeverity(int severity)
          Set the Severity of the Event object.
 void setText(java.lang.String text)
          This is the modifier method used to set the descriptive text message of the event.
 void setTime(long time)
          Set the time of occurrence (creation), in milliseconds, of this Event object.
 void setUserProperty(java.lang.String nam, java.lang.String val)
          This method sets a user property to the Event Object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Event

public Event()
Method Detail

getText

public java.lang.String getText()
Get the descriptive text message of the event.

Returns:
The text string of this event.

setText

public void setText(java.lang.String text)
This is the modifier method used to set the descriptive text message of the event.

Parameters:
text - - text string of this event.

getCategory

public java.lang.String getCategory()
Get the category of the event, like Threshold event etc.

Returns:
- the category of this event.

setCategory

public void setCategory(java.lang.String category)
Set the category of the event, like Threshold event etc. The category field could help in the useful categorization of Events.

Parameters:
category - - the category of this event.

getDomain

public java.lang.String getDomain()
Get the domain name of the Agent which generates this event.

Returns:
- the domain name as String.

setDomain

public void setDomain(java.lang.String domain)
Set the domain name of the Agent which generates this event.

Parameters:
domain - - the domain name as String.

getNetwork

public java.lang.String getNetwork()
Get the Network in which the event is generated.

Returns:
- the network name as String.

setNetwork

public void setNetwork(java.lang.String network)
Modifier method to Set the Network where the event occurs.

Parameters:
network - - the network name as String.

getNode

public java.lang.String getNode()
Get the Node field of the Event generated.

Returns:
- the Node name as String.

setNode

public void setNode(java.lang.String node)
Modifier method to Set the Node field of the Event.

Parameters:
node - - the node name as String.

getEntity

public java.lang.String getEntity()
Get the Entity (also known as Failure Object) of the Event.

Returns:
- the entity name as String.

setEntity

public void setEntity(java.lang.String entity)
Set the Entity (also known as Failure Object) of the Event.

Parameters:
entity - - the name of the Entity as String.

getSeverity

public int getSeverity()
Get the Severity of the Event object.

Returns:
- the severity of the Event.

setSeverity

public void setSeverity(int severity)
Set the Severity of the Event object.

Parameters:
severity - - the severity of the Event.

getTime

public long getTime()
Get the time of occurrence (creation), in milliseconds, of this Event object.

Returns:
- the time of occurrence.

setTime

public void setTime(long time)
Set the time of occurrence (creation), in milliseconds, of this Event object.

Parameters:
time - - the time of occurrence of the Event.

getProperty

public Property getProperty()
Get the Property registered for this Notification.

Returns:
- the request Property.

setProperty

public void setProperty(Property prop)
Set the Property registered for this Notification.

Parameters:
prop - - the request Property.

setUserProperty

public void setUserProperty(java.lang.String nam,
                            java.lang.String val)
This method sets a user property to the Event Object. User properties are additional properties that the user intends to add above the existing set of standard properties present in the Event Object.

Parameters:
nam - - the name of attribute as String.
val - - the value of attribute as String.

getUserProperty

public java.lang.String getUserProperty(java.lang.String nam)
The method returns the value of user property present matching the name passed as argument. The method returns null if no user property exists with that name.

Parameters:
nam - - the name of attribute as String.
Returns:
- the value of attribute as String.

removeUserProperty

public java.lang.String removeUserProperty(java.lang.String nam)
The method removes any user property present in the Event object matching the name passed as arguement and returns the value of the property if it exists, else null is returned.

Parameters:
nam - - the name of attribute as String.
Returns:
- the value of attribute as String.

getUserProperties

public java.util.Hashtable getUserProperties()
The method returns all the user properties set in this event object as a key,value pair in a java.lang.Properties object. The keys of properties object will correspond to the name of the user properties and values the corresponding value of the user property. The method will return null if no user property has been set in the Event Object.

Returns:
Hashtable containing the user specified attributes of this Event as name, value pair.

getProperties

public abstract java.util.Properties getProperties()
This method returns the values of all the fields in this event object as a key,value pair in a java.util.Properties object.

Returns:
Hashtable containing the attributes of this Event as name, value pair.

setProperties

public abstract void setProperties(java.util.Properties p)
This method sets the properties of the Event Object. The java.lang.Properties object passed as argument should contain the properties of the Event to be set as a key,value pair.

Parameters:
p - - Hashtable containing the attributes to be set as name, value pair.

copy

public abstract void copy(Event e)
This will copy the values in the Event object given as argument into current object.

Parameters:
p - - Event to be copied.

getObject

public java.lang.Object getObject()
Get the object associated with the Event. This will return the object if any exist in this Event otherwise it will return a null object.

Returns:
- the Object associated with this Event.

setObject

public void setObject(java.lang.Object obj)
Sets the given object as the object attribute of this Event.

Parameters:
obj - - the Object associated with this Event.

"WEBNMS_5 API Docs"

Copyright © 2011 ZOHO Corp., All Rights Reserved.