Home » openjdk-7 » java » net » [javadoc | source]
public class: Listener [javadoc | source]
This class represents the two separate half parts of the measurement process upon which is based the statistical model used to drive the compression layer. It exists a listener for every received packet waiting for its ack to come. When the listener is created it carries information about the interpolator it should update and the measured parameters like the choosed working level, the compression time and dimension and the uncompressed dimension. Finally, when the ack arrives, the listener is awakened and the transmission time is measured. Now the model is complete and the interpolator can be updated.
Field Summary
protected  Interpolator interpolator    The interpolator to update. 
protected  int level     
protected  int uncompr_len     
protected  int compr_len     
protected  long compress_time     
protected  long send_start     
 public Listener(Interpolator interpolator,
    int level,
    long compress_time,
    int uncompr_len,
    int compr_len) 
    The constructor represents the first half of the measurement and it's responsible only for storing measured parameters. No calculation is done yet.
    interpolator - the interpolator to update
    level - the working level
    compress_time - the measured compress time
    uncompr_len - the uncompressed data length
    compr_len - the compressed data length
Method from java.net.Listener Summary:
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.net.Listener Detail:
 public  void done() 
    This method represents the second half of the measurement and it does the real update, based on the measured transmission time, after the ack has arrived.