All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.apache.jserv.JServHandler

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----org.apache.jserv.JServHandler

public class JServHandler
extends Thread
implements JServSendError, JServDebug. DebugConstants
JServHandler is the entry point to the Java part of mod_jserv. It sets up the server, initalizes everything, and listens on a TCP port for requests for the server. When it gets a request, it launches a JServConnection thread.

Author:
Alexei Kosut

Variable Index

 o auth
 o DEFAULT_PORT
 o listen_socket
 o localhostcheck
 o port
 o signal_handler
 o version

Constructor Index

 o JServHandler(int, String)

Method Index

 o fail(Exception, String)
 o main(String[])
 o run()
The body of the server thread.
 o sendError(int, String)
Report a problem encountered while initializing.
 o sendError(Throwable)
Report an exception or error encountered while loading a servlet.

Variables

 o version
 public static final String version
 o DEFAULT_PORT
 public static final int DEFAULT_PORT
 o port
 protected static int port
 o signal_handler
 protected static JServSignals signal_handler
 o listen_socket
 protected ServerSocket listen_socket
 o auth
 protected static String auth
 o localhostcheck
 protected static boolean localhostcheck

Constructors

 o JServHandler
 public JServHandler(int port,
                     String auth)

Methods

 o main
 public static void main(String args[])
 o fail
 public static void fail(Exception e,
                         String msg)
 o sendError
 public void sendError(int sc,
                       String msg)
Report a problem encountered while initializing.

 o sendError
 public void sendError(Throwable e)
Report an exception or error encountered while loading a servlet.

 o run
 public void run()
The body of the server thread. Loop forever, listening for and accepting connections from clients. For each connection, create a JServConnection object to handle communication through the new Socket.

Overrides:
run in class Thread

All Packages  Class Hierarchy  This Package  Previous  Next  Index