| java.lang.Object org.w3c.jigsaw.daemon.ServerHandlerManager
ServerHandlerManager | public class ServerHandlerManager (Code) | | A ServerHandlerManager instance manages a set of ServerHandler.
|
CLASS_P | final public static String CLASS_P(Code) | | The server handler property class suffix.
|
CLONES_P | final public static String CLONES_P(Code) | | The server handler property clones prefix.
|
HANDLERS_P | final protected static String HANDLERS_P(Code) | | 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.
|
SERVER_GROUP_P | final public static String SERVER_GROUP_P(Code) | | |
commandLine | protected String commandLine(Code) | | Command line options that were provided at launch time.
|
handlers | protected Hashtable handlers(Code) | | The list of running server handlers.
|
ServerHandlerManager | public ServerHandlerManager(String args, File config, Properties p)(Code) | | Create and initialize a fresh server handler manager.
Each server handler declared in the properties is launched in turn.
If no server handlers is declared, or if none of them is initializable
the server manager is not created and a RuntimeException is thrown,
otherwise, if at least one server handler was initialized, the server
manager emits appropriate error messages to the error stream for each
of the server handlers whose launch failed.
Parameters: props - The properties this manager should be initialized from. exception: RuntimeException - If no server handlers was declared throughthe properties. |
enumerateServerHandlers | public Enumeration enumerateServerHandlers()(Code) | | Enumerate all the server handler manager's identifiers.
An enumeration of String. |
error | protected void error(String msg)(Code) | | Emit a non-fatal error.
Parameters: msg - The message to emit. |
fatal | protected void fatal(String msg)(Code) | | Emit a fatal error.
This will abort the whole process !
Parameters: msg - The fata error message. |
fixProperties | protected void fixProperties(Properties p)(Code) | | For subclasses only. Used to update properties at runtime.
This method is called by
launchServerHandler(String id, DaemonProperties props).
Parameters: p - the ServerHandlerManager properties. See Also: launchServerHandler |
getCommandLine | public String[] getCommandLine()(Code) | | Get the command line options that were provided at launch time.
A String array instance. |
launchServerHandler | protected void launchServerHandler(String id, DaemonProperties props)(Code) | | 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. Parameters: props - The properties from which the server handler shouldinitialize itself. |
lookupServerHandler | public ServerHandler lookupServerHandler(String id)(Code) | | Lookup the server handler having the given identifier.
Parameters: id - The identifier of the server handler to look for. A ServerHandler instance, or null ifundefined. |
removeServerHandler | public void removeServerHandler(ServerHandler server)(Code) | | Remove a server handler from this manager
server, the Server Handler to remove |
shutdown | public synchronized void shutdown()(Code) | | Shutdown this server handler manager.
This method will call the shutdown method of all the running servers
stopping the manager.
This server handler clones are considered shutdown too.
|
unixStuff | public void unixStuff()(Code) | | Do some UNIX specific initialization.
THis method exists straight if it cannot succeed !
|
usage | public static void usage()(Code) | | |
|
|