org.iids.aos.util
Class LookupCache
java.lang.Object
org.iids.aos.util.LookupCache
public class LookupCache
- extends java.lang.Object
Class LookupCache
Class to cache references to System Services,
such as Location Managers, Host Managers, and Message Centers.
Addresses of these System Services are looked up in the LookupServer
and a connection is made to this System Service via a Communicator.
Recently established connections are kept in cache.
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALLOW_LOCAL_CONNECTIONS
public static boolean ALLOW_LOCAL_CONNECTIONS
getLookupCache
public static LookupCache getLookupCache(AsLookupService lookupService,
Communicator comm)
createPrivateLookupCache
public static LookupCache createPrivateLookupCache(AsLookupService lookupService,
Communicator comm)
getLookupCache
public static LookupCache getLookupCache()
shutdown
public void shutdown()
finalize
protected void finalize()
throws java.lang.Throwable
- Overrides:
finalize in class java.lang.Object
- Throws:
java.lang.Throwable
getHostManagerAddress
public Address getHostManagerAddress(AgentID id)
throws AgentIDUnknownException
- Throws:
AgentIDUnknownException
getHostManager
public HostManager getHostManager(AgentID id)
throws AgentIDUnknownException
- Throws:
AgentIDUnknownException
getHostManager
public HostManager getHostManager(AgentHandle handle)
throws AgentUnknownException
- Get a reference to the host manager hosting a specific agent.
- Parameters:
handle - A handle belonging to the agent.
- Returns:
- Reference to the host manager hosting the agent.
- Throws:
AgentUnknownException
handleToAgentID
public AgentID handleToAgentID(AgentHandle handle)
throws AgentUnknownException
- Get AgentID belonging to an AgentHandle.
Queries the lookup service (cache) to find the AgentID belonging
to a handle.
- Parameters:
handle - The AgentHandle to resolve.
- Returns:
- The AgentID belonging to this handle.
- Throws:
AgentUnknownException - If the AgentHandle could not be resolved.
getHostManager
public HostManager getHostManager(Address address)
getLocationManager
public LocationManager getLocationManager(AgentScapeID location)
throws LocationUnknownException
- Throws:
LocationUnknownException
getLocationManager
public LocationManager getLocationManager(Address address)
getMessageCenter
public HostManager getMessageCenter(AgentID id)
throws AgentIDUnknownException
- Throws:
AgentIDUnknownException
getMessageCenter
public HostManager getMessageCenter(Address a)
getMessageCenterAddress
public Address getMessageCenterAddress(AgentID id)
throws AgentIDUnknownException
- Throws:
AgentIDUnknownException
getAgentServer
public AgentServer getAgentServer(Address address)
releaseSystemService
public void releaseSystemService(SystemService s)
Copyright © 2003, 2004 IIDS Group. All Rights Reserved.