|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.iitb.untwine.Port
This class is designed to store the details of a Port (interface) on a device
Constructor Summary | |
Port()
Default class constructor. |
|
Port(int number,
int st,
int en)
Class copy constructor. |
Method Summary | |
void |
addConnection(java.lang.Object obj)
Add the object of class String passed as parameter in the prttList. |
void |
calculateThroughList(java.util.Vector subnetHost)
Calculate through list from the Forwarding database and list of hosts connected to subnet. |
java.util.Vector |
getConnectionList()
Returns the IP addresses of host connected to it. |
int |
getEnable()
Returns the enabled/disabled status of the port. |
java.util.Vector |
getFDB()
Returns the forwarding database of this port. |
int |
getNumber()
Returns the port number of the port. |
int |
getState()
Returns the state of the port. |
java.util.Vector |
getThroughList()
Returns the through database of this port. |
boolean |
isDirectConnected()
Returns whether this Port is directly connected to a other link layer device (eg. |
boolean |
isHostConnected()
Returns whether this Port is connected to a Host. |
boolean |
isRouterConnected()
Returns whether this Port is connected to a Router. |
void |
macAdd(java.lang.Object obj)
Add the object of class String passed as parameter in the portList. |
void |
setDirectConnection()
Sets the connection of this Port to another data link layer device directly. |
void |
setHostConnection()
Sets the connection of this Port to a Host. |
void |
setRouterConnection()
Sets the connection of this Port to a Router. |
void |
setSharedConnection()
Sets the connection of this Port to another data link layer device through a shared segment. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Port()
public Port(int number, int st, int en)
number
- Port numberst
- Current state of the porten
- Enable/Disable status of the portMethod Detail |
public int getNumber()
public int getState()
public int getEnable()
public void macAdd(java.lang.Object obj)
obj
- Object of class Sting (MAC address).public java.util.Vector getFDB()
public java.util.Vector getThroughList()
public java.util.Vector getConnectionList()
public void addConnection(java.lang.Object obj)
obj
- Object of class Sting (IP address).public void calculateThroughList(java.util.Vector subnetHost)
subnetHost
- List of hosts in the subnetpublic boolean isHostConnected()
public boolean isRouterConnected()
public boolean isDirectConnected()
public void setHostConnection()
public void setRouterConnection()
public void setDirectConnection()
public void setSharedConnection()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |