|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.systemservices.LocalSystemService
org.iids.aos.locationmanager.LocalLocationManager
public class LocalLocationManager
| Field Summary |
|---|
| Fields inherited from interface org.iids.aos.systemservices.LocationManager |
|---|
HOST_MANAGER_LOCATION, LOCATION_MANAGER_ADDRESS, LOOKUP_REGISTRATION_NAME |
| Constructor Summary | |
|---|---|
LocalLocationManager(LocationManager parent,
LocationConfigurationModule lcm,
AgentManagementModule amm,
AgentScapeDCNegotiationModule nm)
|
|
| Method Summary | |
|---|---|
AgreementOffer |
acceptLease(java.lang.String leaseIdentifier)
|
AgentID |
create_agentid()
Generate ID for a new agent, which can be used to create an agent on a host in this location. |
AgentScapeID |
create_agentscapeid()
Generate ID for new service. |
boolean |
deregister(AgentScapeID id)
Deregister host manager with location manager. |
static LocalLocationManager |
get(AgentScapeID id)
Returns the local location manager with name id if it
exists in this JVM. |
Address |
insert_agent(AgentID agentID,
java.lang.String leaseIdentifier)
Finds a suitable host to run the agent on, and return the address where this host manager can be contacted. |
java.util.HashMap<AgentScapeID,java.util.List<AgentID>> |
list_agents()
Obtain list of all agents in this location. |
java.util.HashMap<AgentScapeID,Address> |
list_hosts()
Obtain a list of all the hosts that are part of this location. |
MigrationEndpoint |
local_migration_request(AgentID agentId,
java.lang.String leaseIdentifier,
AgentScapeID requestingAgentServer,
AgentScapeID destLocationId)
Called by a host manager (part of this location) to instruct the location manager to start the migration process by contacting the remote location manager. |
void |
pingService()
|
java.lang.String |
pingString()
|
void |
pingVoid()
|
int |
register(AgentScapeID id,
Address address)
Register host manager with location. |
void |
rejectLease(java.lang.String leaseIdentifier)
|
MigrationEndpoint |
remote_migration_request(AgentID agentId,
java.lang.String leaseIdentifier,
Address requestingLocationAddress,
Address requestingHostAddress)
Called by location manager that initiates migration, to request migration of an agent to this location. |
AgreementOffer |
requestLease(AgreementOffer leaseRequest)
|
AgreementOffer |
requestLeaseStatus(java.lang.String leaseIdentifier)
|
TemplateList |
requestTemplates()
|
void |
shutdown()
|
void |
unbind()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalLocationManager(LocationManager parent,
LocationConfigurationModule lcm,
AgentManagementModule amm,
AgentScapeDCNegotiationModule nm)
| Method Detail |
|---|
public int register(AgentScapeID id,
Address address)
LocationManagerTODO exceptions
register in interface LocationManagerid - The AgentScapeID of the host manager to add.address - Address where host manager can be contacted.
public boolean deregister(AgentScapeID id)
LocationManagerTODO exceptions
deregister in interface LocationManagerid - The AgentScapeID of the host manager to remove.
public AgentID create_agentid()
LocationManager
create_agentid in interface LocationManagerAgentID.public AgentScapeID create_agentscapeid()
LocationManager
create_agentscapeid in interface LocationManager
public Address insert_agent(AgentID agentID,
java.lang.String leaseIdentifier)
throws AgentCreationException
LocationManager
insert_agent in interface LocationManageragentID - ID of the agent XXX unused parameter.leaseIdentifier - The lease to extract the host information from.
AgentCreationException - If the agreement provider in the lease cannot be located.
TODO should be NegotiationLibException?
public MigrationEndpoint remote_migration_request(AgentID agentId,
java.lang.String leaseIdentifier,
Address requestingLocationAddress,
Address requestingHostAddress)
throws MigrationFailedException
LocationManager
remote_migration_request in interface LocationManageragentId - The AgentID of the agent to be migrated.leaseIdentifier - Identifier of the lease that contains agent placement.requestingLocationAddress - Address of source LocationManager XXX unused?requestingHostAddress - Address of source HostManager.
MigrationFailedException - Error performing migration request.
public MigrationEndpoint local_migration_request(AgentID agentId,
java.lang.String leaseIdentifier,
AgentScapeID requestingAgentServer,
AgentScapeID destLocationId)
throws MigrationFailedException
LocationManager
local_migration_request in interface LocationManageragentId - The AgentID of the agent to be migrated.leaseIdentifier - Identifier of the lease that contains agent placement.requestingAgentServer - The Address of the requesting agent server.destLocationId - Target location for the agent.
MigrationFailedException - Error performing migration request.public TemplateList requestTemplates()
requestTemplates in interface LocationManagerpublic AgreementOffer requestLease(AgreementOffer leaseRequest)
requestLease in interface LocationManagerpublic AgreementOffer acceptLease(java.lang.String leaseIdentifier)
acceptLease in interface LocationManagerpublic void rejectLease(java.lang.String leaseIdentifier)
rejectLease in interface LocationManagerpublic AgreementOffer requestLeaseStatus(java.lang.String leaseIdentifier)
requestLeaseStatus in interface LocationManagerpublic java.util.HashMap<AgentScapeID,java.util.List<AgentID>> list_agents()
LocationManager
Repeatedly queries all host managers for a list of agents that are
running there. The entire collection of all AgentID's that
are running on all hosts in this location, is returned by this method.
list_agents in interface LocationManagerpublic java.util.HashMap<AgentScapeID,Address> list_hosts()
LocationManager
list_hosts in interface LocationManagerpublic void unbind()
unbind in interface SystemServicepublic void shutdown()
shutdown in interface SystemServicepublic static LocalLocationManager get(AgentScapeID id)
id if it
exists in this JVM.
id - The location ID of the LocationManager interface.
null, which also indicates that
the LocationManager for this location runs somewhere else.public void pingService()
pingService in interface SystemServicepublic java.lang.String pingString()
pingString in interface LocationManagerpublic void pingVoid()
pingVoid in interface LocationManager
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||