|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.core.MainContainerImpl
public class MainContainerImpl
This class is a concrete implementation of the JADE main container,
providing runtime support to JADE agents, and the special, front
end container where the AMS and the Default DF can run.
This class cannot be instantiated from applications. Instead, the
Runtime.createMainContainer(Profile p) method must be
called.
Runtime.createMainContainer(Profile p);| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface jade.core.AgentManager |
|---|
AgentManager.Listener |
| Constructor Summary | |
|---|---|
MainContainerImpl(Profile p,
PlatformManagerImpl pm)
|
|
| Method Summary | |
|---|---|
AgentDescriptor |
acquireAgentDescriptor(AID agentID)
|
void |
activate(AID agentID)
Resume an agent wherever it is |
void |
addListener(AgentManager.Listener l)
Add a listener of platform events |
void |
addTool(AID tool)
|
AID[] |
agentNames()
Return the IDs of all agents in the platform |
AID[] |
agentTools()
|
void |
amsDeregister(AMSAgentDescription dsc)
Deregister an agent from the White Pages service of this platform |
void |
amsModify(AMSAgentDescription dsc)
Modify the registration of an agent to the White Pages service of this platform. |
void |
amsRegister(AMSAgentDescription dsc)
Register an agent to the White Pages service of this platform |
List |
amsSearch(AMSAgentDescription template,
long maxResults)
Searches the White Pages for agents whose description matches a given template. |
void |
bornAgent(AID aid,
ContainerID cid,
jade.security.JADEPrincipal principal,
java.lang.String ownership,
boolean forceReplacement)
Notify the platform that an agent has just born on a container |
List |
containerAgents(ContainerID cid)
Return all agents living on a container |
ContainerID[] |
containerIDs()
Return the IDs of all containers in the platform |
List |
containerMTPs(ContainerID cid)
Return all MTPs in a given container |
void |
copy(AID agentID,
Location where,
java.lang.String newName)
Clone an agent to a given destination |
void |
create(java.lang.String name,
java.lang.String className,
java.lang.Object[] args,
ContainerID cid,
jade.security.JADEPrincipal owner,
jade.security.Credentials initialCredentials,
jade.security.JADEPrincipal requesterPrincipal,
jade.security.Credentials requesterCredentials)
Create an agent on a given container |
void |
deadAgent(AID name,
boolean containerRemoved)
Notify the platform that an agent has just died |
void |
deadMTP(MTPDescriptor mtp,
ContainerID cid)
Notify the platform that an MTP is no longer active on a given container |
void |
debugOff(AID debuggerName,
List notToBeDebugged)
Deactivate debugging on a given agent |
void |
debugOn(AID debuggerName,
List toBeDebugged)
Activate debugging on a given agent |
void |
frozenAgent(AID name,
ContainerID bufferContainer)
Notify the platform that an agent has just frozen |
AMSAgentDescription |
getAMSDescription(AID agentID)
Return the AMS description of an agent |
ContainerID |
getContainerID(AID agentID)
Return the ID of the container an agent lives in |
NodeDescriptor |
getContainerNode(ContainerID cid)
Return the node a container is deployed at |
PlatformManager |
getPlatformManager()
|
MTPDescriptor |
installMTP(java.lang.String address,
ContainerID cid,
java.lang.String className)
Install a new MTP on a given container |
void |
kill(AID agentID,
jade.security.JADEPrincipal requesterPrincipal,
jade.security.Credentials requesterCredentials)
Kill an agent wherever it is |
void |
killContainer(ContainerID cid,
jade.security.JADEPrincipal requesterPrincipal,
jade.security.Credentials requesterCredentials)
Kill a given container |
void |
move(AID agentID,
Location where)
Move an agent to a given destination |
void |
movedAgent(AID agentID,
ContainerID srcID,
ContainerID destID)
Notify the platform that an agent has just moved |
void |
newMTP(MTPDescriptor mtp,
ContainerID cid)
Notify the platform that a new MTP has become active on a given container |
void |
releaseAgentDescriptor(AID agentID)
|
void |
removeListener(AgentManager.Listener l)
Remove a listener of platform events |
void |
removeTool(AID tool)
|
void |
resumedAgent(AID name)
Notify the platform that an agent has just resumed |
void |
shutdownPlatform(jade.security.JADEPrincipal requesterPrincipal,
jade.security.Credentials requesterCredentials)
Shut down the whole platform |
void |
sniffOff(AID snifferName,
List notToBeSniffed)
Deactivate sniffing on a given agent |
void |
sniffOn(AID snifferName,
List toBeSniffed)
Activate sniffing on a given agent |
void |
suspend(AID agentID)
Suspend an agent wherever it is |
void |
suspendedAgent(AID name)
Notify the platform that an agent has just suspended |
void |
take(AID agentID,
java.lang.String username,
byte[] password)
Change the ownership of an agent // FIXME: implement or remove |
void |
thawedAgent(AID name,
ContainerID bufferContainer)
Notify the platform that an agent has just thawed |
void |
toolAdded(AID tool)
|
void |
toolRemoved(AID tool)
|
void |
uninstallMTP(java.lang.String address,
ContainerID cid)
Uninstall an MTP on a given container |
void |
wait(AID agentID,
java.lang.String password)
Put an agent in the WAITING state wherever it is |
void |
wake(AID agentID,
java.lang.String password)
Wake-up an agent wherever it is |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MainContainerImpl(Profile p,
PlatformManagerImpl pm)
throws ProfileException
ProfileException| Method Detail |
|---|
public PlatformManager getPlatformManager()
public void bornAgent(AID aid,
ContainerID cid,
jade.security.JADEPrincipal principal,
java.lang.String ownership,
boolean forceReplacement)
throws NameClashException,
NotFoundException
bornAgent in interface MainContainerNameClashException
NotFoundException
public void deadAgent(AID name,
boolean containerRemoved)
throws NotFoundException
deadAgent in interface MainContainerNotFoundException
public void suspendedAgent(AID name)
throws NotFoundException
suspendedAgent in interface MainContainerNotFoundException
public void resumedAgent(AID name)
throws NotFoundException
resumedAgent in interface MainContainerNotFoundException
public void movedAgent(AID agentID,
ContainerID srcID,
ContainerID destID)
throws NotFoundException
movedAgent in interface MainContainerNotFoundException
public void frozenAgent(AID name,
ContainerID bufferContainer)
throws NotFoundException
frozenAgent in interface MainContainerNotFoundException
public void thawedAgent(AID name,
ContainerID bufferContainer)
throws NotFoundException
thawedAgent in interface MainContainerNotFoundException
public void newMTP(MTPDescriptor mtp,
ContainerID cid)
throws IMTPException
newMTP in interface MainContainerIMTPException
public void deadMTP(MTPDescriptor mtp,
ContainerID cid)
throws IMTPException
deadMTP in interface MainContainerIMTPExceptionpublic void addTool(AID tool)
addTool in interface AgentManagerpublic void removeTool(AID tool)
removeTool in interface AgentManager
public void create(java.lang.String name,
java.lang.String className,
java.lang.Object[] args,
ContainerID cid,
jade.security.JADEPrincipal owner,
jade.security.Credentials initialCredentials,
jade.security.JADEPrincipal requesterPrincipal,
jade.security.Credentials requesterCredentials)
throws UnreachableException,
jade.security.JADESecurityException,
NotFoundException,
NameClashException
create in interface AgentManagerUnreachableException - if the container is unreachable
jade.security.JADESecurityException - if this action is not authorized
NotFoundException - if the passed container does not exist
NameClashExceptionthrows UnreachableException, JADESecurityException, NotFoundException
public void kill(AID agentID,
jade.security.JADEPrincipal requesterPrincipal,
jade.security.Credentials requesterCredentials)
throws NotFoundException,
UnreachableException,
jade.security.JADESecurityException
kill in interface AgentManagerNotFoundException
UnreachableException
jade.security.JADESecurityException
public void suspend(AID agentID)
throws NotFoundException,
UnreachableException,
jade.security.JADESecurityException
suspend in interface AgentManagerNotFoundException
UnreachableException
jade.security.JADESecurityException
public void activate(AID agentID)
throws NotFoundException,
UnreachableException,
jade.security.JADESecurityException
activate in interface AgentManagerNotFoundException
UnreachableException
jade.security.JADESecurityException
public void wait(AID agentID,
java.lang.String password)
throws NotFoundException,
UnreachableException
wait in interface AgentManagerNotFoundException
UnreachableException
public void wake(AID agentID,
java.lang.String password)
throws NotFoundException,
UnreachableException
wake in interface AgentManagerNotFoundException
UnreachableException
public void move(AID agentID,
Location where)
throws NotFoundException,
UnreachableException,
jade.security.JADESecurityException
move in interface AgentManagerNotFoundException
UnreachableException
jade.security.JADESecurityException
public void copy(AID agentID,
Location where,
java.lang.String newName)
throws NotFoundException,
NameClashException,
UnreachableException,
jade.security.JADESecurityException
copy in interface AgentManagerNotFoundException
NameClashException
UnreachableException
jade.security.JADESecurityException
public void killContainer(ContainerID cid,
jade.security.JADEPrincipal requesterPrincipal,
jade.security.Credentials requesterCredentials)
throws NotFoundException,
UnreachableException,
jade.security.JADESecurityException
killContainer in interface AgentManagerNotFoundException
UnreachableException
jade.security.JADESecurityException
public void shutdownPlatform(jade.security.JADEPrincipal requesterPrincipal,
jade.security.Credentials requesterCredentials)
throws jade.security.JADESecurityException
shutdownPlatform in interface AgentManagerjade.security.JADESecurityException
public MTPDescriptor installMTP(java.lang.String address,
ContainerID cid,
java.lang.String className)
throws NotFoundException,
UnreachableException,
MTPException
installMTP in interface AgentManagerNotFoundException
UnreachableException
MTPException
public void uninstallMTP(java.lang.String address,
ContainerID cid)
throws NotFoundException,
UnreachableException,
MTPException
uninstallMTP in interface AgentManagerNotFoundException
UnreachableException
MTPException
public void take(AID agentID,
java.lang.String username,
byte[] password)
throws NotFoundException,
UnreachableException,
jade.security.JADESecurityException
take in interface AgentManagerNotFoundException
UnreachableException
jade.security.JADESecurityException
public void sniffOn(AID snifferName,
List toBeSniffed)
throws NotFoundException,
UnreachableException
sniffOn in interface AgentManagerNotFoundException
UnreachableException
public void sniffOff(AID snifferName,
List notToBeSniffed)
throws NotFoundException,
UnreachableException
sniffOff in interface AgentManagerNotFoundException
UnreachableException
public void debugOn(AID debuggerName,
List toBeDebugged)
throws NotFoundException,
UnreachableException
debugOn in interface AgentManagerNotFoundException
UnreachableException
public void debugOff(AID debuggerName,
List notToBeDebugged)
throws NotFoundException,
UnreachableException
debugOff in interface AgentManagerNotFoundException
UnreachableException
public void amsRegister(AMSAgentDescription dsc)
throws AlreadyRegistered,
jade.security.JADESecurityException
amsRegister in interface AgentManagerAlreadyRegistered
jade.security.JADESecurityException
public void amsDeregister(AMSAgentDescription dsc)
throws NotRegistered,
jade.security.JADESecurityException
amsDeregister in interface AgentManagerNotRegistered
jade.security.JADESecurityException
public void amsModify(AMSAgentDescription dsc)
throws NotRegistered,
NotFoundException,
UnreachableException,
jade.security.JADESecurityException
amsModify in interface AgentManagerNotRegistered
NotFoundException
UnreachableException
jade.security.JADESecurityException
public List amsSearch(AMSAgentDescription template,
long maxResults)
amsSearch in interface AgentManagerpublic ContainerID[] containerIDs()
containerIDs in interface AgentManagercontainerIDs in interface MainContainerpublic AID[] agentNames()
agentNames in interface AgentManageragentNames in interface MainContainer
public List containerMTPs(ContainerID cid)
throws NotFoundException
containerMTPs in interface AgentManagercontainerMTPs in interface MainContainerNotFoundException
public List containerAgents(ContainerID cid)
throws NotFoundException
containerAgents in interface AgentManagercontainerAgents in interface MainContainerNotFoundExceptionpublic void toolAdded(AID tool)
toolAdded in interface MainContainerpublic void toolRemoved(AID tool)
toolRemoved in interface MainContainerpublic AID[] agentTools()
agentTools in interface AgentManager
public ContainerID getContainerID(AID agentID)
throws NotFoundException
getContainerID in interface AgentManagergetContainerID in interface MainContainerNotFoundException
public NodeDescriptor getContainerNode(ContainerID cid)
throws NotFoundException
getContainerNode in interface MainContainerNotFoundException
public AMSAgentDescription getAMSDescription(AID agentID)
throws NotFoundException
getAMSDescription in interface AgentManagerNotFoundExceptionpublic void addListener(AgentManager.Listener l)
addListener in interface AgentManagerpublic void removeListener(AgentManager.Listener l)
removeListener in interface AgentManagerpublic AgentDescriptor acquireAgentDescriptor(AID agentID)
acquireAgentDescriptor in interface MainContainerpublic void releaseAgentDescriptor(AID agentID)
releaseAgentDescriptor in interface MainContainer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||