|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--ar.com.ktulu.dict.ServerThread
Attends one connection with a client. This is the class that has all the knowledge on how to satisfy client requests.
| Field Summary | |
static java.lang.String |
CRLF
|
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
ServerThread(Server server,
java.net.Socket s)
|
|
| Method Summary | |
protected CommandData[] |
getCommands()
Reads input from the connection and parses it |
Server |
getServer()
|
protected void |
initCommands()
|
boolean |
isMimeEnabled()
|
void |
println()
|
void |
println(java.lang.Object x)
|
void |
println(java.lang.String x)
|
protected void |
processCommand(CommandData cmd)
Dispatch to the methods that implement the service requested. |
protected java.lang.String |
readInputLine()
Reads a command from the client. |
void |
run()
Main loop |
protected void |
sendBanner(java.io.PrintWriter out)
Welcome banner |
void |
setMimeEnabled(boolean enabled)
|
void |
stopServer()
|
| 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String CRLF
| Constructor Detail |
public ServerThread(Server server,
java.net.Socket s)
| Method Detail |
protected void initCommands()
public boolean isMimeEnabled()
public void setMimeEnabled(boolean enabled)
protected void sendBanner(java.io.PrintWriter out)
public Server getServer()
public void println()
public void println(java.lang.String x)
public void println(java.lang.Object x)
protected java.lang.String readInputLine()
throws java.io.IOException
java.io.IOException
protected CommandData[] getCommands()
throws java.io.IOException
java.io.IOExceptionprotected void processCommand(CommandData cmd)
public void stopServer()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||