apps.pong
Class PongApplication
java.lang.Object
|
+--ants.core.Entity
|
+--ants.core.Application
|
+--apps.pong.PongApplication
- public class PongApplication
- extends Application
- implements java.lang.Runnable
Takes most parameters via command line arguments.
Accepts the following parameters (in addition to the
basic ones accepted by every Application).
- -target : Address for pong capsules to go to.
- -iter : Numer of pong capsules to send [10].
- -interv : Inter-capsule delay in ms [5].
- -nbuf : Number of packet buffers to provide to the flow [10]. !UNUSED
- -replenish: Not used [false].
- -prime : Post prime packet delay. Negative means no prime packet. [-1].
- -lossage : Expected # packets lost [10].
- Author:
- Utah Janos Team
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 pong 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 |
PongApplication
public PongApplication()
throws java.lang.Exception
- Construct a non-GUI pong app.
Doesn't do anything.
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 pong app.
Registers the PongProtocol with the local node, and then
starts a thread on this.run()
.
- Overrides:
- start in class Application
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/