All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.antsr.apps.statsfusion.StatsApplication
java.lang.Object
   |
   +----edu.utah.janos.antsr.core.Entity
           |
           +----edu.utah.janos.antsr.core.Application
                   |
                   +----edu.utah.janos.antsr.apps.statsfusion.StatsApplication

  Summary

public class  StatsApplication
     extends edu.utah.janos.antsr.core.Application
     implements java.lang.Runnable
{
          // Fields 11
     private final int LOG_LEVEL;
     private int cachetime;
     private static final String[] defaults;
     private byte depth;
     private int maxwait;
     private int retcount;
     private int returntimeout;
     private int returnwait;
     private int rootsenddelay;
     private Vector unmatchedrets;
     private Vector waitingon;

          // Constructors 1
     public StatsApplication() throws Exception;

          // Methods 5
     public synchronized void receive(Capsule);
     public void run();
     private void sendRootCapsules();
     public void setArgs(KeyArgs) throws InvalidKeyArgsException;
     public void start() throws Exception;

          // Inner Classes 1
     private class StatsApplication.SrcDestPair
}

This application transverses the network, starting with the node it is run from and returns statistics from all reachable nodes within a specifiable depth

Parameters:

Author:
Janos Ministry of Development




  Fields

· defaults

Summary  |  Top

   private static final String[] defaults


· LOG_LEVEL

Summary  |  Top
   private final int LOG_LEVEL

The logging level messages issued by this class are issued at. Gross hack to hide the grosser hack that is `L'.


· depth

Summary  |  Top
   private byte depth

The maximum depth that this request will go into the network before cancelling itself (similar to TTL)


· maxwait

Summary  |  Top
   private int maxwait

Seconds to wait for activity before the run is stoped


· rootsenddelay

Summary  |  Top
   private int rootsenddelay

Msec to wait between sending root request packets (lessens network strain)


· retcount

Summary  |  Top
   private int retcount

Keeps track of the number of returned packets


· cachetime

Summary  |  Top
   private int cachetime

Parameters passed on to the capsule


· returnwait

Summary  |  Top
   private int returnwait

Parameters passed on to the capsule


· returntimeout

Summary  |  Top
   private int returntimeout

Parameters passed on to the capsule


· waitingon

Summary  |  Top
   private Vector waitingon

Keeps track of the nodes that have sent requests that have not been replied to


· unmatchedrets

Summary  |  Top
   private Vector unmatchedrets

Keeps track of the parents of the nodes that have returned, but that the application was not waiting on.

Sometimes return capsules come from the child before the parent, this way they are not lost from the tracking system


  Constructors

· StatsApplication

Summary  |  Top

   public StatsApplication()  throws Exception

Construct a non-GUI stats app.

Doesn't do anything.



  Methods

· receive

Summary  |  Top
   public synchronized void receive(Capsule unknownCap) 

Handle the incoming capsule and tell it to print its information

Overrides:
receive in class Application


· run

Summary  |  Top
   public void run() 

Sends out the root request capsules to all neighboring nodes then sleeps forever

Implements:
run in interface Runnable


· sendRootCapsules

Summary  |  Top
   private void sendRootCapsules() 

Sends the root request capsule to all neighboring nodes



· setArgs

Summary  |  Top
   public void setArgs(KeyArgs k)  throws InvalidKeyArgsException

Parse command line arguments.

See the class description for a list of the arguments and their meaning.

Overrides:
setArgs in class Application


· start

Summary  |  Top
   public void start()  throws Exception

Register the protocol and start the thread

Overrides:
start in class Application


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7