All Packages  This Package  Class Hierarchy  Class Search  Index

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

  Summary

public class  PingApplication
     extends edu.utah.janos.antsr.core.Application
     implements java.lang.Runnable
{
          // Fields 12
     private final int LOG_LEVEL;
     private long beginTime;
     private static final String[] defaults;
     private int delay;
     private int interv;
     private int iter;
     private int lossage;
     private int nbuf;
     private int prime;
     private int rTotCount;
     private boolean replenish;
     private int target;

          // Constructors 1
     public PingApplication() throws Exception;

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

This was once a version of djw's PingApplication. Now it uses more of the Janos ANTSR interfaces (especially in terms of logging and startup).

Takes most parameters via command line arguments. Accepts the following parameters (in addition to the basic ones accepted by every Application).

Author:
Janos Ministry of Development , 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'.


· replenish

Summary  |  Top
   private boolean replenish

Not used.


· prime

Summary  |  Top
   private int prime


· target

Summary  |  Top
   private int target


· rTotCount

Summary  |  Top
   private int rTotCount


· delay

Summary  |  Top
   private int delay


· beginTime

Summary  |  Top
   private long beginTime


· iter

Summary  |  Top
   private int iter


· lossage

Summary  |  Top
   private int lossage


· interv

Summary  |  Top
   private int interv


· nbuf

Summary  |  Top
   private int nbuf


  Constructors

· PingApplication

Summary  |  Top

   public PingApplication()  throws Exception

Construct a non-GUI ping app.

Doesn't do anything.



  Methods

· receive

Summary  |  Top
   public synchronized void receive(Capsule unknownCap) 

Invoked when packets are received.

Overrides:
receive in class Application


· run

Summary  |  Top
   public void run() 
Implements:
run in interface Runnable


· sendCapsule

Summary  |  Top
   private void sendCapsule(int i) 


· 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

Start the Non-GUI ping app.

Registers the PingProtocol with the local node, and then starts a thread on this.run().

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