|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
Receiver
Receives obstacle positions via TCP after obtaining the server IP address and port through multicast message. Recieves game play messages via a multicast socket. Uses the data in the messages to update an associated sector display.
Field Summary | |
(package private) boolean |
flag
|
(package private) java.net.InetAddress |
home
|
(package private) int |
homePort
|
(package private) java.net.MulticastSocket |
multiSock
|
(package private) static int |
OBSTACLE_SERVER_WAIT_TIME
|
(package private) Sector |
sector
|
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
Receiver(Sector sector,
int homePort)
|
Method Summary | |
void |
finalize()
Closes streams and sockets and stops the receiving thread. |
void |
initializeObstacles()
|
void |
run()
Run method for the receiving thread. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
Sector sector
static final int OBSTACLE_SERVER_WAIT_TIME
java.net.InetAddress home
int homePort
java.net.MulticastSocket multiSock
boolean flag
Constructor Detail |
public Receiver(Sector sector, int homePort)
sector
- object to which changes will be appliedMethod Detail |
public void initializeObstacles()
public void run()
public void finalize()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |