org.iids.aos.hostmanager
Class AgentRegistrationModule

java.lang.Object
  extended by org.iids.aos.systemservices.module.AbstractModule
      extended by org.iids.aos.systemservices.module.AbstractRunnableModule
          extended by org.iids.aos.hostmanager.AgentRegistrationModule
All Implemented Interfaces:
java.lang.Runnable, Module

public class AgentRegistrationModule
extends AbstractRunnableModule

Author:
michel@cs.vu.nl module responsible for keeping track of agents, including (de)registration with the lookupserver.

Constructor Summary
AgentRegistrationModule(AgentScapeConfig config, AsLookupService ls, Communicator communicator)
           
 
Method Summary
 void addAgent(AgentID id, AgentInfo agent)
           
 void addAgentHandle(AgentID id, AgentHandle handle)
           
 boolean containsAgent(AgentID id)
           
 AgentInfo getAgent(AgentID id)
           
 java.util.Vector<AgentHandle> getAgentHandles(AgentID agentID)
           
 Address getAgentServer(AgentID agentId)
           
 HostManager.AgentStatus getAgentStatus(AgentID agentId)
           
 boolean hostsAgent(AgentID id)
           
 java.util.List<AgentID> listAgents()
           
 void pulse()
           
 void removeAgent(AgentID id)
           
 void removeAgentHandle(AgentID id, AgentHandle handle)
           
 void shutdown()
          Each abstract RUNNABLE module implementation must implement the shutdown method, which is called whenever the module is stopped (by AbstractRunnableModule.stop()) from the superclass.
 
Methods inherited from class org.iids.aos.systemservices.module.AbstractRunnableModule
isStarted, run, start, stop
 
Methods inherited from class org.iids.aos.systemservices.module.AbstractModule
getCommunicator, getModuleName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentRegistrationModule

public AgentRegistrationModule(AgentScapeConfig config,
                               AsLookupService ls,
                               Communicator communicator)
                        throws java.lang.NoSuchMethodException,
                               CommunicatorException
Throws:
java.lang.NoSuchMethodException
CommunicatorException
Method Detail

shutdown

public void shutdown()
Description copied from class: AbstractRunnableModule
Each abstract RUNNABLE module implementation must implement the shutdown method, which is called whenever the module is stopped (by AbstractRunnableModule.stop()) from the superclass.

Specified by:
shutdown in class AbstractRunnableModule

pulse

public void pulse()
Specified by:
pulse in class AbstractRunnableModule

getAgentServer

public Address getAgentServer(AgentID agentId)
                       throws AgentIDUnknownException
Throws:
AgentIDUnknownException

getAgentStatus

public HostManager.AgentStatus getAgentStatus(AgentID agentId)
                                       throws AgentIDUnknownException
Throws:
AgentIDUnknownException

listAgents

public java.util.List<AgentID> listAgents()

hostsAgent

public boolean hostsAgent(AgentID id)

addAgent

public void addAgent(AgentID id,
                     AgentInfo agent)

addAgentHandle

public void addAgentHandle(AgentID id,
                           AgentHandle handle)
                    throws AgentIDUnknownException
Throws:
AgentIDUnknownException

removeAgentHandle

public void removeAgentHandle(AgentID id,
                              AgentHandle handle)
                       throws AgentIDUnknownException
Throws:
AgentIDUnknownException

getAgentHandles

public java.util.Vector<AgentHandle> getAgentHandles(AgentID agentID)
                                              throws AgentIDUnknownException
Throws:
AgentIDUnknownException

getAgent

public AgentInfo getAgent(AgentID id)
                   throws AgentIDUnknownException
Throws:
AgentIDUnknownException

removeAgent

public void removeAgent(AgentID id)
                 throws AgentIDUnknownException
Throws:
AgentIDUnknownException

containsAgent

public boolean containsAgent(AgentID id)


Copyright ? 2003, 2004 IIDS Group. All Rights Reserved.