fipaos.tutorial
Class FactorialAgent
fipaos.agent.FIPAOSAgent
|
+--fipaos.skill.jess.JessAgent
|
+--fipaos.tutorial.FactorialAgent
- public class FactorialAgent
- extends JessAgent
Constructor Summary |
FactorialAgent(String platform_location, String name, String owner) Constructor: instansiates the superclass, and sets a listener task. |
Method Summary |
static void | main(String[] args) Main entry point. |
int | runEngineCycle(int factorial) Runs the JESS engine. |
synchronized void | shutdown() Shuts down the agent by first deregistering with the DF and AMS
(if registered) and then invoking shutdown() on the FIPAOSAgent shell |
Methods inherited from class fipaos.agent.FIPAOSAgent |
activate, forward, forward, getAID, getCurrentConversation, getHAP, getLocalAMS, getLocalAMSAID, getLocalDF, getLocalDFAID, getNewConversation, getOwnership, getPlatformProfile, getProfile, getState, isShutdown, notify, notify, notifyDone, notifyError, notifyMessageInEndedConversation, notifyMessageUndeliverable, notifyTimeout, sendNotUnderstood, sendNotUnderstood, setMessageSender, waitForPushLock |
FactorialAgent
public FactorialAgent(String platform_location, String name, String owner)
- Constructor: instansiates the superclass, and sets a listener task.
- Parameters:
- platform_location - location of the platform profile
- name - name of the agent
- owner - owner of the agent
main
public static void main(String[] args)
- Main entry point.
- Parameters:
- args - contains platform profile location, owner and name
runEngineCycle
public int runEngineCycle(int factorial)
- Runs the JESS engine.
- Parameters:
- factorial - the number we want to calculate the factorial for.
- Returns: result, or 0 if failed
shutdown
public synchronized void shutdown()
- Shuts down the agent by first deregistering with the DF and AMS
(if registered) and then invoking shutdown() on the FIPAOSAgent shell