|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AgentActions
This interface represents the actions that an agent can perform.
The AgentActions is an abstraction of all the things that an agent can ask the blackboard to do. An agent uses its transport to perform these tasks.
Method Summary | |
---|---|
java.lang.String |
connect(java.lang.String agentName)
Connect to the blackboard. |
void |
deleteMob(java.lang.String mobName)
Delete a mob from the blackboard. |
void |
disconnect()
Disconnect from the Blackboard |
TypeManager |
getTypeManager()
Request a Mob TypeManager. |
java.util.List |
mobSearch(java.lang.String micaQuery)
Finds all mobs meeting the criteria. |
Mob |
readMob(java.lang.String mobName)
Retrieve a mob by its name. |
void |
register(java.lang.String mobType)
Allows the agent to register for events of a particular mobType. |
void |
replaceMob(Mob mob)
Replace a mob on the blackboard. |
void |
unregister(java.lang.String mobType)
Inform the blackboard that we are no longer interested in a particular type. |
java.lang.String |
writeMob(Mob mob)
Write a mob to the blackboard. |
Method Detail |
---|
java.lang.String connect(java.lang.String agentName) throws TransportException
agentName
- The agent name proposed by the agent.
ConnectionException
- if an exception occured while attempting to connect
ActionException
- if the agent was already connected
TransportException
void disconnect() throws TransportException
ActionException
- if the agent was not connected.
TransportException
TypeManager getTypeManager() throws TransportException
TransportException
- if the agent was not connectedvoid register(java.lang.String mobType) throws TransportException, ActionException
Registration tells the blackboard that the agent is interested in mobs of a particular type.
If the securirty policy allows, the agent will be informed when mobs of this type are written
to the blackboard (via its handleNewMob
method) or when mobs of this type are
deleted from the blackboard (via its handleDeletedMob
method).
mobType
- The type we are interested in
TransportException
- if the agent was not connected
ActionException
- if the requested type is not known.void unregister(java.lang.String mobType) throws TransportException, ActionException
mobType
- The type that the agent is no longer interested in hearing about.
TransportException
- if the agent was not connected
ActionException
- if the agent was not connected or if the requested type is not known.java.lang.String writeMob(Mob mob) throws TransportException
mob
-
TransportException
- if the agent was not connectedvoid deleteMob(java.lang.String mobName) throws TransportException, ActionException
mobName
- the name of the mob to remove.
TransportException
- if the agent was not connected
ActionException
- if the requested mob doesn't existMob readMob(java.lang.String mobName) throws TransportException, ActionException
mobName
- the name of the Mob to retrieve.
TransportException
- if the agent was not connected
ActionException
- if the requested mob doesn't existvoid replaceMob(Mob mob) throws TransportException, ActionException
mob
- the mob to be written. The mob's name must be specified and indicates the name
of the mob that will be replaced. The mob's type is ignored as the previous type will be carried over.
TransportException
- if the agent was not connected
ActionException
- if no mob existed with the given namejava.util.List mobSearch(java.lang.String micaQuery) throws TransportException, ActionException
micaQuery
- A query in the MicaQL query language.
TransportException
- if the agent was not connected
ActionException
- if the query was invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |