|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the functionality the base offers to its agents.
Method Summary | |
void |
destroyAgent(java.lang.String name)
Destroys an agent with all necessary clean up. |
IRequest |
dispatchAgent(java.lang.String name,
Address destination)
Dispatches an agent with all necessary clean up. |
IRequest |
fireMessage(Message m)
Fires the given message. |
java.util.Set |
getNames()
Gets the names of all agents on this base. |
java.lang.String |
getProperty(java.lang.String prop)
Retuns a base property. |
boolean |
isOnline()
Returns the online status of the base. |
IRequest |
launch(java.lang.String method,
IAgent agent,
java.lang.Object parameter)
Launches an agent to a specified destination. |
Method Detail |
public java.lang.String getProperty(java.lang.String prop)
drm.baseName
The name of the base.prop
- Name of the property.Base.Base(java.util.Properties)
public java.util.Set getNames()
public void destroyAgent(java.lang.String name)
IAgent.onDestruction()
will
be called before removing the agent from the base. The agent has to
stop all its threads (java offers no possibility at the moment
(version 1.4) to stop threads). The agent will be cut off of the
outside world, even if it fails to stop its threads.name
- Name of the agent.public IRequest dispatchAgent(java.lang.String name, Address destination)
destroyAgent
.
The operation is assynchronous.name
- Name of the agent.destination
- Where to send the agent.destroyAgent(String)
public IRequest launch(java.lang.String method, IAgent agent, java.lang.Object parameter)
method
- The algorithm used for launching the agent.
At least "DIRECT" has to be implemented. Other algorithms have to
be documented in the implementing class.agent
- Agent to launch.parameter
- An arbitrary parameter (list) of the selected
launching algorithm. In the case of "DIRECT" the address of the
recipient base of type Address.
If null then the local base is the destination.java.lang.IllegalArgumentException
- if the arguments are not of the
right type or inconsistent.public IRequest fireMessage(Message m)
IRequest.getInfo("reply")
returns the reply object to
the message (after it arrives of course).IRequest.getInfo(String)
public boolean isOnline()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |