All Packages Class Hierarchy This Package Previous Next Index
Class VisiModel.ATMNetwork
java.lang.Object
|
+----VisiModel.ATMNetwork
- public abstract class ATMNetwork
- extends Object
Class for representation of an IP/ATM network.
- Version:
- $Revision: 1.15 $, $Date: 2000/10/12 14:09:09 $
- Author:
- John Cavanaugh, Mike Spengler, Joseph Thomas
-
aliases
- A list of aliases for the nodes in the network.
-
mappings
- A mapping of network prefixes to masked names
-
maskAddresses
- Boolean value indicating if we are to mask IP addresses.
-
maskCount
- The current number of masked addresses.
-
name
- The name of the network.
-
nets
- List of networks.
-
nodes
- A table of the nodes in the network.
-
ATMNetwork(String)
- Constructs an IP/ATM network.
-
addAlias(NodeAddress, ATMNode)
- Add an address alias for a node.
-
addAlias(String, ATMNode)
- Add a name alias for a node.
-
addNode(ATMNode)
- Add a node to the network.
-
clear()
- Clear all nodes from the network.
-
contains(ATMNode)
- Test whether the network contains a node.
-
deleteAlias(NodeAddress)
- Delete a node's address alias from the network.
-
deleteAlias(String)
- Delete a node's name alias from the network.
-
deleteNode(ATMNode)
- Delete a node from the network.
-
getMapping(String)
- Lookup mapping for network prefix
-
getMaskAddresses()
- Get the value of maskAddresses.
-
getMaskedAddress(String)
- Get the IP address mask info
-
getName()
- Get the network's name.
-
getNet(String)
- Returns the named
ATMNetwork.
-
getNode(NodeAddress)
- Find a node in the network via its address.
-
getNode(String)
- Find a node in the network via its name.
-
getNodeEnumeration()
- Gets an enumeration over the nodes in the network.
-
intVal(byte)
- Returns an (unsigned) integer val of a (signed) byte
-
setMapping(String, String)
- Create a mapping between a network prefix and a mask name
-
setMaskAddresses(boolean)
- Set the value of maskAddresses
-
setName(String)
- Set the network's name.
-
toString()
- Return a string describing the network object.
nets
private static ATMNetwork nets
- List of networks.
name
private String name
- The name of the network.
nodes
private Vector nodes
- A table of the nodes in the network.
aliases
private Hashtable aliases
- A list of aliases for the nodes in the network.
mappings
private Hashtable mappings
- A mapping of network prefixes to masked names
maskAddresses
private boolean maskAddresses
- Boolean value indicating if we are to mask IP addresses.
Initially set to false to that VisiDisplay doesn't try to
to masking. VisiCollector will default to setting this
to true.
maskCount
private int maskCount
- The current number of masked addresses.
XXX: Currently only handles 256 mappings
ATMNetwork
public ATMNetwork(String netname)
- Constructs an IP/ATM network.
- Parameters:
- netname - the name of this network
getNet
public static ATMNetwork getNet(String name)
- Returns the named
ATMNetwork.
- Parameters:
- name - the name of the
ATMNetwork
- Returns:
- the named
ATMNetwork
contains
public boolean contains(ATMNode node)
- Test whether the network contains a node.
- Parameters:
- node - the node to find.
- Returns:
- true if the node is in the network;
false if it is not.
getNode
public ATMNode getNode(NodeAddress addr) throws ATMNodeNotFoundException
- Find a node in the network via its address.
- Parameters:
- addr - The address of the node to find.
- Returns:
- The node whose address was specified.
- Throws: ATMNodeNotFoundException
- If the specified node
was not found.
getNode
public ATMNode getNode(String nname) throws ATMNodeNotFoundException
- Find a node in the network via its name.
- Parameters:
- nname - The name of the node to find.
- Returns:
- The node whose name was specified.
- Throws: ATMNodeNotFoundException
- If the specified node
was not found.
addNode
public void addNode(ATMNode node)
- Add a node to the network.
- Parameters:
- node - The node to be added.
getNodeEnumeration
public Enumeration getNodeEnumeration()
- Gets an enumeration over the nodes in the network.
- Returns:
- an enumeration over the nodes in the network.
deleteNode
public void deleteNode(ATMNode node)
- Delete a node from the network.
- Parameters:
- node - The node to be deleted
clear
public void clear()
- Clear all nodes from the network.
addAlias
public void addAlias(NodeAddress addr,
ATMNode node)
- Add an address alias for a node.
- Parameters:
- addr - The new address alias for the node.
- node - The node to be referenced via the alias.
addAlias
public void addAlias(String nname,
ATMNode node)
- Add a name alias for a node.
- Parameters:
- nname - The new name alias for the node.
- node - The node to be referenced via the alias.
deleteAlias
public void deleteAlias(NodeAddress addr)
- Delete a node's address alias from the network.
- Parameters:
- addr - The address alias to be deleted.
deleteAlias
public void deleteAlias(String nname)
- Delete a node's name alias from the network.
- Parameters:
- nname - The name alias to be deleted.
getName
public String getName()
- Get the network's name.
- Returns:
- the name of the network.
setName
public void setName(String name)
- Set the network's name.
- Parameters:
- name - the name of the network.
getMaskAddresses
public boolean getMaskAddresses()
- Get the value of maskAddresses.
- Returns:
- the value of maskAddresses.
setMaskAddresses
public void setMaskAddresses(boolean mask)
- Set the value of maskAddresses
- Parameters:
- mask - boolean value indicating if we should mask IP addrs.
intVal
private int intVal(byte b)
- Returns an (unsigned) integer val of a (signed) byte
- Parameters:
- b - the byte to be converted
- Returns:
- the (unsigned) integer value
getMaskedAddress
public String getMaskedAddress(String name)
- Get the IP address mask info
- Returns:
- the information for masking IP addresses.
toString
public String toString()
- Return a string describing the network object.
- Returns:
- A String containing a description of the
ATMNetwork object.
- Overrides:
- toString in class Object
setMapping
public void setMapping(String prefix,
String name)
- Create a mapping between a network prefix and a mask name
- Parameters:
- prefix - Network prefix to mask
- name - Mask name for this prefix
getMapping
public String getMapping(String prefix)
- Lookup mapping for network prefix
- Parameters:
- prefix - Network prefix to look up
- Returns:
- The name to mask this prefix with
All Packages Class Hierarchy This Package Previous Next Index