|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread net.clackrouter.protocol.VNSProtocolManager
public class VNSProtocolManager
Establishes a connection with VNS server, receives packets and propagates them to the Clack Client. Also receives packets from the Clack Client and sends them to the VNS server.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
VNSProtocolManager(java.lang.String server,
int port)
|
Method Summary | |
---|---|
VNSClose |
checkForVNSCloseCommand()
Performs a test to see if the VNS server is sending us a CLOSE command. |
void |
connect(java.lang.String server,
int port)
Establish a connection to the VNS server for this protocol manager |
void |
disconnectFromVNS()
Signals the protocol manager to exit |
void |
doAuth(java.lang.String username,
java.lang.String auth_key)
|
VNSData |
getData()
Supplies the next data chunk from the VNS server |
VNSHWInfo |
getHardwareInfo()
Loops until it receives the hardware information from the VNS server about this ProtocolManager's host. |
java.lang.String |
getHostName()
|
int |
getPort()
|
java.lang.String |
getServer()
|
int |
getTopology()
|
boolean |
isConnected()
Tests that the protocol manager is still connected to the VNS server |
void |
run()
Main processing loop for the ProtocolManager thread This is simply a loop in which the ProtocolManager checks if it has been told to stop, then sleeps, then both tries to read a single command from the server and send one command from its outgoing queue. |
void |
sendData(VNSData data)
Send data to the VNS server (currently supports only Packet data) |
void |
sendOpenCommand(short topologyID,
java.lang.String virtualRouterID,
java.lang.String username)
Sends an OPEN command to the VNS server to initiate a session |
void |
setRouter(Router r)
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public VNSProtocolManager(java.lang.String server, int port) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public void connect(java.lang.String server, int port) throws java.lang.Exception
server
- server to connect toport
- port to connect to
java.lang.Exception
public void run()
Router
.
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public boolean isConnected()
public void disconnectFromVNS()
public VNSHWInfo getHardwareInfo() throws java.lang.Exception
java.lang.Exception
public void doAuth(java.lang.String username, java.lang.String auth_key) throws java.lang.Exception
java.lang.Exception
public void sendOpenCommand(short topologyID, java.lang.String virtualRouterID, java.lang.String username) throws java.lang.Exception
java.lang.Exception
public VNSData getData() throws java.lang.Exception
java.lang.Exception
public VNSClose checkForVNSCloseCommand() throws java.lang.Exception
java.lang.Exception
public void sendData(VNSData data) throws java.lang.Exception
java.lang.Exception
public void setRouter(Router r)
public int getTopology()
public java.lang.String getHostName()
public int getPort()
public java.lang.String getServer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |