org.iids.aos.hostmanager
Class ResourceRegistry

java.lang.Object
  extended by org.iids.aos.hostmanager.ResourceRegistry
All Implemented Interfaces:
java.lang.Runnable

public class ResourceRegistry
extends java.lang.Object
implements java.lang.Runnable

This class manages dynamic addition and removal of AgentScape resources (ie. classes that implement BasicResourceHandler).

TODO (implementation-wise) this scheme is a bit complex. The registry creates an agent that manages resource registration, which is accessed by sending it a RegistryMessage. This can be reworked: most of the logic should remain in the ResourceRegistry (it has access to the resource handler manager from AgentScape) but the interface of the agent should be registered through a BasicResourceHandler interface.


Nested Class Summary
static class ResourceRegistry.RegistryMessage
           
static class ResourceRegistry.ResourceRegistryAgent
           
 
Field Summary
static java.lang.String REGISTRATION_KEY
           
 
Method Summary
 void deregisterResource(java.lang.String handlerID)
           
static ResourceRegistry getInstance()
           
 org.iids.aos.hostmanager.ResourceRegistryResult registerResource(AgentHandle ah, java.lang.String resourceType)
           
 void run()
           
static ResourceRegistry startInstance(ResourceHandlerManager rhm, AgentScapeConfig config)
          Start instance of a ResourceRegistry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REGISTRATION_KEY

public static final java.lang.String REGISTRATION_KEY
See Also:
Constant Field Values
Method Detail

startInstance

public static ResourceRegistry startInstance(ResourceHandlerManager rhm,
                                             AgentScapeConfig config)
                                      throws StartupException
Start instance of a ResourceRegistry. There is only one registry per jvm (or hostmanager?).

Throws:
StartupException

getInstance

public static ResourceRegistry getInstance()

run

public void run()
Specified by:
run in interface java.lang.Runnable

registerResource

public org.iids.aos.hostmanager.ResourceRegistryResult registerResource(AgentHandle ah,
                                                                        java.lang.String resourceType)

deregisterResource

public void deregisterResource(java.lang.String handlerID)


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