|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.agentfactory.cldc.AffectManager
public class AffectManager
The affect manager enables actuators to interact with modules and services.
| Constructor Summary | |
|---|---|
AffectManager(Agent agent,
AgentName agentName,
java.util.Hashtable modules,
java.util.Hashtable services,
Scheduler scheduler,
RoleLibrary library)
Creates a new instance of AffectManager. |
|
| Method Summary | |
|---|---|
FOS |
actOn(java.lang.Object key,
int actionID,
FOS data)
Performs an action on a module or service. |
void |
adoptBelief(FOS belief)
Adds a belief to the agent. |
void |
deactivateRole(FOS fos)
Deactiveates the role that has the specified identifier. |
void |
enactRole(FOS fos)
Causes an agent to create an instance of a role whose identifier matches the specified first order structure. |
void |
reschedule(int period)
Chanages the periodic interval at which the agent executes. |
void |
retractBelief(FOS belief)
Removes a belief from the agent. |
void |
scheduleTask(java.lang.Object key,
java.lang.Runnable task,
int period)
Schedules a task to be executed periodically. |
void |
scheduleTask(java.lang.Runnable task)
Schedules a task to be executed in a once off manner. |
void |
updateResources(FOS fos)
Updates the agent's resource constraint. |
void |
updateValues(FOS benefit,
FOS cost,
java.lang.String id)
Updates the cost and benefit values of a commitment. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AffectManager(Agent agent,
AgentName agentName,
java.util.Hashtable modules,
java.util.Hashtable services,
Scheduler scheduler,
RoleLibrary library)
agent - the agent that the affect manager belongs to.agentName - the name of the agent that the affect manager belongs to.modules - a table of the agent's modules.services - a table of the services on the platform.scheduler - the scheduler for the platform.library - a library of role tempaltes that the agent can adopt.| Method Detail |
|---|
public void adoptBelief(FOS belief)
belief - the belief to be added.public void updateResources(FOS fos)
fos - a first order structure representation of the resource
constraint.
public void updateValues(FOS benefit,
FOS cost,
java.lang.String id)
benefit - the new benefit of the commitment.cost - the new cost of the commitment.id - the label of the commitment.
public void enactRole(FOS fos)
throws MalformedLogicException
fos - the specified first order structure.
MalformedLogicException - if there is a logic error.
public void deactivateRole(FOS fos)
throws MalformedLogicException
fos - the identifier of the role.
MalformedLogicException - if there is a logic error.public void retractBelief(FOS belief)
belief - the belief to be removed.
public void scheduleTask(java.lang.Object key,
java.lang.Runnable task,
int period)
key - a label to be associated with the task.task - the task to be executed.period - the periodic interval at which the task should be executed.public void scheduleTask(java.lang.Runnable task)
task - the task to be executed.public void reschedule(int period)
period - the new periodic interval.
public FOS actOn(java.lang.Object key,
int actionID,
FOS data)
key - the name of the module or service.actionID - the ID of the action to be performed.data - that data that is to be used in performing the action.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||