example.loadbalance
Class QuotaObserver

java.lang.Object
  extended by example.loadbalance.QuotaObserver
All Implemented Interfaces:
Control

public class QuotaObserver
extends java.lang.Object
implements Control

This class prints statistics about the actual quota consumptions. It is assumed that the network nodes are instances of the BasicBalance class.

Note that this observer can be replaced by a library class VectorObserver the following way: class BasicBalance needs to implement a public method "getQuota", and this method needs to be configured as "getter".


Parameter Summary
protocol
          The protocol to operate on.
 
Constructor Summary
QuotaObserver(java.lang.String name)
          Standard constructor that reads the configuration parameters.
 
Method Summary
 boolean execute()
          Performs arbitrary modifications or reports arbitrary information over the components.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Parameter Detail

protocol

The protocol to operate on.

Constructor Detail

QuotaObserver

public QuotaObserver(java.lang.String name)
Standard constructor that reads the configuration parameters. Invoked by the simulation engine.

Parameters:
name - the configuration prefix for this class.
Method Detail

execute

public boolean execute()
Description copied from interface: Control
Performs arbitrary modifications or reports arbitrary information over the components.

Specified by:
execute in interface Control
Returns:
true if the simulation has to be stopped, false otherwise.