org.catnets.p2pagent.apiSamples.gropcastEchoes
Class EchoesServerMainApp

java.lang.Object
  extended by org.catnets.p2pagent.api.BasicApplication
      extended by org.catnets.p2pagent.apiSamples.gropcastEchoes.EchoesServerMainApp

public class EchoesServerMainApp
extends org.catnets.p2pagent.api.BasicApplication

Main application that initiates the EchoServer and EchoServer agents passing the appropiate parameters.

Version:
1.0
Author:
Pablo Chacin
See Also:
EchoServer, EchoClient

Field Summary
 
Fields inherited from class org.catnets.p2pagent.api.BasicApplication
env
 
Constructor Summary
EchoesServerMainApp(java.lang.String[] args)
           
 
Method Summary
static void main(java.lang.String[] args)
          Application main method.
protected  void run()
          Executes the main logic of the application.
 
Methods inherited from class org.catnets.p2pagent.api.BasicApplication
getHostingEnvironment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EchoesServerMainApp

public EchoesServerMainApp(java.lang.String[] args)
Method Detail

main

public static void main(java.lang.String[] args)
Application main method. Instantiates the EchoesMainApp class and invokes the run method to start its execution.

Parameters:
args - a String array with command parameters. Currently is it not used.

run

protected void run()
Executes the main logic of the application. Creates the EchoServer agent passing the average and variation of the response time. Then, creates a EchoClient agent passing a reference to contact the server and the number of requests that must execute. The application waits until the client finishes the requests and retrieves the average response time calculated by the client.