public class SwitchPort extends Layer2Handler implements BitListener
| Constructor and Description |
|---|
SwitchPort(int switchPortNum) |
SwitchPort(java.lang.String lightSysHost,
int lightSysPort,
int switchPortNum) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToOutQ(Layer2Frame fr)
A caller (a Switch object) can to add a frame to the outgoing
queue on this SwitchPort.
|
int |
getPortNum() |
java.lang.String |
toString() |
bitsReceived, dropReceivedFrame, send, setListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbitsReceivedpublic SwitchPort(int switchPortNum)
switchPortNum - the port number of this switch port on a Switch.public SwitchPort(java.lang.String lightSysHost,
int lightSysPort,
int switchPortNum)
lightSysHost - the hostname of the machine on which the
LightSystem is executing.lightSysPort - the port the LightSystem is listening on.switchPortNum - the port number of this switch port on a Switch.
This method creates a SwitchPort object, identified by the given
switchPortNum. This method creates and executes a thread that waits
on the outQ queue for a frame to be inserted. When this happens,
the thread dequeues the frame and sends its via the super class's
send() method.public java.lang.String toString()
toString in class java.lang.Objectpublic int getPortNum()
public void addToOutQ(Layer2Frame fr)