fipaos.tutorial
Class FactorialAgent

fipaos.agent.FIPAOSAgent
  |
  +--fipaos.skill.jess.JessAgent
        |
        +--fipaos.tutorial.FactorialAgent

public class FactorialAgent
extends JessAgent


Inner Class Summary
 public classFactorialAgent.IdleTask
           

Inner classes inherited from class fipaos.agent.FIPAOSAgent
FIPAOSAgent.TopLevelHandlerTask

Fields inherited from class fipaos.agent.FIPAOSAgent
_registered_with, _state

Constructor Summary
FactorialAgent(String platform_location, String name, String owner)
          Constructor: instansiates the superclass, and sets a listener task.

Method Summary
 static voidmain(String[] args)
          Main entry point.
 intrunEngineCycle(int factorial)
          Runs the JESS engine.
 synchronized voidshutdown()
          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

Constructor Detail

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
Method Detail

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