org.glite.ce.monitorapij.sensor
Class SensorOutputDataFormat

java.lang.Object
  extended byorg.glite.ce.monitorapij.sensor.SensorOutputDataFormat

public abstract class SensorOutputDataFormat
extends java.lang.Object

This class contains the specifications of the output response. Each Sensor must specify its supported output format extending this class. It is also used by CEMonitor to format its output as desired.

Author:
Luigi Zangrando (zangrando@pd.infn.it)

Constructor Summary
SensorOutputDataFormat(java.lang.String name)
          Basic constructor specifying just the name of this output format.
SensorOutputDataFormat(java.lang.String name, java.lang.String[] queryLang)
          Contruct a SensorOutputDataFormat specifying its name and an array of the names of supported query languages.
 
Method Summary
abstract  java.lang.String[] apply(java.util.Hashtable parameters)
          Apply this format to an output message specifying a set of parameters to consider.
 java.lang.String getName()
          Get the name of the SensorOutputDataFormat.
 java.lang.String[] getSupportedQueryLang()
           
 boolean isSupportedQueryLang(java.lang.String queryLang)
          Check if specified query language is supported by this SensorOutputDataFormat.
 void setSupportedQueryLang(java.lang.String[] queryLangs)
          Set the query languages supported by this output format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SensorOutputDataFormat

public SensorOutputDataFormat(java.lang.String name)
Basic constructor specifying just the name of this output format. The queryLang field is set to null.

Parameters:
name - The name of this output format.

SensorOutputDataFormat

public SensorOutputDataFormat(java.lang.String name,
                              java.lang.String[] queryLang)
Contruct a SensorOutputDataFormat specifying its name and an array of the names of supported query languages.

Parameters:
name - The name of this output format.
queryLang - An array of String specifying the names of supported query languages.
Method Detail

getName

public java.lang.String getName()
Get the name of the SensorOutputDataFormat.

Returns:
The name of the SensorOutputDataFormat.

setSupportedQueryLang

public void setSupportedQueryLang(java.lang.String[] queryLangs)
Set the query languages supported by this output format.

Parameters:
queryLangs - An array of String specifying the names of supported query languages.

getSupportedQueryLang

public java.lang.String[] getSupportedQueryLang()
Returns:
An array of String specifying the names of supported query languages.

isSupportedQueryLang

public boolean isSupportedQueryLang(java.lang.String queryLang)
Check if specified query language is supported by this SensorOutputDataFormat.

Parameters:
queryLang - The query language name.
Returns:
True if the query language is supported, false otherwise.

apply

public abstract java.lang.String[] apply(java.util.Hashtable parameters)
                                  throws java.lang.Exception
Apply this format to an output message specifying a set of parameters to consider.

Parameters:
parameters - A set of parameters to be considered while applying this format.
Returns:
A String array containing the output messages.
Throws:
java.lang.Exception