ccl.servlet
Class DebugServer
java.lang.Object
|
+--ccl.servlet.DebugServer
- All Implemented Interfaces:
- Exitable, java.lang.Runnable
- public class DebugServer
- extends java.lang.Object
- implements Exitable, java.lang.Runnable
The debug server is a simple socket server
that prints each incoming request to standard
output as well as works as an echo server,
just like in the Java Tutorial example.
Its intended purposes is to quickly see
HTTP GET or POST requests to learn
and try something about this or other
network protocols.
The user has to Ctrl-c to exit the process.
The default port is 4444.
Constructor Summary |
DebugServer()
Create this object and invoke the run method
if you want to start the server out of another object. |
Method Summary |
void |
initialize(java.lang.String[] asArg,
java.lang.String sRCSHeader)
This method is invoked to setup the application. |
static void |
main(java.lang.String[] asArg)
|
void |
run()
This method contains the main batch logic. |
void |
setExit()
Implements 'ccl.util.Exitable' interface. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_PORT
public static final int DEFAULT_PORT
DebugServer
public DebugServer()
- Create this object and invoke the run method
if you want to start the server out of another object.
setExit
public void setExit()
- Implements 'ccl.util.Exitable' interface.
- Specified by:
setExit
in interface Exitable
initialize
public void initialize(java.lang.String[] asArg,
java.lang.String sRCSHeader)
- This method is invoked to setup the application.
run
public void run()
- This method contains the main batch logic.
Be careful to expect system exits if anything
goes wrong. Also, this method will never finish
by itself if no exception happens.
- Specified by:
run
in interface java.lang.Runnable
main
public static void main(java.lang.String[] asArg)