|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmobnet.MobNet
MobNet.java - Class contains individual network information for each node and initilaises node with the Manager
| Constructor Summary | |
MobNet(java.lang.String IP)
Constructor for MobNet. |
|
| Method Summary | |
java.lang.String |
getIP()
Get the Socket which belongs to the specified port. |
Socket |
getSocket(int port)
Get the Socket which belongs to the specified port. |
int |
inBufferSize()
|
boolean |
inready()
|
java.lang.Object |
receive()
|
void |
send(java.lang.Object s,
java.lang.String IPDest)
|
void |
send(Packet p)
Insert packet into the Virtual Network. |
void |
setServerSocket(ServerSocket s)
Insert the ServerSocket into the ArrayList register of ServerSockets. |
void |
setSocket(Socket sock,
int port,
java.lang.String destIP)
Insert the Socket into the ArrayList register of Sockets. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MobNet(java.lang.String IP)
IP - Set the IP address for the node.| Method Detail |
public void send(java.lang.Object s,
java.lang.String IPDest)
public void send(Packet p)
p - The Packet to be inserted.
public void setSocket(Socket sock,
int port,
java.lang.String destIP)
throws java.net.BindException
sock - The Socket to be inserted.port - The port to which the socket has been assigneddestIP - the IP of the destination of the Socket
java.net.BindExceptionpublic void setServerSocket(ServerSocket s)
s - The ServerSocket to be inserted.public Socket getSocket(int port)
port - The port whose socket we wish to return.public boolean inready()
public java.lang.Object receive()
public java.lang.String getIP()
public int inBufferSize()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||