|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.systemservices.module.AbstractModule
org.iids.aos.locationmanager.AgentManagementModule
public class AgentManagementModule
| Constructor Summary | |
|---|---|
AgentManagementModule(Communicator _comm,
AgentScapeConfig config,
LocationConfigurationModule lcm,
AsLookupService lus,
AgentScapeDCNegotiationModule nm)
|
|
| Method Summary | |
|---|---|
AgentID |
createAgentID()
Create a new ID for a to-be-created agent. |
Address |
insertAgent(AgentID agentID,
java.lang.String migrationToken)
Insert agent in location, determine host manager address from lease information. |
boolean |
isStarted()
|
java.util.HashMap<AgentScapeID,java.util.List<AgentID>> |
listAgents()
List all agents available at this location. |
MigrationEndpoint |
localMigrationRequest(AgentID agentId,
java.lang.String migrationToken,
AgentScapeID reqPrincipal,
AgentScapeID destLocationId)
Handles a local request from a hostmanager for a migration. |
MigrationEndpoint |
remoteMigrationRequest(AgentID agentId,
java.lang.String migrationToken,
Address requestingLocation,
Address requestingAddress)
This method handles incoming migration requests from remote locations. |
void |
shutdown()
|
void |
start()
|
void |
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 |
|---|
public AgentManagementModule(Communicator _comm,
AgentScapeConfig config,
LocationConfigurationModule lcm,
AsLookupService lus,
AgentScapeDCNegotiationModule nm)
| Method Detail |
|---|
public void shutdown()
public AgentID createAgentID()
Implementation of
LocationManager.create_agentid().
public Address insertAgent(AgentID agentID,
java.lang.String migrationToken)
throws AgentCreationException
Implementation of
LocationManager.insert_agent(org.iids.aos.systemservices.communicator.structs.AgentID, java.lang.String).
AgentCreationException
public MigrationEndpoint localMigrationRequest(AgentID agentId,
java.lang.String migrationToken,
AgentScapeID reqPrincipal,
AgentScapeID destLocationId)
throws MigrationFailedException
Note: blocks until either a remote migration endpoint was created, or a failure occurred.
agentId - ID of the agent requesting the migration.migrationToken - String containing either a pre-negotiated lease identifier, or
a language string indicating where the agent should move to.
MigrationFailedException - If the migration request cannot be completed.
public MigrationEndpoint remoteMigrationRequest(AgentID agentId,
java.lang.String migrationToken,
Address requestingLocation,
Address requestingAddress)
throws MigrationFailedException
It also incorporates resource negotiation. For each incoming request it examines if lease offers have been made. If they have been made, this migration request is treated as an implicit acceptance of this offer.
agentId - The AgentID of the agent to migrate.migrationToken - Either a lease identifier of pre-negotiated lease, or language
specification for the agent to migraterequestingLocation - The Address of the requesting LocationManager.requestingAddress - The Address of the requesting HostManager.
MigrationEndpoint containing the
desination Address and
MigrationID
for sending the agent container.
MigrationFailedException - If there was some problem in performing the migration request.public java.util.HashMap<AgentScapeID,java.util.List<AgentID>> listAgents()
Implementation of LocationManager.list_agents().
public boolean isStarted()
public void start()
public void stop()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||