|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.agentfactory.cldc.logic.RoleTemplate
public class RoleTemplate
In AFME, support is provided for AFAPL2 roles. A role represents abstract behaviour patterns that agents adopt at various stages of execution. The processing overhead of roles is only incurred when the agents adopt the roles. This improves the efficiency of the reasoning process. Role templates represent schemas that agents can adopt. Variable within the identifier of the role template are applied to create a particular role instance when the role has been triggered or activated. If there are no variables in the identifier, then the role instance is just created directly. See the Agent Factory and AFME documentation for more information.
| Constructor Summary | |
|---|---|
RoleTemplate(TerImplication[] rule,
FOS identifier,
FOS[] trig)
Creates a new instance of RoleTemplate. |
|
| Method Summary | |
|---|---|
void |
createInstance(SubstitutionSet binding,
java.util.Hashtable table)
Applies the specified substituion set to the identifier for the role template. |
void |
instantiate(FOS identifier,
java.util.Hashtable table)
If the specifed identifier matches the identifier for the role template, an instance of the role is created provided a role that has the specified identifier does not already exist. |
void |
processTrigger(Agent agent,
java.util.Hashtable table)
Checks whether the role template has been triggered. |
void |
writeToStream(java.io.DataOutputStream output)
Writes the state of the role template to a data output stream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RoleTemplate(TerImplication[] rule,
FOS identifier,
FOS[] trig)
rule - an array of commitment rules.identifier - a first order structure that is used to identify the role.trig - the triggers for the role.| Method Detail |
|---|
public void writeToStream(java.io.DataOutputStream output)
throws java.io.IOException
output - the data output stream the state is to be written to.
java.io.IOException - if there is an I/O error.
public void instantiate(FOS identifier,
java.util.Hashtable table)
throws MalformedLogicException
identifier - the identifier of the role instance to be created.table - the hash table of role instances.
MalformedLogicException - if there is a logic error.
public void createInstance(SubstitutionSet binding,
java.util.Hashtable table)
throws MalformedLogicException
binding - the substitution set that is applied to the template identifier.table - the hash table of role instances.
MalformedLogicException - if there is a logic error.
public void processTrigger(Agent agent,
java.util.Hashtable table)
throws MalformedLogicException
agent - the agent that the role template belongs to.table - the hashtable of role instances.
MalformedLogicException - if there is a logic error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||