|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.core.BackEndContainer
public class BackEndContainer
| Nested Class Summary | |
|---|---|
class |
BackEndContainer.AgentImage
Inner class AgentImage |
| Field Summary | |
|---|---|
static java.lang.String |
ENABLE_MONITOR
|
protected jade.core.LADT |
localAgents
|
static java.lang.String |
MONITOR_AGENT_CLASS
|
static java.lang.String |
MONITOR_AGENT_NAME
|
protected jade.core.CommandProcessor |
myCommandProcessor
|
protected ContainerID |
myID
|
protected IMTPManager |
myIMTPManager
|
protected MainContainerImpl |
myMainContainer
|
protected NodeDescriptor |
myNodeDescriptor
|
protected Profile |
myProfile
|
protected jade.security.Credentials |
ownerCredentials
|
protected jade.security.JADEPrincipal |
ownerPrincipal
|
static java.lang.String |
RESYNCH
|
static java.lang.String |
USE_BACKEND_MANAGER
|
| Fields inherited from interface jade.core.AgentContainer |
|---|
AUX_CONTAINER_NAME, MAIN_CONTAINER_NAME |
| Constructor Summary | |
|---|---|
BackEndContainer(Properties props,
BEConnectionManager cm)
|
|
| Method Summary | |
|---|---|
Agent |
acquireLocalAgent(AID id)
|
void |
addAddressToLocalAgents(java.lang.String address)
|
BackEndContainer.AgentImage |
addAgentImage(AID id,
BackEndContainer.AgentImage img)
|
Agent |
addLocalAgent(AID id,
Agent a)
|
void |
addPlatformListener(AgentManager.Listener l)
|
AID[] |
agentNames()
|
void |
becomeLeader(AMSEventQueueFeeder feeder)
|
java.lang.String |
bornAgent(java.lang.String name)
A new agent has just started on the FrontEnd. |
boolean |
connect()
|
BackEndContainer.AgentImage |
createAgentImage(AID id)
|
void |
createAgentOnFE(java.lang.String name,
java.lang.String className,
java.lang.String[] args)
|
void |
deadAgent(java.lang.String name)
An agent has just died on the FrontEnd. |
void |
disableDebugger(AID debuggerName,
AID notToBeDebugged)
This method is re-defined to avoid NullPointerException. |
void |
enableDebugger(AID debuggerName,
AID toBeDebugged)
This method is re-defined to avoid NullPointerException. |
void |
fillListFromBlockedBehaviours(List behaviours,
Agent a)
|
void |
fillListFromMessageQueue(List messages,
Agent a)
|
void |
fillListFromReadyBehaviours(List behaviours,
Agent a)
|
BackEndContainer.AgentImage |
getAgentImage(AID id)
|
AID[] |
getAgentImages()
|
AID |
getAMS()
|
Properties |
getBootProperties()
|
AgentContainer |
getContainerController(jade.security.JADEPrincipal principal,
jade.security.Credentials credentials)
|
AID |
getDefaultDF()
|
ServiceHelper |
getHelper(Agent a,
java.lang.String serviceName)
|
ContainerID |
getID()
|
MainContainer |
getMain()
|
NodeDescriptor |
getNodeDescriptor()
|
java.lang.String |
getPlatformID()
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String aDefault)
|
ServiceFinder |
getServiceFinder()
|
ServiceManager |
getServiceManager()
|
void |
handleBehaviourAdded(AID agentID,
Behaviour b)
|
void |
handleBehaviourRemoved(AID agentID,
Behaviour b)
|
void |
handleChangeBehaviourState(AID agentID,
Behaviour b,
java.lang.String from,
java.lang.String to)
|
void |
handleChangedAgentPrincipal(AID agentID,
jade.security.JADEPrincipal oldPrincipal,
jade.security.Credentials creds)
|
void |
handleChangedAgentState(AID agentID,
int oldState,
int newState)
|
void |
handleEnd(AID agentID)
|
void |
handlePosted(AID agentID,
ACLMessage msg)
|
void |
handleReceived(AID agentID,
ACLMessage msg)
Issue a NOTIFY_RECEIVED VerticalCommand |
void |
handleSend(ACLMessage msg,
AID sender,
boolean needClone)
Issue a SEND_MESSAGE VerticalCommand for each receiver |
Location |
here()
|
protected void |
init()
|
void |
initAgent(AID agentID,
Agent instance,
jade.security.JADEPrincipal ownerPrincipal,
jade.security.Credentials initialCredentials)
Issue an INFORM_CREATED vertical command. |
boolean |
isJoined()
|
boolean |
isLocalAgent(AID id)
|
void |
killAgentOnFE(java.lang.String name)
|
void |
messageOut(ACLMessage msg,
java.lang.String sender)
An agent on the FrontEnd has sent a message. |
boolean |
postMessageToLocalAgent(ACLMessage msg,
AID receiverID)
Dispatch a message to an agent in the FrontEnd. |
void |
powerUpLocalAgent(AID agentID)
|
void |
releaseLocalAgent(AID id)
|
void |
removeAddressFromLocalAgents(java.lang.String address)
|
BackEndContainer.AgentImage |
removeAgentImage(AID id)
|
void |
removeLocalAgent(AID id)
|
List |
removePendingMessages(MessageTemplate template,
boolean notifyFailure)
|
void |
removePlatformListener(AgentManager.Listener l)
|
void |
resumeAgentOnFE(java.lang.String name)
|
void |
resumedAgent(java.lang.String name)
Notify the BackEnd container that an agent has resumed. |
java.lang.Object |
serviceInvokation(java.lang.String actor,
java.lang.String serviceName,
java.lang.String methodName,
java.lang.Object[] methodParams)
Pass a service helper method invokation request to the BackEnd |
void |
setPlatformAddresses(AID id)
|
void |
shutDown()
|
protected void |
startNode()
Add the node to the platform with the basic services |
protected ServiceDescriptor |
startService(java.lang.String name,
boolean activateIt)
|
protected void |
stopService(java.lang.String name)
|
void |
suspendAgentOnFE(java.lang.String name)
|
void |
suspendedAgent(java.lang.String name)
Notify the BackEnd container that an agent has suspended. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String USE_BACKEND_MANAGER
public static final java.lang.String RESYNCH
public static final java.lang.String ENABLE_MONITOR
public static final java.lang.String MONITOR_AGENT_NAME
public static final java.lang.String MONITOR_AGENT_CLASS
protected jade.core.LADT localAgents
protected Profile myProfile
protected jade.core.CommandProcessor myCommandProcessor
protected MainContainerImpl myMainContainer
protected IMTPManager myIMTPManager
protected ContainerID myID
protected NodeDescriptor myNodeDescriptor
protected jade.security.JADEPrincipal ownerPrincipal
protected jade.security.Credentials ownerCredentials
| Constructor Detail |
|---|
public BackEndContainer(Properties props,
BEConnectionManager cm)
throws ProfileException
ProfileException| Method Detail |
|---|
public boolean connect()
protected void startNode()
throws IMTPException,
ProfileException,
ServiceException,
jade.security.JADESecurityException,
NotFoundException
IMTPException
ProfileException
ServiceException
jade.security.JADESecurityException
NotFoundException
public java.lang.String bornAgent(java.lang.String name)
throws jade.security.JADESecurityException,
IMTPException
bornAgent in interface BackEndname - The name of the new agent.
jade.security.JADESecurityException
IMTPException
public void deadAgent(java.lang.String name)
throws IMTPException
deadAgent in interface BackEndname - The name of the dead agent.
IMTPException
public void suspendedAgent(java.lang.String name)
throws NotFoundException,
IMTPException
BackEnd
suspendedAgent in interface BackEndname - The name of the suspended agent.
NotFoundException
IMTPException
public void resumedAgent(java.lang.String name)
throws NotFoundException,
IMTPException
BackEnd
resumedAgent in interface BackEndname - The name of the resumed agent.
NotFoundException
IMTPException
public void messageOut(ACLMessage msg,
java.lang.String sender)
throws NotFoundException,
IMTPException
messageOut in interface BackEndmsg - The message to be dispatched.sender - The name of the sender agent.
NotFoundException
IMTPException
public java.lang.Object serviceInvokation(java.lang.String actor,
java.lang.String serviceName,
java.lang.String methodName,
java.lang.Object[] methodParams)
throws NotFoundException,
ServiceException,
IMTPException
BackEnd
serviceInvokation in interface BackEndactor - The name of the agent that invoked the methodserviceName - The name of the servicemethodName - The name of the invoked methodmethodParams - The parameters of the invoked methods as an array of Objects
null if the method returns void
NotFoundException
ServiceException
IMTPException
public void createAgentOnFE(java.lang.String name,
java.lang.String className,
java.lang.String[] args)
throws IMTPException
IMTPException
public void killAgentOnFE(java.lang.String name)
throws IMTPException,
NotFoundException
IMTPException
NotFoundException
public void suspendAgentOnFE(java.lang.String name)
throws IMTPException,
NotFoundException
IMTPException
NotFoundException
public void resumeAgentOnFE(java.lang.String name)
throws IMTPException,
NotFoundException
IMTPException
NotFoundException
public boolean postMessageToLocalAgent(ACLMessage msg,
AID receiverID)
postMessageToLocalAgent in interface AgentContainerpublic Agent acquireLocalAgent(AID id)
acquireLocalAgent in interface AgentContainerpublic void releaseLocalAgent(AID id)
releaseLocalAgent in interface AgentContainerpublic AID[] agentNames()
agentNames in interface AgentContainer
public void enableDebugger(AID debuggerName,
AID toBeDebugged)
throws IMTPException
IMTPException
public void disableDebugger(AID debuggerName,
AID notToBeDebugged)
throws IMTPException
IMTPExceptionpublic void shutDown()
shutDown in interface AgentContainerpublic BackEndContainer.AgentImage createAgentImage(AID id)
public BackEndContainer.AgentImage addAgentImage(AID id,
BackEndContainer.AgentImage img)
public BackEndContainer.AgentImage removeAgentImage(AID id)
public BackEndContainer.AgentImage getAgentImage(AID id)
public AID[] getAgentImages()
public List removePendingMessages(MessageTemplate template,
boolean notifyFailure)
public AgentContainer getContainerController(jade.security.JADEPrincipal principal,
jade.security.Credentials credentials)
public void initAgent(AID agentID,
Agent instance,
jade.security.JADEPrincipal ownerPrincipal,
jade.security.Credentials initialCredentials)
throws NameClashException,
IMTPException,
NotFoundException,
jade.security.JADESecurityException
initAgent in interface AgentContainerNameClashException
IMTPException
NotFoundException
jade.security.JADESecurityExceptionpublic NodeDescriptor getNodeDescriptor()
getNodeDescriptor in interface AgentContainer
protected void init()
throws IMTPException,
ProfileException
IMTPException
ProfileExceptionpublic Location here()
here in interface AgentContainer
public void handleSend(ACLMessage msg,
AID sender,
boolean needClone)
public void handlePosted(AID agentID,
ACLMessage msg)
public void handleReceived(AID agentID,
ACLMessage msg)
public void handleBehaviourAdded(AID agentID,
Behaviour b)
public void handleBehaviourRemoved(AID agentID,
Behaviour b)
public void handleChangeBehaviourState(AID agentID,
Behaviour b,
java.lang.String from,
java.lang.String to)
public void handleChangedAgentPrincipal(AID agentID,
jade.security.JADEPrincipal oldPrincipal,
jade.security.Credentials creds)
public void handleChangedAgentState(AID agentID,
int oldState,
int newState)
public void handleEnd(AID agentID)
public void setPlatformAddresses(AID id)
public AID getAMS()
getAMS in interface AgentContainerpublic AID getDefaultDF()
getDefaultDF in interface AgentContainer
public java.lang.String getProperty(java.lang.String key,
java.lang.String aDefault)
public Properties getBootProperties()
public ServiceHelper getHelper(Agent a,
java.lang.String serviceName)
throws ServiceException
ServiceExceptionpublic java.lang.String getPlatformID()
getPlatformID in interface AgentContainer
public Agent addLocalAgent(AID id,
Agent a)
addLocalAgent in interface AgentContainer
public void powerUpLocalAgent(AID agentID)
throws NotFoundException
powerUpLocalAgent in interface AgentContainerNotFoundExceptionpublic void removeLocalAgent(AID id)
removeLocalAgent in interface AgentContainerpublic boolean isLocalAgent(AID id)
isLocalAgent in interface AgentContainer
public void fillListFromMessageQueue(List messages,
Agent a)
fillListFromMessageQueue in interface AgentContainer
public void fillListFromReadyBehaviours(List behaviours,
Agent a)
fillListFromReadyBehaviours in interface AgentContainer
public void fillListFromBlockedBehaviours(List behaviours,
Agent a)
fillListFromBlockedBehaviours in interface AgentContainerpublic void addAddressToLocalAgents(java.lang.String address)
addAddressToLocalAgents in interface AgentContainerpublic void removeAddressFromLocalAgents(java.lang.String address)
removeAddressFromLocalAgents in interface AgentContainerpublic ContainerID getID()
getID in interface AgentContainerpublic MainContainer getMain()
getMain in interface AgentContainerpublic ServiceManager getServiceManager()
getServiceManager in interface AgentContainerpublic ServiceFinder getServiceFinder()
getServiceFinder in interface AgentContainer
protected ServiceDescriptor startService(java.lang.String name,
boolean activateIt)
throws ServiceException
ServiceException
protected void stopService(java.lang.String name)
throws ServiceException
ServiceExceptionpublic void becomeLeader(AMSEventQueueFeeder feeder)
becomeLeader in interface AgentContainer
public void addPlatformListener(AgentManager.Listener l)
throws java.lang.ClassCastException
java.lang.ClassCastException
public void removePlatformListener(AgentManager.Listener l)
throws java.lang.ClassCastException
java.lang.ClassCastExceptionpublic boolean isJoined()
isJoined in interface AgentContainer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||