|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectEmulatedNode
Keeps track of information about an emulated node Emulated node uses a TCP socket to talk to the Trawler, but send and receive messages directly to other emulated nodes using UDP.
| Constructor Summary | |
EmulatedNode(java.net.Socket socket,
java.io.PrintWriter out,
int fishAddr,
java.net.InetAddress ipAddress,
int port)
Create a new EmulatedNode |
|
| Method Summary | |
void |
close()
Close the the connection to the emulated node |
int |
getFishAddr()
Get the fishnet address of this node |
java.net.InetAddress |
getIPAddress()
Get the IP address of the machine that this emulated node is on |
int |
getPort()
Get the port that this emulated node is using to talk to its neighbors |
boolean |
isAlive()
Check if the emulated node is still alive |
void |
putEdge(EmulatedNode peerNode)
Tell the emulated node about one of its neighbors |
void |
removeEdge(int peerFishAddr)
Tell the emulated node that one of its neighbors is gone |
void |
reset()
Remove all edge's from this emulated node. |
java.lang.String |
toString()
Return a string containing details of this emulated node |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public EmulatedNode(java.net.Socket socket,
java.io.PrintWriter out,
int fishAddr,
java.net.InetAddress ipAddress,
int port)
socket - The socket to use to talk to the emulated nodeout - An outputstream to use to send data across the socketfishAddr - The fishnet address of the emulated nodeipAddress - The IP address of the machine that the node is onport - The port that the emulated node will use to talk to other nodes| Method Detail |
public void putEdge(EmulatedNode peerNode)
peerNode - A neighbor of this nodepublic void removeEdge(int peerFishAddr)
peerFishAddr - The fishnet address of the neighborpublic void reset()
public void close()
public int getFishAddr()
public java.net.InetAddress getIPAddress()
public int getPort()
public java.lang.String toString()
public boolean isAlive()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||