    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class w3c.jigsaw.daemon.ServerHandlerManager

    java.lang.Object
       |
       +----w3c.jigsaw.daemon.ServerHandlerManager

public class ServerHandlerManager
extends Object

A ServerHandlerManager instance manages a set of ServerHandler.

##

CLASS_P
  The server handler property `class` suffix.
CLONES_P
  The server handler property `clones` prefix.
handlers
  The list of running server handlers.
HANDLERS_P
  The property containing the servers to be launched at startup time.
manager
  The Application-Wide server manager.
props
  The server handler manager property list.
SERVER_GROUP_P
SERVER_USER_P

##

enumerateServerHandlers()
  Enumerate all the server handler manager's identifiers.
error(String)
  Emit a non-fatal error.
fatal(String)
  Emit a fatal error.
launchServerHandler(String, DaemonProperties)
  Launch a new server handler.
lookupServerHandler(String)
  Lookup the server handler having the given identifier.
main(String[])
unixStuff()
  Do some UNIX specific initialization.
usage()

##

HANDLERS_P

      protected final static String HANDLERS_P

  The property containing the servers to be launched at startup time. This property is a `|` separated list of server identifiers. Declaring a server to this list requires that either:
  - An appropriate `w3c.jigsaw.daemon.`identifier.`class` is declared and specify the class of the server to be launched (this class should implement the ServerHandler interface.).
  - An appropriate `w3c.jigsaw.daemon.`identifier.`clones` is declared and its value specify an existing server to be cloned in order to create the new server.
  See Also:

CLASS_P

      public final static String CLASS_P

  The server handler property `class` suffix.

CLONES_P

      public final static String CLONES_P

  The server handler property `clones` prefix.

SERVER_USER_P

      public final static String SERVER_USER_P

SERVER_GROUP_P

      public final static String SERVER_GROUP_P

manager

      protected static ServerHandlerManager manager

  The Application-Wide server manager.

handlers

      protected Hashtable handlers

  The list of running server handlers.

props

      protected DaemonProperties props

  The server handler manager property list.

##

error

      protected void error(String msg)

  Emit a non-fatal error.
  Parameters:
    msg - The message to emit.

fatal

      protected void fatal(String msg)

  Emit a fatal error. This will abort the whole process !
  Parameters:
    msg - The fata error message.

launchServerHandler

      protected void launchServerHandler(String id,
                                         DaemonProperties props)

  Launch a new server handler. This method tries to launch a new server handler. If launching succeeds, it returns happily, otherwise, it emits an error message to the standard error stream.
  Parameters:
    identifier - The identifier of the server handler to be launched.
    props - The properties from which the server handler should initialize itself.

lookupServerHandler

      public ServerHandler lookupServerHandler(String id)

  Lookup the server handler having the given identifier.
  Parameters:
    id - The identifier of the server handler to look for.
  Returns:
    A ServerHandler instance, or null if undefined.

enumerateServerHandlers

      public Enumeration enumerateServerHandlers()

  Enumerate all the server handler manager's identifiers.
  Returns:
    An enumeration of String.

unixStuff

      public void unixStuff()

  Do some UNIX specific initialization. THis method exists straight if it cannot succeed !

usage

      public static void usage()

main

      public static void main(String args[])

    All Packages  Class Hierarchy  This Package  Previous  Next  Index