|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--gumbo.net.NetThread
|
+--gumbo.net.msg.MessageThread
|
+--gumbo.net.ServerThread
Base class for network application server threads capable of handling a single client connection at a time.
Note that only one client should be allowed to connect at a time, with all others being rejected. At least in Windows, however, a "zero backlog" for the ServerSocket allows a second client to connect and queue for an accept.
| Field Summary | |
protected int |
_port
|
| Fields inherited from class gumbo.net.NetThread |
DEFAULT_PROXY_HOST, DEFAULT_PROXY_PORT, DEFAULT_SERVER_HOST, DEFAULT_SERVER_PORT |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
ServerThread(java.lang.String appName,
int port)
|
|
| Method Summary | |
boolean |
isServerThread()
Returns true if this thread is a server. |
void |
run()
|
| Methods inherited from class gumbo.net.msg.MessageThread |
closeMessageReader, closeMessageWriter, getMessageReader, getMessageRouter, getMessageWriter, implPleaseStop, newMessageReader, newMessageWriter, setMessageReader, setMessageWriter, showPingStatus |
| 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 |
protected int _port
| Constructor Detail |
public ServerThread(java.lang.String appName,
int port)
appName - Name of the app associated with this thread (for status
messages). If null, a default is used.port - Server port number.| Method Detail |
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic boolean isServerThread()
NetThread
isServerThread in class NetThread
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||