ANTS v2.0 API

apps.ping
Class PingApplication

java.lang.Object
  |
  +--ants.core.Entity
        |
        +--ants.core.Application
              |
              +--apps.ping.PingApplication

public class PingApplication
extends Application
implements java.lang.Runnable

This was once a version of djw's PingApplication.

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

Author:
Utah Janos Team

Fields inherited from class ants.core.Application
defaults
 
Constructor Summary
PingApplication()
          Construct a non-GUI ping app.
 
Method Summary
 void receive(Capsule unknownCap)
          Invoked when packets are received.
 void run()
           
 void setArgs(KeyArgs k)
          Parse command line arguments.
 void start()
          Start the Non-GUI ping app.
 
Methods inherited from class ants.core.Application
getDefaultResources, getDefaultTTL, getNode, getNodeAddress, getPort, getPrincipal, send, send, setDefaultResources, setDefaultTTL, thisNode, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PingApplication

public PingApplication()
                throws java.lang.Exception
Construct a non-GUI ping app.

Doesn't do anything.

Method Detail

receive

public void receive(Capsule unknownCap)
Invoked when packets are received.
Overrides:
receive in class Application
Tags copied from class: Application
Parameters:
cap - the Capsule that got delivered. XXX state of Xdr?

run

public void run()
Specified by:
run in interface java.lang.Runnable

setArgs

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
Tags copied from class: Application
See Also:
#port, KeyArgs

start

public void start()
           throws java.lang.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

ANTS v2.0 API

This documentation is Copyright (C) 1998-2001 The University of Utah and the University of Washington. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for ANTS v2.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/