Class Network
java.lang.Object
|
+----VisiModel.ATMNetwork
|
+----Network
- public class Network
- extends ATMNetwork
Class definition for a displayable representation of an IP/ATM
network.
- Version:
- $Revision: 1.15 $, $Date: 2000/10/30 17:05:09 $
- Author:
- John Cavanaugh
-
config
- The network's configuration.
-
frame
- The frame the network is being displayed in.
-
VCC_LIST_INC
-
-
VCC_LIST_SIZE
-
-
vccList
- List of all the VCCs in the network.
-
view
- The view settings being used for display.
-
viewer
- A viewer that is displaying information about the network.
-
Network(VisiFrame)
- Constructs an IP/ATM network.
-
Network(VisiFrame, String)
- Constructs a named IP/ATM network.
-
addNode(Node)
- Add a node to the network; overrides addNode() in ATMNetwork.
-
clear()
- Clear the network.
-
clearNodeLocations()
- Clears display locations from all nodes.
-
connectPhy(Node, Node)
- Establish a physical connection between two nodes.
-
connectVCC(String, int, int, String, int, int, int, int)
- Establish a VCC between two nodes.
-
count()
- Count the nodes in the network.
-
countEndSystems()
- Count the end systems in the network.
-
countOrphans()
- Count the orphan hosts in the network.
-
countSwitches()
- Count the switches in the network.
-
countUnknownNodes()
- Count the nodes of unknown type in the network.
-
countVccs()
- Count the VCCs in the network.
-
draw(Graphics)
- Draw the network.
-
findMaxBandwidth()
- Find the maximum bandwidth of any port in the network.
-
getConfig()
- Get the network's configuration.
-
getFrame()
- Get the network's display frame.
-
getSummaryString()
- Get a summary of the network in printable format.
-
getVCC(String, int, int, String, int, int)
- Find a VCC in an IP/ATM network.
-
getVCCEnumeration()
- Return an enumeration over the VCCs in the network.
-
getView()
- Get the network's view settings.
-
getViewer()
- Get the network information viewer.
-
handleUpdate(ModelUpdate)
- Process a node update.
-
removeNode(Node)
- Remove a node from the network.
-
removePhy(Node, Node)
- Delete a physical connection between two nodes.
-
removeVCC(VCC)
- Delete a VCC from the network.
-
reposition()
- Choose display positions for the areas and nodes in the network.
-
resetVCCRanks()
- Resets the rank in all VCCs.
-
setConfig(VisiConfig)
- Set the network's configuration.
-
setView(ViewSettings)
- Set the network's view settings.
-
setViewer(NetworkInfoViewer)
- Set the network information viewer.
-
toString()
- Return a string describing the network object.
-
whichNode(Point)
- Find which node, if any, the cursor is on.
frame
private VisiFrame frame
- The frame the network is being displayed in.
config
private VisiConfig config
- The network's configuration.
view
private ViewSettings view
- The view settings being used for display.
vccList
private Vector vccList
- List of all the VCCs in the network. The VCCs also appear
in the vccAdjLists of the nodes they connect.
VCC_LIST_SIZE
private static final int VCC_LIST_SIZE
VCC_LIST_INC
private static final int VCC_LIST_INC
viewer
private NetworkInfoViewer viewer
- A viewer that is displaying information about the network.
Network
public Network(VisiFrame frame,
String name)
- Constructs a named IP/ATM network.
Network
public Network(VisiFrame frame)
- Constructs an IP/ATM network.
handleUpdate
public void handleUpdate(ModelUpdate update)
- Process a node update.
- Parameters:
- update - the update to be processed.
addNode
public void addNode(Node node)
- Add a node to the network; overrides addNode() in ATMNetwork.
- Parameters:
- node - the node to be added.
removeNode
public void removeNode(Node node)
- Remove a node from the network.
- Parameters:
- node - the node to be removed.
clearNodeLocations
private void clearNodeLocations()
- Clears display locations from all nodes.
resetVCCRanks
private void resetVCCRanks()
- Resets the rank in all VCCs.
connectPhy
public void connectPhy(Node n1,
Node n2)
- Establish a physical connection between two nodes.
- Parameters:
- n1 - the node at one end of the connection.
- n2 - the node at one end of the connection.
removePhy
public void removePhy(Node n1,
Node n2)
- Delete a physical connection between two nodes.
- Parameters:
- cc - a flag indicating whether the VCC is complete.
getVCC
public VCC getVCC(String s1,
int vpi1,
int vci1,
String s2,
int vpi2,
int vci2)
- Find a VCC in an IP/ATM network.
- Parameters:
- s1 - the name of the first node.
- vpi1 - the VPI at the first node.
- vci1 - the VCI at the first node.
- s2 - the name of the second node.
- vpi2 - the VPI at the second node.
- vci2 - the VCI at the second node.
connectVCC
public void connectVCC(String s1,
int vpi1,
int vci1,
String s2,
int vpi2,
int vci2,
int sigType,
int owner)
- Establish a VCC between two nodes.
- Parameters:
- s1 - the name of the first node.
- vpi1 - the VPI at the first node.
- vci1 - the VCI at the first node.
- s2 - the name of the second node.
- vpi2 - the VPI at the second node.
- vci2 - the VCI at the second node.
- sigType - the signalling protocol which established
the VCC.
- owner - the owner of the VCC.
removeVCC
public void removeVCC(VCC vcc)
- Delete a VCC from the network.
- Parameters:
- vcc - the VCC to be removed.
getVCCEnumeration
public Enumeration getVCCEnumeration()
- Return an enumeration over the VCCs in the network.
- Returns:
- an Enumeration over the list of VCCs in the network.
clear
public void clear()
- Clear the network.
- Overrides:
- clear in class ATMNetwork
draw
public void draw(Graphics g)
- Draw the network.
- Parameters:
- g - the graphics context for the drawing area.
reposition
public void reposition()
- Choose display positions for the areas and nodes in the network.
whichNode
public Node whichNode(Point cursorLoc)
- Find which node, if any, the cursor is on.
- Parameters:
- cursorLoc - the location of the cursor.
- Returns:
- the node whose icon contains the cursor;
null if the cursor is not on any node.
findMaxBandwidth
public long findMaxBandwidth()
- Find the maximum bandwidth of any port in the network.
- Returns:
- the maximum bandwidth, in cells per second, of
any switch port in the network.
count
public int count()
- Count the nodes in the network.
- Returns:
- the number of nodes in the network.
countSwitches
public int countSwitches()
- Count the switches in the network.
- Returns:
- the number of switches in the network.
countEndSystems
public int countEndSystems()
- Count the end systems in the network.
- Returns:
- the number of end systems in the network.
countUnknownNodes
public int countUnknownNodes()
- Count the nodes of unknown type in the network.
- Returns:
- the number of nodes of unknown type in the network.
countOrphans
public int countOrphans()
- Count the orphan hosts in the network. An orphan host is an
end system with no connection to an ATM switch.
- Returns:
- the number of orphan hosts in the network.
countVccs
public int countVccs()
- Count the VCCs in the network.
- Returns:
- the number of VCCs in the network.
getSummaryString
public String[] getSummaryString()
- Get a summary of the network in printable format.
- Returns:
- an array of strings summarizing the various
elements in the network.
getFrame
public VisiFrame getFrame()
- Get the network's display frame.
- Returns:
- the display frame for the network.
getConfig
public VisiConfig getConfig()
- Get the network's configuration.
- Returns:
- the configuration for the network.
setConfig
public void setConfig(VisiConfig config)
- Set the network's configuration.
- Parameters:
- config - the configuration for the network.
getView
public ViewSettings getView()
- Get the network's view settings.
- Returns:
- the view settings for the network.
setView
public void setView(ViewSettings view)
- Set the network's view settings.
- Parameters:
- view - the view settings for the network.
getViewer
public NetworkInfoViewer getViewer()
- Get the network information viewer.
- Returns:
- the viewer displaying information about the network.
setViewer
public void setViewer(NetworkInfoViewer viewer)
- Set the network information viewer.
- Parameters:
- viewer - the viewer displaying information about
the network.
toString
public String toString()
- Return a string describing the network object.
- Returns:
- a string describing the network object.
- Overrides:
- toString in class ATMNetwork