eu.xtreemos.xosd.resourcemonitor
Class GangliaElementProducer

java.lang.Object
  extended by eu.xtreemos.xosd.resourcemonitor.GangliaElementProducer

public class GangliaElementProducer
extends java.lang.Object

An instance of this class will provide an XML element for a cluster in the GLUE schema using data gathered from a ganglia gmetad that should be running elsewhere. This can then be used, for example, as a ResourceProperty value.


Field Summary
(package private)  java.lang.String gangliaClusterIdentifier
          Cluster to report info for.
private static java.lang.String genericFileName
          File with the generic answer, in case ganglia is unreachable / nonexistent.
private static org.apache.log4j.Logger logger
           
(package private)  java.lang.String xsltFilename
          Points to the XSLT file that will perform the glue to ganglia transformation.
 
Constructor Summary
GangliaElementProducer()
          Creates an instance with all default params.
 
Method Summary
 org.w3c.dom.Document getElement(java.net.Socket gangliaSocket)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final org.apache.log4j.Logger logger

gangliaClusterIdentifier

java.lang.String gangliaClusterIdentifier
Cluster to report info for. XML from the Ganglia daemon may contain information for multiple clusters, but we want to select a specific one. For the moment, just use a cluster name -- potentially it would be necessary to match against Grid name too if Ganglia has such an attribute?


xsltFilename

java.lang.String xsltFilename
Points to the XSLT file that will perform the glue to ganglia transformation. TODO Probably should be configurable?


genericFileName

private static java.lang.String genericFileName
File with the generic answer, in case ganglia is unreachable / nonexistent.

Constructor Detail

GangliaElementProducer

public GangliaElementProducer()
Creates an instance with all default params.

Method Detail

getElement

public org.w3c.dom.Document getElement(java.net.Socket gangliaSocket)
                                throws java.lang.Exception
Throws:
java.lang.Exception