Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.net
Class Listener  view Listener download Listener.java

java.lang.Object
  extended byjava.net.Listener

public class Listener
extends java.lang.Object

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.

Version:
1.0

Field Summary
protected  int compr_len
           
protected  long compress_time
           
protected  Interpolator interpolator
          The interpolator to update.
protected  int level
           
protected  long send_start
           
protected  int uncompr_len
           
 
Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

interpolator

protected Interpolator interpolator
The interpolator to update.


level

protected int level

uncompr_len

protected int uncompr_len

compr_len

protected int compr_len

compress_time

protected long compress_time

send_start

protected long send_start
Constructor Detail

Listener

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.

Method Detail

done

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.