Class VCC

java.lang.Object
   |
   +----VCC

public class VCC
extends Object
Class definition for a VCC in an IP/ATM network.

Version:
$Revision: 1.10 $, $Date: 2000/10/30 17:03:31 $
Author:
John Cavanaugh

Variable Index

 o endpoint
A list of the VCC's endpoints (there are usually 2).
 o icon
The line which represents the VCC as it appears on the display.
 o net
The network the VCC is part of.
 o owner
The owner of the VCC.
 o ownerNames
 o rank
The VCC's relative position in a list of VCCs that connect the same endpoints.
 o sigType
The signalling protocol that was used to create the VCC.
 o sigTypeNames
 o UNRANKED
 o VCC_MAX_VCI
 o VCC_MAX_VPI
 o VCC_MIN_VCI
 o VCC_MIN_VPI
 o VCC_OWNER_ATMARP
 o VCC_OWNER_CNT
 o VCC_OWNER_IP
 o VCC_OWNER_LLC
 o VCC_OWNER_MAX
 o VCC_OWNER_MIN
 o VCC_OWNER_SCSP
 o VCC_OWNER_UNDEF
 o VCC_SIG_CNT
 o VCC_SIG_FSIG
 o VCC_SIG_MAX
 o VCC_SIG_MIN
 o VCC_SIG_OAM
 o VCC_SIG_OTHER
 o VCC_SIG_PVC
 o VCC_SIG_Q2931
 o VCC_SIG_RCC
 o VCC_SIG_SPANS
 o VCC_SIG_SPVC
 o VCC_SIG_SPVC_PNNI
 o VCC_SIG_SPVC_SPANS
 o VCC_SIG_UNDEF
 o viewer
A VCC viewer that is displaying information about this VCC.

Constructor Index

 o VCC()
Constructs a VCC with default settings.
 o VCC(Network, EndSystem, int, int, EndSystem, int, int, int, int)
Constructs a VCC, given its type and information about its end points.
 o VCC(Network, VCCEndpoint, VCCEndpoint, int, int)
Constructs a VCC, given its type and end points.
 o VCC(VCC)
Constructs a VCC by copying another VCC.

Method Index

 o clearIcon()
Clears the VCC's screen icon.
 o clearRank()
Clears the VCC's rank.
 o delete()
Deletes the VCC from its network.
 o draw(Graphics, ViewSettings)
Draws the VCC in the display window.
 o findLastBandwidth(VCCEndpoint)
Finds the bandwidth used in the last reporting interval
 o findVCCRateColor()
Determines a color for the VCC, based on the bandwidth it used during its last update cycle.
 o getEndpoint(String, int, int)
Gets the VCC endpoint which matches the given end system name, VPI, and VCI.
 o getEndpoint1()
Gets the VCC's first endpoint.
 o getEndpoint1(VCCEndpoint)
Sets the VCC's first endpoint.
 o getEndpoint2()
Gets the VCC's second endpoint.
 o getEndpoint2(VCCEndpoint)
Sets the VCC's second endpoint.
 o getEndpoints()
Gets the VCC's endpoints.
 o getEndpoints(VCCEndpoint[])
Sets the VCC's endpoints.
 o getIcon()
Gets the line that represents the VCC on the screen.
 o getLabel()
Gets a label for the VCC.
 o getNet()
Gets the VCC's network.
 o getOwner()
Gets the VCC's owner
 o getOwnerString()
Gets a string with the VCC's owner
 o getRank()
Gets the VCC's rank.
 o getSigType()
Gets the VCC's signalling type.
 o getSigTypeString()
Gets a string indicating the VCC's signalling type.
 o getViewer()
Gets the viewer that is displaying information about the VCC.
 o isVisible(ViewSettings)
Determines whether the VCC is visible under the given view settings.
 o ownerToString(int)
Converts a numeric owner to a string.
 o setIcon(Line)
Sets the line that represents the VCC on the screen.
 o setNet(Network)
Sets the VCC's network.
 o setRank(int)
Sets the VCC's rank.
 o setViewer(VCCInfoViewer)
Sets the viewer that is displaying information about the VCC.
 o sigTypeToString(int)
Converts a numeric signalling type to a string.
 o toString()
Gets a string describing the VCC object.
 o update(String, int, int, long, long, long)
Updates counters for a VCC endpoint.

Variables

 o VCC_MIN_VPI
 public static final int VCC_MIN_VPI
 o VCC_MAX_VPI
 public static final int VCC_MAX_VPI
 o VCC_MIN_VCI
 public static final int VCC_MIN_VCI
 o VCC_MAX_VCI
 public static final int VCC_MAX_VCI
 o sigType
 private int sigType
The signalling protocol that was used to create the VCC.

 o VCC_SIG_UNDEF
 public static final int VCC_SIG_UNDEF
 o VCC_SIG_OTHER
 public static final int VCC_SIG_OTHER
 o VCC_SIG_SPANS
 public static final int VCC_SIG_SPANS
 o VCC_SIG_Q2931
 public static final int VCC_SIG_Q2931
 o VCC_SIG_PVC
 public static final int VCC_SIG_PVC
 o VCC_SIG_SPVC
 public static final int VCC_SIG_SPVC
 o VCC_SIG_OAM
 public static final int VCC_SIG_OAM
 o VCC_SIG_SPVC_SPANS
 public static final int VCC_SIG_SPVC_SPANS
 o VCC_SIG_SPVC_PNNI
 public static final int VCC_SIG_SPVC_PNNI
 o VCC_SIG_RCC
 public static final int VCC_SIG_RCC
 o VCC_SIG_FSIG
 public static final int VCC_SIG_FSIG
 o VCC_SIG_MIN
 public static final int VCC_SIG_MIN
 o VCC_SIG_MAX
 public static final int VCC_SIG_MAX
 o VCC_SIG_CNT
 public static final int VCC_SIG_CNT
 o sigTypeNames
 private static final String sigTypeNames[]
 o owner
 private int owner
The owner of the VCC.

 o VCC_OWNER_UNDEF
 public static final int VCC_OWNER_UNDEF
 o VCC_OWNER_LLC
 public static final int VCC_OWNER_LLC
 o VCC_OWNER_ATMARP
 public static final int VCC_OWNER_ATMARP
 o VCC_OWNER_IP
 public static final int VCC_OWNER_IP
 o VCC_OWNER_SCSP
 public static final int VCC_OWNER_SCSP
 o VCC_OWNER_MIN
 public static final int VCC_OWNER_MIN
 o VCC_OWNER_MAX
 public static final int VCC_OWNER_MAX
 o VCC_OWNER_CNT
 public static final int VCC_OWNER_CNT
 o ownerNames
 private static final String ownerNames[]
 o endpoint
 private VCCEndpoint endpoint[]
A list of the VCC's endpoints (there are usually 2).

 o net
 private Network net
The network the VCC is part of.

 o icon
 private Line icon
The line which represents the VCC as it appears on the display.

 o rank
 private int rank
The VCC's relative position in a list of VCCs that connect the same endpoints.

 o UNRANKED
 public static final int UNRANKED
 o viewer
 private VCCInfoViewer viewer
A VCC viewer that is displaying information about this VCC.

Constructors

 o VCC
 public VCC(Network net,
            VCCEndpoint e1,
            VCCEndpoint e2,
            int sigType,
            int owner)
Constructs a VCC, given its type and end points.

Parameters:
net - the network the VCC is in.
e1 - the first VCC end point.
e2 - the second VCC end point.
sigType - the signalling protocol that established the VCC.
sigType - the owner of the VCC.
 o VCC
 public VCC(Network net,
            EndSystem n1,
            int vp1,
            int vc1,
            EndSystem n2,
            int vp2,
            int vc2,
            int sigType,
            int owner)
Constructs a VCC, given its type and information about its end points.

Parameters:
net - the network the VCC is part of.
n1 - the end system at the first end of the VCC.
vp1 - the VPI at the first end of the VCC.
vc1 - the VCI at the first end of the VCC.
n2 - the end system at the first end of the VCC.
vp2 - the VPI at the second end of the VCC.
vc2 - the VCI at the second end of the VCC.
sigType - the signalling protocol that established the VCC.
sigType - the owner of the VCC.
 o VCC
 public VCC(VCC vcc)
Constructs a VCC by copying another VCC.

Parameters:
vcc - the VCC to be copied.
 o VCC
 public VCC()
Constructs a VCC with default settings.

Methods

 o delete
 public void delete()
Deletes the VCC from its network.

 o update
 public void update(String name,
                    int vpi,
                    int vci,
                    long uptime,
                    long xmit,
                    long updTime)
Updates counters for a VCC endpoint.

Parameters:
name - the name of the end system at the VCC endpoint.
vpi - the VPI at the VCC endpoint.
vci - the VCI at the VCC endpoint.
uptime - the uptime of the VCC at the endpoint; -1 if not set.
xmit - the number of cells transmitted by the VCC endpoint; -1 if not set.
updTime - the time the update was issued.
 o draw
 public void draw(Graphics g,
                  ViewSettings view)
Draws the VCC in the display window.

Parameters:
g - the graphics context for the display window.
view - the view settings.
 o isVisible
 public boolean isVisible(ViewSettings view)
Determines whether the VCC is visible under the given view settings.

Parameters:
view - view settings that determine whether the VCC is visible.
 o findVCCRateColor
 private Color findVCCRateColor()
Determines a color for the VCC, based on the bandwidth it used during its last update cycle.

Returns:
a color for the VCC.
 o findLastBandwidth
 private long findLastBandwidth(VCCEndpoint ep)
Finds the bandwidth used in the last reporting interval

Parameters:
ep - the endpoint for which the bandwidth is to be found.
Returns:
the bandwidth, in cells per second, used over the last reporting interval.
 o getSigType
 public int getSigType()
Gets the VCC's signalling type.

Returns:
the signalling type.
 o sigTypeToString
 public static String sigTypeToString(int sigType)
Converts a numeric signalling type to a string.

Parameters:
sigType - the signalling type.
Returns:
a string with the name of the signalling type.
 o getSigTypeString
 public String getSigTypeString()
Gets a string indicating the VCC's signalling type.

Returns:
a string with the name of the signalling protocol that created the VCC.
 o getOwner
 public int getOwner()
Gets the VCC's owner

Returns:
the owner of the VCC.
 o ownerToString
 public static String ownerToString(int owner)
Converts a numeric owner to a string.

Parameters:
owner - the owner of a VCC.
a - String with the name of the owner.
 o getOwnerString
 public String getOwnerString()
Gets a string with the VCC's owner

Returns:
a String with the name of the VCC's owner.
 o getEndpoints
 public VCCEndpoint[] getEndpoints()
Gets the VCC's endpoints.

Returns:
an array with the VCC's endpoints.
 o getEndpoint1
 public VCCEndpoint getEndpoint1()
Gets the VCC's first endpoint.

Returns:
the VCC endpoint at the first end of the VCC.
 o getEndpoint2
 public VCCEndpoint getEndpoint2()
Gets the VCC's second endpoint.

Returns:
the VCC endpoint at the second end of the VCC.
 o getEndpoint
 public VCCEndpoint getEndpoint(String esName,
                                int vpi,
                                int vci)
Gets the VCC endpoint which matches the given end system name, VPI, and VCI.

Parameters:
esName - the name of the end system an the VCC endpoint.
vpi - the VPI at the endpoint.
vci - the VCI at the endpoint.
Returns:
the specified VCC endpoint, or null if there is no match.
 o getEndpoints
 public void getEndpoints(VCCEndpoint endpoint[])
Sets the VCC's endpoints.

Parameters:
endpoint - an array of VCC endpoints.
 o getEndpoint1
 public void getEndpoint1(VCCEndpoint endPoint)
Sets the VCC's first endpoint.

Parameters:
endPoint - the first endpoint for the VCC.
 o getEndpoint2
 public void getEndpoint2(VCCEndpoint endPoint)
Sets the VCC's second endpoint.

Parameters:
endPoint - the second endpoint for the VCC.
 o getNet
 public Network getNet()
Gets the VCC's network.

Returns:
the network the VCC is part of.
 o setNet
 public void setNet(Network net)
Sets the VCC's network.

Parameters:
net - the network the VCC is part of.
 o getIcon
 public Line getIcon()
Gets the line that represents the VCC on the screen.

Returns:
a Line that represents the VCC in the display window.
 o setIcon
 private void setIcon(Line icon)
Sets the line that represents the VCC on the screen.

Parameters:
icon - a Line that represents the VCC in the display window.
 o clearIcon
 private void clearIcon()
Clears the VCC's screen icon.

 o getRank
 public int getRank()
Gets the VCC's rank.

Returns:
the VCC's position in a list of VCCs that connect the same pair of endpoints.
 o setRank
 public void setRank(int rank)
Sets the VCC's rank.

Parameters:
rank - the VCC's position in a list of VCCs that connect the same pair of endpoints.
 o clearRank
 public void clearRank()
Clears the VCC's rank.

 o getViewer
 public VCCInfoViewer getViewer()
Gets the viewer that is displaying information about the VCC.

Returns:
the VCC's viewer.
 o setViewer
 public void setViewer(VCCInfoViewer viewer)
Sets the viewer that is displaying information about the VCC.

Parameters:
viewer - the VCC's viewer.
 o getLabel
 public String getLabel()
Gets a label for the VCC.

Returns:
a String with a label for the VCC.
 o toString
 public String toString()
Gets a string describing the VCC object.

Returns:
a String describing the VCC object.
Overrides:
toString in class Object