gps.protocol.BT
Class BTConnection

java.lang.Object
  extended by gps.network.Connection
      extended by gps.protocol.BT.BTConnection

public class BTConnection
extends Connection

two way connection between two BTSockets.

Version:
1.2, 6/20/2005
Author:
Weishuai Yang

Constructor Summary
BTConnection(BTSocket a, BTSocket b)
          constructs BTConnection object
 
Method Summary
 void adjustBandwidth(double adj)
          request more or less bandwidth for a connection
 double getBandwidthFrom(BTSocket s)
          get bandwidth for the flow origniated from a BTSocket
 void setBandwidthFrom(BTSocket s, double b)
          set bandwidth for the flow origniated from a BTSocket
 java.lang.String toString()
          gets string description
 
Methods inherited from class gps.network.Connection
findBottleNeck, getAllConnections, getBandwidth, getBandwidthFrom, isActive, printConnections, relaxBandwidthAlongTheWay, setActive, setBandwidthFrom, setInActive, setUp, tearDown
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BTConnection

public BTConnection(BTSocket a,
                    BTSocket b)
constructs BTConnection object

Parameters:
a - source BTSocket
b - destination BTSocket
Method Detail

getBandwidthFrom

public double getBandwidthFrom(BTSocket s)
get bandwidth for the flow origniated from a BTSocket

Parameters:
s - source BTSocket
Returns:
one way bandwidth

setBandwidthFrom

public void setBandwidthFrom(BTSocket s,
                             double b)
set bandwidth for the flow origniated from a BTSocket

Parameters:
s - source BTSocket
b - new bandwidth

adjustBandwidth

public void adjustBandwidth(double adj)
request more or less bandwidth for a connection

Overrides:
adjustBandwidth in class Connection
Parameters:
adj - adjustment

toString

public java.lang.String toString()
gets string description

Overrides:
toString in class Connection
Returns:
string description