|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.akuma.Daemon
com.sun.akuma.NetworkServer
com.sun.akuma.EchoServer
public class EchoServer
Sample echo server.
| Field Summary |
|---|
| Fields inherited from class com.sun.akuma.NetworkServer |
|---|
arguments |
| Constructor Summary | |
|---|---|
EchoServer(java.lang.String[] args)
|
|
| Method Summary | |
|---|---|
protected java.net.ServerSocket |
createServerSocket()
Creates a bound ServerSocket that will be shared by all worker processes. |
protected void |
forkWorkers(JavaVMArguments args)
Forks the worker thread with the given JVM args. |
protected void |
frontend()
Front-end. |
static void |
main(java.lang.String[] args)
|
protected boolean |
shouldBeDaemonized()
Daemonize if something is given as arguments. |
protected void |
worker(java.net.ServerSocket ss)
Worker thread main code. |
| Methods inherited from class com.sun.akuma.NetworkServer |
|---|
forkWorkerThreads, run, worker |
| Methods inherited from class com.sun.akuma.Daemon |
|---|
all, chdirToRoot, closeDescriptors, daemonize, daemonize, getCurrentExecutable, init, init, isDaemonized, selfExec, writePidFile |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EchoServer(java.lang.String[] args)
| Method Detail |
|---|
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionprotected boolean shouldBeDaemonized()
shouldBeDaemonized in class NetworkServer
protected void frontend()
throws java.lang.Exception
NetworkServer
frontend in class NetworkServerjava.lang.Exception
protected void forkWorkers(JavaVMArguments args)
throws java.lang.Exception
NetworkServerNetworkServer.forkWorkerThreads(JavaVMArguments, int).
forkWorkers in class NetworkServerjava.lang.Exception
protected java.net.ServerSocket createServerSocket()
throws java.lang.Exception
NetworkServerServerSocket that will be shared by all worker processes.
This method is called in the frontend process.
createServerSocket in class NetworkServerjava.lang.Exception
protected void worker(java.net.ServerSocket ss)
throws java.lang.Exception
NetworkServer
worker in class NetworkServerss - The server socket that the frontend process created.
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||