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

Variable Index

 o bwIn
The input bandwidth.
 o bwOut
The output bandwidth.
 o currentStatistics
The current port counter values
 o statsHistory
A list of previous statistics values.
 o viewer
A port information viewer that is displaying information about the port.

Constructor Index

 o SwitchPort(Switch, String, long, long)
Constructs a port.

Method Index

 o delete()
Deletes the port from its switch.
 o getBwAllocIn()
Gets the port's current allocated input bandwidth.
 o getBwAllocOut()
Gets the port's current allocated output bandwidth.
 o getBwIn()
Gets the port's input bandwidth.
 o getBwOut()
Gets the port's output bandwidth.
 o getRcvCells()
Gets the number of cells received by the port.
 o getStatisticsIteration()
Gets an iteration over the port's statistics.
 o getSwitch()
Gets the switch the port is attached to.
 o getUptime()
Gets the port's uptime.
 o getViewer()
Gets the viewer that is displaying information about the port.
 o getXmitCells()
Gets the number of cells transmitted by the port.
 o setViewer(PortInfoViewer)
Sets the viewer that is displaying information about the port.
 o toString()
Gets a string describing the switch port object.
 o update(long, long, long, long, long, long)
Updates the port counters.

Variables

 o bwIn
 private long bwIn
The input bandwidth.

 o bwOut
 private long bwOut
The output bandwidth.

 o currentStatistics
 private PortStatistics currentStatistics
The current port counter values

 o statsHistory
 private StatisticsQueue statsHistory
A list of previous statistics values.

 o viewer
 private PortInfoViewer viewer
A port information viewer that is displaying information about the port.

Constructors

 o 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.

Methods

 o delete
 public void delete()
Deletes the port from its switch.

Overrides:
delete in class ATMPort
 o 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.
 o getStatisticsIteration
 public VIteration getStatisticsIteration()
Gets an iteration over the port's statistics.

Returns:
an iteration over the port's statistics.
 o getSwitch
 public Switch getSwitch()
Gets the switch the port is attached to.

Returns:
the switch the port is attached to.
 o getUptime
 public long getUptime()
Gets the port's uptime.

Returns:
the time the port has been up.
 o getBwIn
 public long getBwIn()
Gets the port's input bandwidth.

Returns:
the port's input bandwidth.
 o getBwOut
 public long getBwOut()
Gets the port's output bandwidth.

Returns:
the port's output bandwidth.
 o getBwAllocIn
 public long getBwAllocIn()
Gets the port's current allocated input bandwidth.

Returns:
the port's allocated input bandwidth.
 o getBwAllocOut
 public long getBwAllocOut()
Gets the port's current allocated output bandwidth.

Returns:
the port's allocated output bandwidth.
 o getRcvCells
 public long getRcvCells()
Gets the number of cells received by the port.

Returns:
the number of cells received by the port.
 o getXmitCells
 public long getXmitCells()
Gets the number of cells transmitted by the port.

Returns:
the number of cells transmitted by the port.
 o 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.
 o setViewer
 public void setViewer(PortInfoViewer viewer)
Sets the viewer that is displaying information about the port.

Parameters:
viewer - the viewer displaying port information.
 o 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