|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
net.sf.magicproject.network.MSocketListener
public final class MSocketListener
This class is listening to the actions done by the opponent and apply the corresponding actions. These actions may be : click on cards, ability choosen, mana use and auto-options changment.
| 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 |
| Method Summary | |
|---|---|
void |
closeConnections()
Close connections. |
static MSocketListener |
getInstance()
Return the unique instance of this class. |
static void |
init()
Create a new instance of this class. |
void |
newMessage(java.io.InputStream in)
To read anew message |
int |
readReplacementAnswer()
Read and return replacement answer. |
void |
run()
run this thread |
| 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 |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static void init()
public static MSocketListener getInstance()
public void newMessage(java.io.InputStream in)
throws java.io.IOException
in - the input stram
java.io.IOExceptionpublic void run()
run in interface java.lang.Runnablerun in class java.lang.ThreadIdMessagespublic void closeConnections()
public int readReplacementAnswer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||