darx
Class ObservationManager

java.lang.Object
  extended by darx.ObservationManager

public class ObservationManager
extends java.lang.Object


Constructor Summary
ObservationManager()
          Constructs a new ObservationManager.
 
Method Summary
 void registerAgent(TaskShell shell, double criticity)
          Adds a new agent to the list of those observed locally.
 void setAgentCriticity(java.lang.String agent_name, double criticity)
          Updates the criticity fo a given agent.
 void unregisterAgent(java.lang.String agent_name)
          Removes an agent from the list of those observed locally.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObservationManager

public ObservationManager()
Constructs a new ObservationManager.

Method Detail

registerAgent

public void registerAgent(TaskShell shell,
                          double criticity)
Adds a new agent to the list of those observed locally.

Parameters:
task - the generic task, leader of its replication group, which is being evaluated wrt the rest of the app
criticity - the criticity of the agent

unregisterAgent

public void unregisterAgent(java.lang.String agent_name)
                     throws InexistentNameException
Removes an agent from the list of those observed locally.

Parameters:
agent_name - the generic name of the task
Throws:
InexistentNameException

setAgentCriticity

public void setAgentCriticity(java.lang.String agent_name,
                              double criticity)
                       throws java.rmi.RemoteException,
                              InexistentNameException
Updates the criticity fo a given agent.

Parameters:
agent_name - the generic name of the task
criticity - the newly computed criticity for this task
Throws:
java.rmi.RemoteException
InexistentNameException