    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.

##

error(String)
  Emit a non-fatal error.
fatal(String)
  Emit a fatal error.
getServerHandlerManager()
  Get the server manager for this Java process.
launchServerHandler(String, DaemonProperties)
  Launch a new server handler.
lookupServerHandler(String)
  Lookup the server handler having the given identifier.
main(String[])

##

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

      protected final static String CLASS_P

  The server handler property `class` suffix.

CLONES_P

      protected final static String CLONES_P

  The server handler property `clones` prefix.

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.

getServerHandlerManager

      public static synchronized ServerHandlerManager getServerHandlerManager()

  Get the server manager for this Java process. If not already created, the application-wide server handler manager is created and initialized from the set of global properties.
  Returns:
    The application-wide ServerHandlerManager instance.

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.

main

      public static void main(String args[])

    All Packages  Class Hierarchy  This Package  Previous  Next  Index