org.ourgrid.common.fd
Class FakeMonitoringUnitFactory

java.lang.Object
  extended by org.ourgrid.common.fd.FakeMonitoringUnitFactory
All Implemented Interfaces:
MonitoringUnitFactory

public class FakeMonitoringUnitFactory
extends java.lang.Object
implements MonitoringUnitFactory

Fake class used to test


Constructor Summary
FakeMonitoringUnitFactory()
           
 
Method Summary
 MonitoringUnit createMonitoringUnit(GenericState initialState, java.lang.String monitorableAddress, java.lang.String monitorableIdentifier)
          The creates a new instance of MonitoringUnit class (or subclass)
 void setMonitorable(java.lang.String identifier, Monitorable monitorable)
          Method used to set behaviour of the factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FakeMonitoringUnitFactory

public FakeMonitoringUnitFactory()
Method Detail

createMonitoringUnit

public MonitoringUnit createMonitoringUnit(GenericState initialState,
                                           java.lang.String monitorableAddress,
                                           java.lang.String monitorableIdentifier)
Description copied from interface: MonitoringUnitFactory
The creates a new instance of MonitoringUnit class (or subclass)

Specified by:
createMonitoringUnit in interface MonitoringUnitFactory
Parameters:
initialState -
monitorableAddress -
monitorableIdentifier - An index name given by the Notifier when register it interests to the Monitorable. It will be used to notify that a stat has changed.
Returns:

setMonitorable

public void setMonitorable(java.lang.String identifier,
                           Monitorable monitorable)
Method used to set behaviour of the factory. This method keeps the Monitorable reference in a Map that uses like key the address.

Parameters:
identifier - The address The key
monitorable - The monitorable reference