|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.ce.monitorapij.types.EventBase
org.glite.ce.monitorapij.types.Event
org.glite.ce.monitorapij.sensor.SensorEvent
This class represents an event generated by a Sensor
.
It is characterized by the Sensor source of this event, the referring time,
an identifying String, a Hashtable of parameters
and the SensorOutputDataFormat
which is applied.
Constructor Summary | |
SensorEvent(Sensor source,
int eventID)
Creates a new SensorEvent object specifying the source Sensor and an identifying id. |
|
SensorEvent(Sensor source,
int eventID,
java.util.Calendar when)
Creates a new SensorEvent object specifying the source Sensor, an identifying id and the referring time of the event. |
Method Summary | |
void |
addParameter(java.lang.String name,
java.lang.Object value)
Add a parameter specifying name and value. |
void |
applyFormat(SensorOutputDataFormat dataformat)
Apply a format to this event specifying the SensorOutputDataFormat . |
void |
applyFormat(java.lang.String format)
Apply a format to this event. |
java.lang.Object |
clone()
Get an event identical to this one. |
java.lang.Object |
getParameter(java.lang.String name)
Get the paramenter named as specified. |
java.util.Hashtable |
getParameters()
Get the all parameters of this event. |
SensorOutputDataFormat |
getSensorOutputDataFormatApplied()
Get the SensorOutputDataFormat applied to this event. |
Sensor |
getSource()
Get the source Sensor , i.e. |
void |
setParameters(java.util.Hashtable parameters)
Set the all parameters of this event. |
Methods inherited from class org.glite.ce.monitorapij.types.EventBase |
equals, getDeserializer, getID, getMessage, getMessage, getProducer, getSerializer, getTimestamp, getTypeDesc, hashCode, setID, setMessage, setMessage, setProducer, setTimestamp |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SensorEvent(Sensor source, int eventID)
source
- The source Sensor
.eventID
- An int identifying this event.public SensorEvent(Sensor source, int eventID, java.util.Calendar when)
source
- The source Sensor
.eventID
- An int identifying this event.when
- The referring time of this event.Method Detail |
public SensorOutputDataFormat getSensorOutputDataFormatApplied()
SensorOutputDataFormat
applied to this event.
SensorOutputDataFormat
applied to this event.public java.lang.Object getParameter(java.lang.String name)
name
- The name of the searched parameter.
public void addParameter(java.lang.String name, java.lang.Object value)
name
- The name of the parameter.value
- The value of the parameter.public void setParameters(java.util.Hashtable parameters)
parameters
- A Hashtable containing the pairs name-value of all the parameters.public java.util.Hashtable getParameters()
public void applyFormat(java.lang.String format) throws SensorException
SensorOutputDataFormat
specified by its name
and must be supported by the Sensor
.
If specified format name is null or "default", the default format of the Sensor will be applied.
format
- The format name.
SensorException
public void applyFormat(SensorOutputDataFormat dataformat) throws SensorException
SensorOutputDataFormat
.
The must be supported by the Sensor
.
dataformat
- The SensorOutputDataFormat
to apply.
SensorException
- An exception is thrown if the specified SensorOutputDataFormat
is null or is not supported by the source Sensor
.public Sensor getSource()
Sensor
, i.e. the sensor which generated this event.
Sensor
.public java.lang.Object clone()
clone
in class Event
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |