Structures
Class Router

java.lang.Object
  extended by Structures.Router

public class Router
extends java.lang.Object

Router Class holds the information needed for every discovered router.

Author:
Ioannis Kakavas, Spyridon Dossis

Field Summary
static java.lang.String engineID_OID
           
static java.lang.String hostName_OID
           
static java.lang.String if_OID
           
static java.lang.String ifEntry_OID
           
static java.lang.String ifIndex_OID
           
static java.lang.String ifTable_OID
           
static java.lang.String inOctets_OID
           
static java.lang.String ipAdEntAddr_OID
           
static java.lang.String ipAdEntryIndex_OID
           
static java.lang.String ipRouteNextHop_OID
           
static java.lang.String ipRouteType_OID
           
 
Constructor Summary
Router()
          Empty constructor for the class
Router(java.lang.String hname, java.lang.String rid, byte[] eid, java.util.Vector<java.lang.String> ilist, java.util.Vector<java.lang.String> neighb, LoadCollection loads)
           
 
Method Summary
 java.lang.String getEngineID()
          This method returns the ENGINE ID of the router
 java.lang.String getHostName()
          This method returns the host name of the router
 java.util.Vector<java.lang.String> getIfList()
          This method returns a list holding the interfaces of the router
 java.util.Hashtable<com.adventnet.snmp.snmp2.SnmpOID,com.adventnet.snmp.snmp2.SnmpVar> getIfListTable()
          This method returns the Interfaces List of the router
 java.lang.String[][] getInterfacesInfo()
          Creates a [x,3] table holding index, description and IP address of all of the interfaces of the router.
 java.util.Vector<java.lang.String> getIpAddresses()
          This method returns a list with all the IP neighbors of the router
 java.util.Hashtable<com.adventnet.snmp.snmp2.SnmpOID,com.adventnet.snmp.snmp2.SnmpVar> getIpListTable()
          This method returns the IP List of the router
 LoadCollection getLoadCollection()
           
 java.util.Vector<java.lang.String> getNeighbors()
          This method returns a list with all the IP neighbors of the router
 java.lang.String getRouterID()
          This method returns the ROUTER ID of the router
 java.lang.String getXMLRepresentation()
           
 void printInterfacesInfo()
          Prints the information collected about the routers interface in a human readable format
 void printIPAddressesInfo()
          Prints a table showing the IP address of all the router's interfaces
 void printIPNeighborsInfo()
          Prints the previously discovered IP neighbors of the router
 void registerIpAddress(java.lang.String ipAddress)
           
 void setEngineID(byte[] engineID)
          This method sets the Engine ID of the router
 void setHostName(java.lang.String hostName)
          This method sets the ROUTER ID of the router
 void setIfListTable(java.util.Hashtable<com.adventnet.snmp.snmp2.SnmpOID,com.adventnet.snmp.snmp2.SnmpVar> hashTable)
          This method sets the Interfaces List of the router
 void setIpAddresses(java.util.Vector<java.lang.String> ipAddresses)
           
 void setIpListTable(java.util.Hashtable<com.adventnet.snmp.snmp2.SnmpOID,com.adventnet.snmp.snmp2.SnmpVar> hashTable)
          This method sets the IP List of the router
 void setLoadCollection(LoadCollection loadCollection)
           
 void setNeighbors(java.util.Vector<java.lang.String> neighb)
           
 void setRouterID(java.lang.String routerID)
          This method sets the ROUTER ID of the router
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hostName_OID

public static final java.lang.String hostName_OID
See Also:
Constant Field Values

engineID_OID

public static final java.lang.String engineID_OID
See Also:
Constant Field Values

ipAdEntAddr_OID

public static final java.lang.String ipAdEntAddr_OID
See Also:
Constant Field Values

ipRouteNextHop_OID

public static final java.lang.String ipRouteNextHop_OID
See Also:
Constant Field Values

ipRouteType_OID

public static final java.lang.String ipRouteType_OID
See Also:
Constant Field Values

ifEntry_OID

public static final java.lang.String ifEntry_OID
See Also:
Constant Field Values

ifIndex_OID

public static final java.lang.String ifIndex_OID
See Also:
Constant Field Values

ipAdEntryIndex_OID

public static final java.lang.String ipAdEntryIndex_OID
See Also:
Constant Field Values

ifTable_OID

public static final java.lang.String ifTable_OID
See Also:
Constant Field Values

if_OID

public static final java.lang.String if_OID
See Also:
Constant Field Values

inOctets_OID

public static final java.lang.String inOctets_OID
See Also:
Constant Field Values
Constructor Detail

Router

public Router(java.lang.String hname,
              java.lang.String rid,
              byte[] eid,
              java.util.Vector<java.lang.String> ilist,
              java.util.Vector<java.lang.String> neighb,
              LoadCollection loads)
Parameters:
hname - The hostname of the router
rid - The ROUTER ID of the router
eid - The ENGINE ID of the router
ilist - The list of the router interfaces
neighb - The list of the IP addresses of the router's IP neighbors

Router

public Router()
Empty constructor for the class

Method Detail

getRouterID

public java.lang.String getRouterID()
This method returns the ROUTER ID of the router

Returns:
ROUTER ID of the router

setRouterID

public void setRouterID(java.lang.String routerID)
This method sets the ROUTER ID of the router

Parameters:
routerID - ROUTER ID of the router

getIpListTable

public java.util.Hashtable<com.adventnet.snmp.snmp2.SnmpOID,com.adventnet.snmp.snmp2.SnmpVar> getIpListTable()
This method returns the IP List of the router

Returns:
ipListTable of the router

setIpListTable

public void setIpListTable(java.util.Hashtable<com.adventnet.snmp.snmp2.SnmpOID,com.adventnet.snmp.snmp2.SnmpVar> hashTable)
This method sets the IP List of the router

Parameters:
hashTable - IP List of the router

getIfListTable

public java.util.Hashtable<com.adventnet.snmp.snmp2.SnmpOID,com.adventnet.snmp.snmp2.SnmpVar> getIfListTable()
This method returns the Interfaces List of the router

Returns:
ifListTable of the router

setIfListTable

public void setIfListTable(java.util.Hashtable<com.adventnet.snmp.snmp2.SnmpOID,com.adventnet.snmp.snmp2.SnmpVar> hashTable)
This method sets the Interfaces List of the router

Parameters:
hashTable - Interfaces List of the router

getHostName

public java.lang.String getHostName()
This method returns the host name of the router

Returns:
host name of the router

setHostName

public void setHostName(java.lang.String hostName)
This method sets the ROUTER ID of the router

Parameters:
hostName - HostName of the router

getEngineID

public java.lang.String getEngineID()
This method returns the ENGINE ID of the router

Returns:
ENGINE ID of the router

setEngineID

public void setEngineID(byte[] engineID)
This method sets the Engine ID of the router

Parameters:
engineID - EngineID of the router

getIfList

public java.util.Vector<java.lang.String> getIfList()
This method returns a list holding the interfaces of the router

Returns:
list of all the interfaces of the router

getNeighbors

public java.util.Vector<java.lang.String> getNeighbors()
This method returns a list with all the IP neighbors of the router

Returns:
IP neighbors of the router

setNeighbors

public void setNeighbors(java.util.Vector<java.lang.String> neighb)

getIpAddresses

public java.util.Vector<java.lang.String> getIpAddresses()
This method returns a list with all the IP neighbors of the router

Returns:
IP neighbors of the router

setIpAddresses

public void setIpAddresses(java.util.Vector<java.lang.String> ipAddresses)

registerIpAddress

public void registerIpAddress(java.lang.String ipAddress)

printInterfacesInfo

public void printInterfacesInfo()
Prints the information collected about the routers interface in a human readable format


printIPAddressesInfo

public void printIPAddressesInfo()
Prints a table showing the IP address of all the router's interfaces


printIPNeighborsInfo

public void printIPNeighborsInfo()
Prints the previously discovered IP neighbors of the router


getInterfacesInfo

public java.lang.String[][] getInterfacesInfo()
                                       throws java.lang.Exception
Creates a [x,3] table holding index, description and IP address of all of the interfaces of the router.

Returns:
Throws:
java.lang.Exception

getXMLRepresentation

public java.lang.String getXMLRepresentation()

setLoadCollection

public void setLoadCollection(LoadCollection loadCollection)

getLoadCollection

public LoadCollection getLoadCollection()