zsh
Class zsh

java.lang.Object
  extended byzsh.zsh

public class zsh
extends java.lang.Object

zsh (zeus shell) is a utility for deploying agents within one virtual machine. Agents in a single virtual machine will run with a far smaller system overhead, but are obviously more vunerable to system failure - one can bring the others down However, there has been substantial user pressure for this sort of facility in Zeus and so Chris Van Buskirk wrote the zsh utility to support it.

To run Zsh from a DOS window type zsh your_ontology.ont in the $zeus_install (where you installed Zeus) directory, or make sure that $zeus_install is in your path. This will invoke zsh.bat, which will invoke zsh.

is the name of the ontology file that you want to use for the agency

Your prompt should change to Zeus 0>

The commands are:

  • quit : exit Zsh and stop all the agents running in this shell
  • yp : start a Facilitator Agent (provides a yellow pages service for the Utility Agents)
  • help : provides a short help message
  • viz : run a Visualiser
  • vis : run a Visualiser
  • AgentName :run a Utility Agent of type AgentName
  • AgentName :run a Utility Agent with the default arguement string set in the Zsh.bat file
  • AgentName - :run top_range-bottom_range copies of the agent type AgentName each named according to the convention AgentName_XX where XX is the number of this copy.
  • AgentName -range :run top_range copies of the agent type AgentName each named according to the convention AgentName_XX where XX is the number of this copy. Run the agents with the default parameters read from the Zsh.bat file
  • script : run a script containing commands according to the format given above.

    After an agent is invoked you should see the number in the command prompt increase as the shell counts the number of agents that it is running at the moment.


    Field Summary
    (package private) static java.lang.String facilitator_ont
               
    (package private) static java.lang.String facilitator_time
               
    (package private) static boolean manyAgents
               
    (package private) static int numAgents
               
    (package private) static java.lang.String TIMESLICE
               
    (package private) static java.lang.String visualiser_ont
               
     
    Constructor Summary
    zsh()
               
     
    Method Summary
    protected  void doCommand(java.lang.String command, java.lang.String[] parameters)
              doCommand is the business part of the deal.
    protected  void doCommand(java.lang.String command, java.lang.String agentName, java.lang.String[] parameters)
              doCommand is the business part of the deal.
    protected  java.lang.String getBottomRange(java.util.StringTokenizer parser)
               
    protected  java.lang.String getCommand(java.io.BufferedReader in)
              get command reads a command from the specified input stream
    protected  java.lang.String getKeyword(java.util.StringTokenizer parser)
              getKeyword parses out the command from the users input and returns it as a String
    protected  java.lang.String[] getParams(java.util.StringTokenizer parser)
              getParams works out what the Zeus parameters are, and separates them from any zsh specific parameters (ranges).
    protected  java.lang.String getTopRange(java.util.StringTokenizer parser)
              this method assumes that getBottom range has been called first and so it will just return the next token on the stream
    protected static void help()
               
    static void main(java.lang.String[] arg)
              standard main function
    protected static void ns()
               
     void runAgents(java.lang.String agentType, java.lang.String[] params, java.lang.String numberAgents)
              method called to run a number of agents named 0->
     void runAgents(java.lang.String agentType, java.lang.String[] params, java.lang.String bottomRange, java.lang.String topRange)
              method called to run a number of agents named 0->
     void runManyAgents(java.lang.String buffer)
              method called to run a clutch of agents
    protected  void script(java.lang.String fname)
              script is used to step through a file and execute the commands found there in.
    protected static void viz()
               
    protected static void yp()
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    numAgents

    static int numAgents

    TIMESLICE

    static java.lang.String TIMESLICE

    manyAgents

    static boolean manyAgents

    visualiser_ont

    static java.lang.String visualiser_ont

    facilitator_ont

    static java.lang.String facilitator_ont

    facilitator_time

    static java.lang.String facilitator_time
    Constructor Detail

    zsh

    public zsh()
    Method Detail

    main

    public static void main(java.lang.String[] arg)
    standard main function


    runManyAgents

    public void runManyAgents(java.lang.String buffer)
    method called to run a clutch of agents


    runAgents

    public void runAgents(java.lang.String agentType,
                          java.lang.String[] params,
                          java.lang.String bottomRange,
                          java.lang.String topRange)
    method called to run a number of agents named 0->


    runAgents

    public void runAgents(java.lang.String agentType,
                          java.lang.String[] params,
                          java.lang.String numberAgents)
    method called to run a number of agents named 0->


    getBottomRange

    protected java.lang.String getBottomRange(java.util.StringTokenizer parser)

    getTopRange

    protected java.lang.String getTopRange(java.util.StringTokenizer parser)
    this method assumes that getBottom range has been called first and so it will just return the next token on the stream


    getCommand

    protected java.lang.String getCommand(java.io.BufferedReader in)
    get command reads a command from the specified input stream


    getKeyword

    protected java.lang.String getKeyword(java.util.StringTokenizer parser)
    getKeyword parses out the command from the users input and returns it as a String


    getParams

    protected java.lang.String[] getParams(java.util.StringTokenizer parser)
    getParams works out what the Zeus parameters are, and separates them from any zsh specific parameters (ranges).


    doCommand

    protected void doCommand(java.lang.String command,
                             java.lang.String[] parameters)
    doCommand is the business part of the deal. It's job is to run the command that the user has given.


    doCommand

    protected void doCommand(java.lang.String command,
                             java.lang.String agentName,
                             java.lang.String[] parameters)
    doCommand is the business part of the deal. It's job is to run the command that the user has given.


    script

    protected void script(java.lang.String fname)
    script is used to step through a file and execute the commands found there in. Modified to support the initialisation of multiple agents of a particular type.


    ns

    protected static void ns()

    yp

    protected static void yp()

    viz

    protected static void viz()

    help

    protected static void help()


    Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.