|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Class Summary | |
|---|---|
| EchoClient | This class implements a simple requestor that executes a serie of request to a EchoServer and registers the time to completation of each request, computing an average at the end of this serie. |
| EchoesMainApp | Main application that initiates the EchoServer and EchoServer agents passing the appropiate parameters. |
| EchoServer | Receives a message and replies to the originator with the same message, after waiting for a random time, wich simulates the server's response time. |
The application shows two agents, EchoesServer and EchoesClient, which engage in a multiple communications of the type send/reply to implement a sort of "ping" command, as provided for TCPIP in most platforms. Along this process, the EchoesClient determines the average response time of the sever.
Throught this example we can show how the following functionalities are implemented:
The server receives as parameters:
The client receives as parameters:
Timestamp: 1140713385943
Severity: INFO
AgentName: EchoServer
ClassName: Server
Method: handleEvent
Message: Event expired
Timestamp: 1140713385944
Severity: INFO
AgentName: EchoClient
ClassName: EchoRequestor
Method: Request completation
Message: Request execution time 1875
Timestamp: 1140713385944
Severity: INFO
AgentName: EchoClient
ClassName: EchoRequestor
Method: makeRequest
Message: Making request number: 3
Also, in the project's root directory there should be a file named ResponseTime.txt with a series of rows, each with the response time of each echo request sent by the client to the server. This file should look as follows:
1140714229886,EchoClient,ResponseTime,1565
1140714231382,EchoClient,ResponseTime,1495
1140714233083,EchoClient,ResponseTime,1701
1140714234642,EchoClient,ResponseTime,1559
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||