|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.jigsaw.daemon.ServerHandlerManager
public class ServerHandlerManager
A ServerHandlerManager instance manages a set of ServerHandler.
Field Summary | |
---|---|
static java.lang.String |
CLASS_P
The server handler property class suffix. |
static java.lang.String |
CLONES_P
The server handler property clones prefix. |
protected java.lang.String[] |
commandLine
Command line options that were provided at launch time. |
protected java.util.Hashtable |
handlers
The list of running server handlers. |
protected static java.lang.String |
HANDLERS_P
The property containing the servers to be launched at startup time. |
protected static ServerHandlerManager |
manager
The Application-Wide server manager. |
protected DaemonProperties |
props
The server handler manager property list. |
static java.lang.String |
SERVER_GROUP_P
|
static java.lang.String |
SERVER_USER_P
|
Constructor Summary | |
---|---|
ServerHandlerManager(java.lang.String[] args,
java.io.File config,
java.util.Properties p)
Create and initialize a fresh server handler manager. |
Method Summary | |
---|---|
java.util.Enumeration |
enumerateServerHandlers()
Enumerate all the server handler manager's identifiers. |
protected void |
error(java.lang.String msg)
Emit a non-fatal error. |
protected void |
fatal(java.lang.String msg)
Emit a fatal error. |
protected void |
fixProperties(java.util.Properties p)
For subclasses only. |
java.lang.String[] |
getCommandLine()
Get the command line options that were provided at launch time. |
protected void |
launchServerHandler(java.lang.String id,
DaemonProperties props)
Launch a new server handler. |
ServerHandler |
lookupServerHandler(java.lang.String id)
Lookup the server handler having the given identifier. |
static void |
main(java.lang.String[] args)
|
void |
removeServerHandler(ServerHandler server)
Remove a server handler from this manager |
void |
shutdown()
Shutdown this server handler manager. |
void |
unixStuff()
Do some UNIX specific initialization. |
static void |
usage()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String HANDLERS_P
|
separated list of server identifiers.
Declaring a server to this list requires that either:
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.).
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.
public static final java.lang.String CLASS_P
class
suffix.
public static final java.lang.String CLONES_P
clones
prefix.
public static final java.lang.String SERVER_USER_P
public static final java.lang.String SERVER_GROUP_P
protected static ServerHandlerManager manager
protected java.util.Hashtable handlers
protected DaemonProperties props
protected java.lang.String[] commandLine
Constructor Detail |
---|
public ServerHandlerManager(java.lang.String[] args, java.io.File config, java.util.Properties p)
props
- The properties this manager should be initialized from.
java.lang.RuntimeException
- If no server handlers was declared through
the properties.Method Detail |
---|
protected void error(java.lang.String msg)
msg
- The message to emit.protected void fatal(java.lang.String msg)
msg
- The fata error message.public java.lang.String[] getCommandLine()
protected void fixProperties(java.util.Properties p)
p
- the ServerHandlerManager properties.launchServerHandler
protected void launchServerHandler(java.lang.String id, DaemonProperties props)
identifier
- The identifier of the server handler to be launched.props
- The properties from which the server handler should
initialize itself.public ServerHandler lookupServerHandler(java.lang.String id)
id
- The identifier of the server handler to look for.
public java.util.Enumeration enumerateServerHandlers()
public void removeServerHandler(ServerHandler server)
server,
- the Server Handler to removepublic void shutdown()
This server handler clones are considered shutdown too.
public void unixStuff()
public static void usage()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |