|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Controller
A controller, as it name implies, controls the behavior of an agent. A controller is an abstraction of the internal architecture of an agent. It is possible to describe the general capabilities (skills of an agent) and try different controllers for this agent.
It is also handy for integrating new scripting languages into madkit and makes those scripting language work for "synchronous" as well as "asynchronous" agents. See the integration of the Jess (rule based system) and kawa (scheme) agents.
Warning: you may "plug" a behavior into an agent at creation time as follows:
class myAgent extends .... { myAgent(){ setController(new MyController()); } }Madkit project (C) 1998-2002 Madkit Team Copyright : Copyright (c) 2001
Method Summary | |
---|---|
void |
activate()
The activate method which takes precedence over the activate method defined in the agent. |
void |
doIt()
The invocation method sent by the scheduler. |
void |
end()
The end method which takes precedence over the end method defined in the agent. |
void |
live()
The live method which describes the overall behavior of a ("asynchronous") agent. |
AbstractAgent |
thisAgent()
|
Method Detail |
---|
AbstractAgent thisAgent()
void activate()
void end()
void doIt()
void live()
Warning: This method takes precedence over the agent's live method. The agent's live method does not work when a controller is "plugged" into an agent..
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |