Class SwitchPort
java.lang.Object
|
+----VisiModel.ATMPort
|
+----SwitchPort
- public class SwitchPort
- extends ATMPort
Class definition for a displayable node (switch or end system) in an
IP/ATM network.
- Version:
- $Revision: 1.4 $, $Date: 2000/10/12 14:08:01 $
- Author:
- John Cavanaugh
-
bwIn
- The input bandwidth.
-
bwOut
- The output bandwidth.
-
currentStatistics
- The current port counter values
-
statsHistory
- A list of previous statistics values.
-
viewer
- A port information viewer that is displaying information
about the port.
-
SwitchPort(Switch, String, long, long)
- Constructs a port.
-
delete()
- Deletes the port from its switch.
-
getBwAllocIn()
- Gets the port's current allocated input bandwidth.
-
getBwAllocOut()
- Gets the port's current allocated output bandwidth.
-
getBwIn()
- Gets the port's input bandwidth.
-
getBwOut()
- Gets the port's output bandwidth.
-
getRcvCells()
- Gets the number of cells received by the port.
-
getStatisticsIteration()
- Gets an iteration over the port's statistics.
-
getSwitch()
- Gets the switch the port is attached to.
-
getUptime()
- Gets the port's uptime.
-
getViewer()
- Gets the viewer that is displaying information about the port.
-
getXmitCells()
- Gets the number of cells transmitted by the port.
-
setViewer(PortInfoViewer)
- Sets the viewer that is displaying information about the port.
-
toString()
- Gets a string describing the switch port object.
-
update(long, long, long, long, long, long)
- Updates the port counters.
bwIn
private long bwIn
- The input bandwidth.
bwOut
private long bwOut
- The output bandwidth.
currentStatistics
private PortStatistics currentStatistics
- The current port counter values
statsHistory
private StatisticsQueue statsHistory
- A list of previous statistics values.
viewer
private PortInfoViewer viewer
- A port information viewer that is displaying information
about the port.
SwitchPort
public SwitchPort(Switch sw,
String name,
long bwIn,
long bwOut)
- Constructs a port.
- Parameters:
- sw - the switch the port is attached to.
- name - a name for the port.
- bwIn - the port's input bandwidth.
- bwOut - the port's output bandwidth.
delete
public void delete()
- Deletes the port from its switch.
- Overrides:
- delete in class ATMPort
update
public void update(long uptime,
long bwAllocIn,
long rcvCells,
long bwAllocOut,
long xmitCells,
long updTime)
- Updates the port counters.
- Parameters:
- uptime - The time the port has been up.
- bwAllocIn - The allocated input bandwidth.
- rcvCells - The number of cells received.
- bwAllocOut - The allocated output bandwidth.
- xmitCells - The number of cells transmitted.
- updTime - The time the update took place.
getStatisticsIteration
public VIteration getStatisticsIteration()
- Gets an iteration over the port's statistics.
- Returns:
- an iteration over the port's statistics.
getSwitch
public Switch getSwitch()
- Gets the switch the port is attached to.
- Returns:
- the switch the port is attached to.
getUptime
public long getUptime()
- Gets the port's uptime.
- Returns:
- the time the port has been up.
getBwIn
public long getBwIn()
- Gets the port's input bandwidth.
- Returns:
- the port's input bandwidth.
getBwOut
public long getBwOut()
- Gets the port's output bandwidth.
- Returns:
- the port's output bandwidth.
getBwAllocIn
public long getBwAllocIn()
- Gets the port's current allocated input bandwidth.
- Returns:
- the port's allocated input bandwidth.
getBwAllocOut
public long getBwAllocOut()
- Gets the port's current allocated output bandwidth.
- Returns:
- the port's allocated output bandwidth.
getRcvCells
public long getRcvCells()
- Gets the number of cells received by the port.
- Returns:
- the number of cells received by the port.
getXmitCells
public long getXmitCells()
- Gets the number of cells transmitted by the port.
- Returns:
- the number of cells transmitted by the port.
getViewer
public PortInfoViewer getViewer()
- Gets the viewer that is displaying information about the port.
Returns null if there is no viewer.
- Returns:
- the viewer displaying port information.
setViewer
public void setViewer(PortInfoViewer viewer)
- Sets the viewer that is displaying information about the port.
- Parameters:
- viewer - the viewer displaying port information.
toString
public String toString()
- Gets a string describing the switch port object.
- Returns:
- a String describing the switch port object.
- Overrides:
- toString in class ATMPort