|
|||||||||
| 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.hostmanager.AgentContainerManager
public class AgentContainerManager
AgentContainer manager.
There is one manager object for each agent/container. It mediates all access to the agent stores. Offers functionality like adding/removing stores and modifying store data. Data in the container of an agent is immediately stored in the agent container and carried along upon migration.
The AgentScape notion of an AgentContainer is more or less the same as the kernel notion of it, except for the fact that all meta information of an agent is also stored in the agent container. The AOS kernel does not interpret the container in any way, but AgentScape does. So each manager object also maintains some extra information on the agent container. Extracting this information from the AC takes time, so this information is cached by the container manager. It is therefore important that this cache is flushed to the AC before attempting to finalize the agent container.
Note: objects such as the LifeCycleModule now manipulate the agent container directly (for reading and writing meta segments as well as finalizing and shipping the agent container). All AC manipulation should be made part of the AC manager, so that we do not run into cache inconsistencies.
| Field Summary | |
|---|---|
protected Cookie |
cookie
|
protected Address |
incomingAddress
|
protected KernelClient |
kernel
|
| 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 |
| Field Detail |
|---|
protected KernelClient kernel
protected Cookie cookie
protected Address incomingAddress
| Method Detail |
|---|
public boolean checkAgent(AgentID id)
@Deprecated
public AgentCodeSegment createCodeSegment(AgentID id,
java.lang.String desc,
Language lang)
throws AgentIDUnknownException
AgentIDUnknownException
@Deprecated
public AgentDataSegment createDataSegment(AgentID id,
java.lang.String desc,
java.lang.String subt)
throws AgentIDUnknownException
AgentIDUnknownException
public void writeCode(AgentID id,
AgentCodeSegment code,
byte[] bytes)
throws AgentContainerException,
AgentIDUnknownException
AgentContainerException
AgentIDUnknownException
public void writeData(AgentID id,
AgentDataSegment data,
byte[] bytes)
throws AgentIDUnknownException,
AgentContainerException
AgentIDUnknownException
AgentContainerException
public byte[] readCode(AgentID id,
AgentCodeSegment code)
throws AgentIDUnknownException,
AgentContainerException
AgentIDUnknownException
AgentContainerException
public byte[] readData(AgentID id,
AgentDataSegment data)
throws AgentIDUnknownException,
AgentContainerException
AgentIDUnknownException
AgentContainerException
public void deleteCode(AgentID id,
AgentCodeSegment code)
throws AgentIDUnknownException,
AgentContainerException
AgentIDUnknownException
AgentContainerException
public void deleteData(AgentID id,
AgentDataSegment data)
throws AgentIDUnknownException,
AgentContainerException
AgentIDUnknownException
AgentContainerException
public AgentCodeSegment[] getCodeSegments(AgentID id)
throws AgentIDUnknownException
AgentIDUnknownException
public AgentDataSegment[] getDataSegments(AgentID id)
throws AgentIDUnknownException
AgentIDUnknownException
public AgentCodeSegment getDefaultCodeSegment(AgentID id)
throws AgentIDUnknownException,
AgentContainerException
AgentIDUnknownException
AgentContainerException
public void setDefaultCodeSegment(AgentID id,
AgentCodeSegment code)
throws AgentIDUnknownException,
AgentContainerException
id - AgentID of the AgentContainer to write to.code - The code to write.
AgentIDUnknownException - If the agent is not known by the AgentContainerManager
AgentContainerException - If there was an error updating the AgentContainer
public AgentHandle createAgentHandle(AgentID id)
throws AgentIDUnknownException
AgentIDUnknownException
public void removeAgentHandle(AgentID id,
AgentHandle ah)
throws AgentIDUnknownException
AgentIDUnknownException
public void setCollect(AgentID id)
throws AgentIDUnknownException,
AgentContainerException
AgentIDUnknownException
AgentContainerException
public boolean mustCollect(AgentID id)
throws AgentIDUnknownException
AgentIDUnknownExceptionpublic void start()
public void stop()
public boolean isStarted()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||