edu.rit.m2mi.test
Class Ponger

java.lang.Object
  extended by edu.rit.m2mi.test.Ponger
All Implemented Interfaces:
Ping

public class Ponger
extends Object
implements Ping

Class Ponger is a main program used to test M2MI invocations and measure M2MI invocation timing. The program exports a Ponger object which implements interface Ping. Some Pinger object out there invokes the ping() method on an omnihandle for interface Ping. The Ponger object responds by invoking the pong() method on an omnihandle for interface Pong. The Pinger object responds by invoking the ping() method, and the cycle continues until a specified number of pings and pongs have occurred.

To run the test, first start a Ponger program in one process, then start a Pinger program in another process.

Usage: java edu.rit.m2mi.test.Ponger count [delay]
count = Number of pongs to do
delay = Delay between receiving a ping and sending a pong (milliseconds, default 0)


Constructor Summary
Ponger(int count, long delay)
          Construct a new Ponger object.
 
Method Summary
static void main(String[] args)
          Main program.
 void ping()
          Respond to a "ping" by sending a "pong."
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ponger

public Ponger(int count,
              long delay)
Construct a new Ponger object.

Parameters:
count - Number of pongs to do.
delay - Delay between receiving a ping and sending a pong (milliseconds)
Method Detail

ping

public void ping()
Respond to a "ping" by sending a "pong."

Specified by:
ping in interface Ping

main

public static void main(String[] args)
Main program.



Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.