|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.manager.ServerLauncher
A Class used by the server manager to launch new servers.
This class uses service names to look up server launching commands as
properties. Server launching command properties are of the form
wt.manager.cmd.service_name
.
If the command property value is a single word (i.e. no white space) and ends
in .class, an attempt will be made to launch the service as an internal
java.rmi.Remote
object. Likewise, if no command property is found, but the service
name is the fully qualified name of an available Java class, it will also be
launched as an internal java.rmi.Remote
object.
For external server processes, the command property is a command string that will be
executed using java.lang.Runtime.exec
.
This class contains a main
method so it can be executed as a stand-alone
application which will launch the "ServerManager" service using the configured launching
command.
Supported API: true
Extendable: false
Field Summary | |
private static Process |
child_process
|
private static String |
RESOURCE
|
private static boolean |
serviceFlag
|
Constructor Summary | |
private |
ServerLauncher()
|
Method Summary | |
static void |
main(String[] args)
Application main which launches the server manager. |
static void |
setServiceFlag(boolean value)
|
static void |
start()
Method called from within java code which launches the server manager. |
private static void |
startInternal(String service_name,
String class_name,
ServerManager manager)
|
static void |
startServer(String service_name,
ServerManager manager)
Start a new instance of the specified service. |
static void |
stopApplication()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static Process child_process
private static boolean serviceFlag
Constructor Detail |
private ServerLauncher()
Method Detail |
public static void setServiceFlag(boolean value)
public static void startServer(String service_name, ServerManager manager) throws Exception
service_name
- name of the servicemanager
- local server manager instance for registering internal server objects (null if none).
Exception
- exception thrown executing command or instantiating server objectprivate static void startInternal(String service_name, String class_name, ServerManager manager) throws Exception
Exception
public static void start() throws Exception
wt.manager.cmd.ServerManager
property.
Exception
- throw by startServer
methodpublic static void main(String[] args) throws Exception
wt.manager.cmd.ServerManager
property.
Exception
- throw by startServer
methodpublic static void stopApplication()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |