    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class org.w3c.jigsaw.daemon.ServerHandlerManager

    java.lang.Object
       |
       +----org.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.
commandLine
  Command line options that were provided at launch time.
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.
getCommandLine()
  Get the command line options that were provided at launch time.
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 static final 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 `org.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 `org.w3c.jigsaw.daemon.`identifier.`clones` is declared and its value specify an existing server to be cloned in order to create the new server.

CLASS_P

     public static final String CLASS_P

  The server handler property `class` suffix.

CLONES_P

     public static final String CLONES_P

  The server handler property `clones` prefix.

SERVER_USER_P

     public static final String SERVER_USER_P

SERVER_GROUP_P

     public static final 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.

commandLine

     protected String commandLine[]

  Command line options that were provided at launch time.

##

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.

getCommandLine

     public String[] getCommandLine()

  Get the command line options that were provided at launch time.

  Returns:
    A String array instance.

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