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
-
endpoint
- A list of the VCC's endpoints (there are usually 2).
-
icon
- The line which represents the VCC as it appears on the display.
-
net
- The network the VCC is part of.
-
owner
- The owner of the VCC.
-
ownerNames
-
-
rank
- The VCC's relative position in a list of VCCs that connect
the same endpoints.
-
sigType
- The signalling protocol that was used to create the VCC.
-
sigTypeNames
-
-
UNRANKED
-
-
VCC_MAX_VCI
-
-
VCC_MAX_VPI
-
-
VCC_MIN_VCI
-
-
VCC_MIN_VPI
-
-
VCC_OWNER_ATMARP
-
-
VCC_OWNER_CNT
-
-
VCC_OWNER_IP
-
-
VCC_OWNER_LLC
-
-
VCC_OWNER_MAX
-
-
VCC_OWNER_MIN
-
-
VCC_OWNER_SCSP
-
-
VCC_OWNER_UNDEF
-
-
VCC_SIG_CNT
-
-
VCC_SIG_FSIG
-
-
VCC_SIG_MAX
-
-
VCC_SIG_MIN
-
-
VCC_SIG_OAM
-
-
VCC_SIG_OTHER
-
-
VCC_SIG_PVC
-
-
VCC_SIG_Q2931
-
-
VCC_SIG_RCC
-
-
VCC_SIG_SPANS
-
-
VCC_SIG_SPVC
-
-
VCC_SIG_SPVC_PNNI
-
-
VCC_SIG_SPVC_SPANS
-
-
VCC_SIG_UNDEF
-
-
viewer
- A VCC viewer that is displaying information about this VCC.
-
VCC()
- Constructs a VCC with default settings.
-
VCC(Network, EndSystem, int, int, EndSystem, int, int, int, int)
- Constructs a VCC, given its type and information about its
end points.
-
VCC(Network, VCCEndpoint, VCCEndpoint, int, int)
- Constructs a VCC, given its type and end points.
-
VCC(VCC)
- Constructs a VCC by copying another VCC.
-
clearIcon()
- Clears the VCC's screen icon.
-
clearRank()
- Clears the VCC's rank.
-
delete()
- Deletes the VCC from its network.
-
draw(Graphics, ViewSettings)
- Draws the VCC in the display window.
-
findLastBandwidth(VCCEndpoint)
- Finds the bandwidth used in the last reporting interval
-
findVCCRateColor()
- Determines a color for the VCC, based on the bandwidth it
used during its last update cycle.
-
getEndpoint(String, int, int)
- Gets the VCC endpoint which matches the given end system
name, VPI, and VCI.
-
getEndpoint1()
- Gets the VCC's first endpoint.
-
getEndpoint1(VCCEndpoint)
- Sets the VCC's first endpoint.
-
getEndpoint2()
- Gets the VCC's second endpoint.
-
getEndpoint2(VCCEndpoint)
- Sets the VCC's second endpoint.
-
getEndpoints()
- Gets the VCC's endpoints.
-
getEndpoints(VCCEndpoint[])
- Sets the VCC's endpoints.
-
getIcon()
- Gets the line that represents the VCC on the screen.
-
getLabel()
- Gets a label for the VCC.
-
getNet()
- Gets the VCC's network.
-
getOwner()
- Gets the VCC's owner
-
getOwnerString()
- Gets a string with the VCC's owner
-
getRank()
- Gets the VCC's rank.
-
getSigType()
- Gets the VCC's signalling type.
-
getSigTypeString()
- Gets a string indicating the VCC's signalling type.
-
getViewer()
- Gets the viewer that is displaying information about the VCC.
-
isVisible(ViewSettings)
- Determines whether the VCC is visible under the given view
settings.
-
ownerToString(int)
- Converts a numeric owner to a string.
-
setIcon(Line)
- Sets the line that represents the VCC on the screen.
-
setNet(Network)
- Sets the VCC's network.
-
setRank(int)
- Sets the VCC's rank.
-
setViewer(VCCInfoViewer)
- Sets the viewer that is displaying information about the VCC.
-
sigTypeToString(int)
- Converts a numeric signalling type to a string.
-
toString()
- Gets a string describing the VCC object.
-
update(String, int, int, long, long, long)
- Updates counters for a VCC endpoint.
VCC_MIN_VPI
public static final int VCC_MIN_VPI
VCC_MAX_VPI
public static final int VCC_MAX_VPI
VCC_MIN_VCI
public static final int VCC_MIN_VCI
VCC_MAX_VCI
public static final int VCC_MAX_VCI
sigType
private int sigType
- The signalling protocol that was used to create the VCC.
VCC_SIG_UNDEF
public static final int VCC_SIG_UNDEF
VCC_SIG_OTHER
public static final int VCC_SIG_OTHER
VCC_SIG_SPANS
public static final int VCC_SIG_SPANS
VCC_SIG_Q2931
public static final int VCC_SIG_Q2931
VCC_SIG_PVC
public static final int VCC_SIG_PVC
VCC_SIG_SPVC
public static final int VCC_SIG_SPVC
VCC_SIG_OAM
public static final int VCC_SIG_OAM
VCC_SIG_SPVC_SPANS
public static final int VCC_SIG_SPVC_SPANS
VCC_SIG_SPVC_PNNI
public static final int VCC_SIG_SPVC_PNNI
VCC_SIG_RCC
public static final int VCC_SIG_RCC
VCC_SIG_FSIG
public static final int VCC_SIG_FSIG
VCC_SIG_MIN
public static final int VCC_SIG_MIN
VCC_SIG_MAX
public static final int VCC_SIG_MAX
VCC_SIG_CNT
public static final int VCC_SIG_CNT
sigTypeNames
private static final String sigTypeNames[]
owner
private int owner
- The owner of the VCC.
VCC_OWNER_UNDEF
public static final int VCC_OWNER_UNDEF
VCC_OWNER_LLC
public static final int VCC_OWNER_LLC
VCC_OWNER_ATMARP
public static final int VCC_OWNER_ATMARP
VCC_OWNER_IP
public static final int VCC_OWNER_IP
VCC_OWNER_SCSP
public static final int VCC_OWNER_SCSP
VCC_OWNER_MIN
public static final int VCC_OWNER_MIN
VCC_OWNER_MAX
public static final int VCC_OWNER_MAX
VCC_OWNER_CNT
public static final int VCC_OWNER_CNT
ownerNames
private static final String ownerNames[]
endpoint
private VCCEndpoint endpoint[]
- A list of the VCC's endpoints (there are usually 2).
net
private Network net
- The network the VCC is part of.
icon
private Line icon
- The line which represents the VCC as it appears on the display.
rank
private int rank
- The VCC's relative position in a list of VCCs that connect
the same endpoints.
UNRANKED
public static final int UNRANKED
viewer
private VCCInfoViewer viewer
- A VCC viewer that is displaying information about this VCC.
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.
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.
VCC
public VCC(VCC vcc)
- Constructs a VCC by copying another VCC.
- Parameters:
- vcc - the VCC to be copied.
VCC
public VCC()
- Constructs a VCC with default settings.
delete
public void delete()
- Deletes the VCC from its network.
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.
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.
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.
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.
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.
getSigType
public int getSigType()
- Gets the VCC's signalling type.
- Returns:
- the signalling type.
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.
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.
getOwner
public int getOwner()
- Gets the VCC's owner
- Returns:
- the owner of the VCC.
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.
getOwnerString
public String getOwnerString()
- Gets a string with the VCC's owner
- Returns:
- a String with the name of the VCC's owner.
getEndpoints
public VCCEndpoint[] getEndpoints()
- Gets the VCC's endpoints.
- Returns:
- an array with the VCC's endpoints.
getEndpoint1
public VCCEndpoint getEndpoint1()
- Gets the VCC's first endpoint.
- Returns:
- the VCC endpoint at the first end of the VCC.
getEndpoint2
public VCCEndpoint getEndpoint2()
- Gets the VCC's second endpoint.
- Returns:
- the VCC endpoint at the second end of the VCC.
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.
getEndpoints
public void getEndpoints(VCCEndpoint endpoint[])
- Sets the VCC's endpoints.
- Parameters:
- endpoint - an array of VCC endpoints.
getEndpoint1
public void getEndpoint1(VCCEndpoint endPoint)
- Sets the VCC's first endpoint.
- Parameters:
- endPoint - the first endpoint for the VCC.
getEndpoint2
public void getEndpoint2(VCCEndpoint endPoint)
- Sets the VCC's second endpoint.
- Parameters:
- endPoint - the second endpoint for the VCC.
getNet
public Network getNet()
- Gets the VCC's network.
- Returns:
- the network the VCC is part of.
setNet
public void setNet(Network net)
- Sets the VCC's network.
- Parameters:
- net - the network the VCC is part of.
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.
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.
clearIcon
private void clearIcon()
- Clears the VCC's screen icon.
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.
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.
clearRank
public void clearRank()
- Clears the VCC's rank.
getViewer
public VCCInfoViewer getViewer()
- Gets the viewer that is displaying information about the VCC.
- Returns:
- the VCC's viewer.
setViewer
public void setViewer(VCCInfoViewer viewer)
- Sets the viewer that is displaying information about the VCC.
- Parameters:
- viewer - the VCC's viewer.
getLabel
public String getLabel()
- Gets a label for the VCC.
- Returns:
- a String with a label for the VCC.
toString
public String toString()
- Gets a string describing the VCC object.
- Returns:
- a String describing the VCC object.
- Overrides:
- toString in class Object