|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectwave.simpleSockets.SimpleServer
A Server shell for providing multithreaded application servers.
Field Summary | |
static int |
count
|
Constructor Summary | |
SimpleServer()
|
Method Summary | |
protected void |
errorlog(java.lang.String aString)
|
ServeClient |
getClientServer(SimpleServer svr,
int count)
Override this method if you don't want to do anything special with the handling of clients. |
ServeClient |
getClientServer(SimpleServer svr,
int count,
java.lang.Thread t)
|
protected int |
getClientThreadPriority()
Gets the ClientThreadPriority attribute of the SimpleServer object |
void |
handleConnection(java.net.Socket newSocket)
handleConnection: Key method for starting server clients. |
static void |
main(java.lang.String[] args)
This method should be overriden to create an instance of your SimpleServer. |
void |
port(int port)
Change the default port of 3000 to the value provided by the parameter. |
void |
run()
Just loop and listen for client requests. |
void |
startServer()
Start up the socket server. |
void |
startThread(java.lang.Runnable r)
Use the thread pool to start a thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int count
Constructor Detail |
public SimpleServer()
Method Detail |
public static void main(java.lang.String[] args)
args
- public ServeClient getClientServer(SimpleServer svr, int count)
svr
- count
-
public ServeClient getClientServer(SimpleServer svr, int count, java.lang.Thread t)
svr
- count
- t
-
public void handleConnection(java.net.Socket newSocket)
newSocket
- public void startThread(java.lang.Runnable r)
r
- public void port(int port)
port
- public void run()
run
in interface java.lang.Runnable
public void startServer()
protected int getClientThreadPriority()
protected void errorlog(java.lang.String aString)
aString
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |