|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
netbattle.MessageHandler
netbattle.NetClient
public class NetClient
This class represents an online client.
| 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 netbattle.MessageHandler |
|---|
m_input, m_output, m_socket |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
NetClient(BattleServer server,
java.net.Socket socket)
Creates a new instance of NetClient |
|
| Method Summary | |
|---|---|
void |
close()
|
protected void |
executeMessage(NetMessage raw)
Exexcute a message. |
java.lang.String |
getIpAddress()
|
int |
getStatus()
Return the status of this client. |
int |
getUserLevel()
|
java.lang.String |
getUserName()
|
protected void |
informReadError(java.lang.Throwable e)
Inform of a read error. |
protected void |
informWriteError(java.io.IOException e)
Inform of a write error. |
void |
run()
|
void |
sendFile(java.io.File f,
long length)
|
void |
sendMessage(NetMessage msg)
Send a message. |
boolean |
setBanExpiry(long date)
|
| Methods inherited from class netbattle.MessageHandler |
|---|
getNextMessage, getNextMessage, isRunning, sendMessage, stopRunning |
| 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 NetClient(BattleServer server,
java.net.Socket socket)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public void close()
public java.lang.String getUserName()
protected void informWriteError(java.io.IOException e)
MessageHandler
informWriteError in class MessageHandlerprotected void informReadError(java.lang.Throwable e)
MessageHandler
informReadError in class MessageHandlerpublic boolean setBanExpiry(long date)
public int getUserLevel()
public void sendFile(java.io.File f,
long length)
public int getStatus()
public java.lang.String getIpAddress()
public void run()
run in interface java.lang.Runnablerun in class MessageHandlerpublic void sendMessage(NetMessage msg)
MessageHandler
sendMessage in class MessageHandlerprotected void executeMessage(NetMessage raw)
MessageHandler
executeMessage in class MessageHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||