org.glite.ce.monitorapij.sensor
Class MonitorEvent

java.lang.Object
  extended byorg.glite.ce.monitorapij.sensor.MonitorEvent
All Implemented Interfaces:
java.io.Serializable

public class MonitorEvent
extends java.lang.Object
implements java.io.Serializable

This class represents an event generated by the monitor.

Author:
Luigi Zangrando (zangrando@pd.infn.it)
See Also:
Serialized Form

Constructor Summary
MonitorEvent()
          Creates a new MonitorEvent object.
MonitorEvent(int eventID, long when)
          Creates a new MonitorEvent object with specified eventID and creation time.
 
Method Summary
 int getID()
          Get the eventID.
 java.lang.String getIDStringValue()
          Get the identificative String of the event.
 java.lang.String getMessage()
          Get the message of the MonitorEvent.
 long getWhen()
          Get the creation time of the MonitorEvent.
 void setID(int id)
          Set eventID.
 void setIDStringValue(java.lang.String value)
          Set the identificative String of the event.
 void setMessage(java.lang.String msg)
          Set the message of the MonitorEvent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonitorEvent

public MonitorEvent()
Creates a new MonitorEvent object. The creation time is set to the current time.


MonitorEvent

public MonitorEvent(int eventID,
                    long when)
Creates a new MonitorEvent object with specified eventID and creation time.

Parameters:
eventID - This is an int identifying a type of message.
when - The creation time expressed in milliseconds.
Method Detail

getID

public int getID()
Get the eventID.

Returns:
eventID The int number representing the type of event.

setID

public void setID(int id)
Set eventID.

Parameters:
id - The eventID will be set to this int value

getIDStringValue

public java.lang.String getIDStringValue()
Get the identificative String of the event.

Returns:
idStringValue The identificative String of the event.

setIDStringValue

public void setIDStringValue(java.lang.String value)
Set the identificative String of the event.


getWhen

public long getWhen()
Get the creation time of the MonitorEvent.

Returns:
The creation time of the MonitorEvent.

getMessage

public java.lang.String getMessage()
Get the message of the MonitorEvent.

Returns:
A String representing the message of the MonitorEvent.

setMessage

public void setMessage(java.lang.String msg)
Set the message of the MonitorEvent.

Parameters:
msg - String representing the message of the MonitorEvent.