urv.emulator.tasks.stats
Class CommunicationStatsTask

java.lang.Object
  extended by java.lang.Thread
      extended by urv.emulator.tasks.EmulatorTask
          extended by urv.emulator.tasks.stats.CommunicationStatsTask
All Implemented Interfaces:
java.lang.Runnable, EmulationGroupMembershipListener, EmulationMessageListener

public class CommunicationStatsTask
extends EmulatorTask
implements EmulationMessageListener, EmulationGroupMembershipListener

This task gathers information about all messages sent and received in the network by all applications It verifies that all nodes that were in the view of the source node received the multicast message

Author:
Marcel Arrufat Arias

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 java.util.HashSet<urv.emulator.tasks.stats.CommunicationStatsTask.MessageIdentifier> receivedMessages
           
 java.util.Hashtable<urv.emulator.tasks.stats.CommunicationStatsTask.MessageIdentifier,org.jgroups.View> sentMessages
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CommunicationStatsTask()
           
 
Method Summary
 void doSomething()
          Add the code that should be launched in the run method
 void onGroupCreated(java.net.InetAddress multicastAddress, java.net.InetAddress localAddress, MChannel mChannel)
           
 void onMessageReceived(org.jgroups.Message msg, java.net.InetAddress src, java.net.InetAddress mainDst, java.net.InetAddress realDst, int seqNumber)
           
 void onMessageSent(org.jgroups.Message msg, java.net.InetAddress src, java.net.InetAddress dst, int seqNumber, org.jgroups.View view)
           
 
Methods inherited from class urv.emulator.tasks.EmulatorTask
getClassName, getEmulationController, print, run, setEmulationController
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sentMessages

public java.util.Hashtable<urv.emulator.tasks.stats.CommunicationStatsTask.MessageIdentifier,org.jgroups.View> sentMessages

receivedMessages

public java.util.HashSet<urv.emulator.tasks.stats.CommunicationStatsTask.MessageIdentifier> receivedMessages
Constructor Detail

CommunicationStatsTask

public CommunicationStatsTask()
Parameters:
emulationController -
Method Detail

doSomething

public void doSomething()
Add the code that should be launched in the run method

Specified by:
doSomething in class EmulatorTask

onGroupCreated

public void onGroupCreated(java.net.InetAddress multicastAddress,
                           java.net.InetAddress localAddress,
                           MChannel mChannel)
Specified by:
onGroupCreated in interface EmulationGroupMembershipListener

onMessageReceived

public void onMessageReceived(org.jgroups.Message msg,
                              java.net.InetAddress src,
                              java.net.InetAddress mainDst,
                              java.net.InetAddress realDst,
                              int seqNumber)
Specified by:
onMessageReceived in interface EmulationMessageListener

onMessageSent

public void onMessageSent(org.jgroups.Message msg,
                          java.net.InetAddress src,
                          java.net.InetAddress dst,
                          int seqNumber,
                          org.jgroups.View view)
Specified by:
onMessageSent in interface EmulationMessageListener