kaos.core.service.boot.usecase
Class CommSpeedTestSender

java.lang.Object
  extended by kaos.core.service.boot.KAoSAgent
      extended by kaos.core.service.boot.usecase.KAoSUsecase10New
          extended by kaos.core.service.boot.usecase.CommSpeedTestSender
All Implemented Interfaces:
KAoSAgentHelper

public class CommSpeedTestSender
extends KAoSUsecase10New

$Revision: 1.4 $ This class works as the sender part of a test programme developed to find out network transmission speed for a given transport. This class sends a number of consecutive messages with a certain size to its counterpart, i.e. the receiver, and when that is done, quits after printing the amount of time taken (in miliseconds) to send those messages. The number of messages can be set by a command line parameter -count, and the size of messages can be set by a command line parameter -size. Pl. note that the size set is in the multiple of 1024 bytes. The type of transport is set by a command line parameter -transport. Please also note that the receiver part of this test has to be started first and then the sender part.


Field Summary
 
Fields inherited from class kaos.core.service.boot.usecase.KAoSUsecase10New
CONVERSATION_FLAG, LOGGER, myDomain, STATEMENT
 
Fields inherited from class kaos.core.service.boot.KAoSAgent
_agentDescription, _agentDirectoryService, _agentNamingService, _agentNickname, _lctr, _logger, _messageTransportService, _name, _serviceRoot
 
Constructor Summary
CommSpeedTestSender()
           
 
Method Summary
protected  TransportMessage buildTransportMessage(AgentDescription agt, byte[] payload)
           
protected  void deregister()
           
protected  AgentDescription findSpeedTestReceiver()
           
static void main(java.lang.String[] args)
           
protected  void sendTransportMessage(TransportMessage msg)
           
 
Methods inherited from class kaos.core.service.boot.usecase.KAoSUsecase10New
receiveMessage
 
Methods inherited from class kaos.core.service.boot.KAoSAgent
acquireAgentDirectoryService, acquireAgentName, acquireAgentNamingService, acquireMessageTransportService, assertFalse, assertTrue, bindToMessageTransportService, createTransportMessage, equals, establishAgentDescription, findAgentDescriptionForID, findAgentDescriptionForNickname, getAgentID, getKAoSAgentDescription, hashCode, initialize, logMessage, logMessage, printTransportMessage, sendMessage, verifyRegistration
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommSpeedTestSender

public CommSpeedTestSender()
Method Detail

findSpeedTestReceiver

protected AgentDescription findSpeedTestReceiver()
                                          throws java.lang.Exception
Throws:
java.lang.Exception

buildTransportMessage

protected TransportMessage buildTransportMessage(AgentDescription agt,
                                                 byte[] payload)

sendTransportMessage

protected void sendTransportMessage(TransportMessage msg)
                             throws java.lang.Exception
Throws:
java.lang.Exception

deregister

protected void deregister()
                   throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception