|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.iitb.untwine.Device
This class is designed to store the details of a managed link layer (Layer-2) device
| Constructor Summary | |
Device()
Default class constructor. |
|
Device(java.lang.String ip,
java.lang.String mac,
int count,
boolean commPublic)
Class copy constructor. |
|
| Method Summary | |
int |
getCostToRoot()
Returns the cost of the path to the root in the spanning tree as seen by this device. |
java.lang.String |
getIP()
Returns the IP address of host |
java.lang.String |
getMAC()
Returns the MAC address of host |
int |
getPortCount()
Returns the number of interfaces (ports) of this device. |
java.util.Vector |
getPortList()
Returns the list of ports of this device |
int |
getRootPort()
Returns the port which provides the lowest cost path to root |
int |
getRootPortPathCost()
Returns the contribution of the root port to the path cost of path to root. |
boolean |
isPublic()
Returns whether community name is public or the one supplied to the program. |
void |
portAdd(java.lang.Object obj)
Add the object of class Port passed as parameter in the portList. |
void |
setCostToRoot(int ctr)
Sets the cost of the path to the root in the spanning tree as seen by this device. |
void |
setPortList(java.util.Vector pl)
Sets the list of ports of this device |
void |
setRootPort(int rp)
Sets the port which provides the lowest cost path to root |
void |
setRootPortPathCost(int rppc)
Sets the contribution of the root port to the path cost of path to root. |
void |
updatePort(Port p)
Updates a Port, specified as parameter, in the portList. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Device()
public Device(java.lang.String ip,
java.lang.String mac,
int count,
boolean commPublic)
ip - IP address of hostmac - MAC address of hostcount - Number of interfaces (ports) of
Device.commPublic - boolean specifying whether
community name is public or the one supplied as
input to the program.| Method Detail |
public java.lang.String getIP()
public java.lang.String getMAC()
public boolean isPublic()
public void portAdd(java.lang.Object obj)
obj - Object of class Portpublic void updatePort(Port p)
p - Object of class Port.public java.util.Vector getPortList()
public void setPortList(java.util.Vector pl)
pl - Vector of Portspublic int getPortCount()
public int getCostToRoot()
public int getRootPort()
public int getRootPortPathCost()
public void setCostToRoot(int ctr)
ctr - Cost of path to root.public void setRootPort(int rp)
rp - Root Port which provide lowest cost path
to root.public void setRootPortPathCost(int rppc)
rppc - Contribution of root port to the path
cost of path to root.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||