|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgps.network.BandwidthManager
public class BandwidthManager
bandwidth manager on each link
| Constructor Summary | |
|---|---|
BandwidthManager(Link l)
constructor initiates a bandwidth on link |
|
| Method Summary | |
|---|---|
void |
activeConnection(Connection c)
active a existing connection on this link |
void |
addConnection(Connection c)
add a connection on this link |
void |
adjustBandwidthForConnection(Connection c,
double adj)
adjucst bandwidth for a connection |
void |
bandwidthDraw(java.awt.Graphics g,
int x,
int y)
draws bandwidth information on GUI component |
java.util.LinkedHashSet |
getActiveConnectionList()
gets active connections on this link |
double |
getAvailableBandwidth()
gets available bandwidth |
double |
getBandwidth()
gets physical bandwidth |
java.util.LinkedHashSet |
getInActiveConnectionList()
gets inactive connections on this link |
void |
inActiveConnection(Connection c)
inactive a existing connection on this link |
double |
negotiateForConnection(Connection c)
get estimated amount of bandwidth that can be allocated to a connection. |
void |
removeConnection(Connection c)
remove a connection on this link |
void |
reserveFor(Connection c)
reserve bandwidth for a connection |
void |
reset()
reset to initial value |
void |
returnBandwidth(Connection c)
return bandwidth occupied by connection to available bandwidth |
void |
setBandwidth(double i)
sets physical bandwidth |
java.lang.String |
toString()
gets string description |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BandwidthManager(Link l)
l - link| Method Detail |
|---|
public void reset()
public double getBandwidth()
public void setBandwidth(double i)
i - maximum bandwidth possiblepublic double getAvailableBandwidth()
public java.util.LinkedHashSet getActiveConnectionList()
public java.util.LinkedHashSet getInActiveConnectionList()
public void addConnection(Connection c)
c - new connectionpublic void removeConnection(Connection c)
c - connection to be removedpublic void activeConnection(Connection c)
c - connection to be activatedpublic void inActiveConnection(Connection c)
c - connection to be inactivatedpublic void returnBandwidth(Connection c)
c - connection returning bandwidthpublic double negotiateForConnection(Connection c)
c - connection that wants bandwidth
public void adjustBandwidthForConnection(Connection c,
double adj)
c - connection that needs adjust bandwidthadj - adjust amount, positive for increase, and negative for decreasepublic void reserveFor(Connection c)
c - connection that needs reserve bandwidth
public void bandwidthDraw(java.awt.Graphics g,
int x,
int y)
g - Graphics objectx - x positiony - y positionpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||