org.ourgrid.common.fd
Class FakeMonitoringUnit
java.lang.Object
org.ourgrid.common.fd.MonitoringUnit
org.ourgrid.common.fd.FakeMonitoringUnit
public class FakeMonitoringUnit
- extends MonitoringUnit
Fake class used to test. At constructor, the user can set a
Monitorable
that every call to
getSynchronizedRemoteReference
returns this reference.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FakeMonitoringUnit
public FakeMonitoringUnit(GenericState initialState,
java.lang.String remoteFailureDetectorAddress,
java.lang.String monitorableServiceIndex)
- Constructor
- Parameters:
initialState
- The MonitoringUnit
initial stateremoteFailureDetectorAddress
- The address The key
FakeMonitoringUnit
public FakeMonitoringUnit(GenericState initialState,
java.lang.String monitorableAddress,
java.lang.String monitorableServiceIndex,
Monitorable monitorable)
- Constructor
- Parameters:
initialState
- The MonitoringUnit
initial statemonitorableAddress
- The address The keymonitorable
- The monitorable reference to be returned at every call
to getSynchronizedRemoteReference
method.
getSynchronizedRemoteReference
protected Monitorable getSynchronizedRemoteReference()
throws java.rmi.RemoteException,
java.net.MalformedURLException,
java.rmi.NotBoundException
- Description copied from class:
MonitoringUnit
- This method is used to synchronize the reference the the
MonitoringUnit
has with the remote one.
- Overrides:
getSynchronizedRemoteReference
in class MonitoringUnit
- Returns:
- A synchronized object remote reference.
- Throws:
java.rmi.RemoteException
- If could not contact the remote server
java.net.MalformedURLException
- If the address is a not valid
RMI
url.
java.rmi.NotBoundException
- If the object in exported remotely.