    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class JavaAgent.agent.OPAgent

    java.lang.Object
       |
       +----JavaAgent.agent.Agent
               |
               +----JavaAgent.agent.OPAgent

public class OPAgent
extends Agent

An OPAgent is a normal JAT Agent that also runs an OPlan Process.

##

fromOPlan
  the OPReader for reading from the OPlan Process
oPlanProcess
  the handle of the OPlan Process strted by this OPAgent
toOPlan
  the OPWriter for writing to the OPlan Process

##

OPAgent(ContextInterface, String, URL, URL, File, File)
  The constructor for an OPAgent directly calls standard agent constructor without changing the parameters.

##

init()
  Creates the ResourceManager, MessageHandler, starts an OPlan Process, and reads in the init_file.
initiateTermination()
  Called when the executable class which contains the OPAgent terminates.

##

oPlanProcess

     public Process oPlanProcess

  the handle of the OPlan Process strted by this OPAgent

fromOPlan

     public OPReader fromOPlan

  the OPReader for reading from the OPlan Process

toOPlan

     public OPWriter toOPlan

  the OPWriter for writing to the OPlan Process

##

OPAgent

     public OPAgent(ContextInterface context,
                    String n,
                    URL init_url,
                    URL shared,
                    File shared_dir,
                    File working_dir)

  The constructor for an OPAgent directly calls standard agent constructor without changing the parameters. The OPlan Process that this OPAgent will run is started in the `init()` method.

  Parameters:
    context - the ContextInterface for this OPAgent
    n - the name of this agent
    init_url - the URL pointing to the initialization messages
    shared - a URL pointing to some shared location
    shared_dir - a shared directory
    working_dir - the working directory for this OPAgent

##

init

     public void init()

  Creates the ResourceManager, MessageHandler, starts an OPlan Process, and reads in the init_file. This function also starts an OPReader and an OPWriter which are threads for the communication with OPlan.

  Overrides:
    init in class Agent

initiateTermination

     public void initiateTermination()

  Called when the executable class which contains the OPAgent terminates. The agent sends a remove-address message to the ANS and terminates the OPlan Process.

  Overrides:
    initiateTermination in class Agent

    All Packages  Class Hierarchy  This Package  Previous  Next  Index