|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dfki.lt.hog.Launcher
public class Launcher
Laucher
provides static methods that initialize and
register all modules in the local registry and in the rmi
registry. It also provides a method that starts the run method of a
module in a thread.
Field Summary | |
---|---|
protected static java.lang.String |
RMI_MODULE_PROP
This is the property for the rmi module in the module config. |
Method Summary | |
---|---|
static void |
registerModule(Module aModule)
This registers aModule in the local registry. |
static Module |
registerModule(java.lang.String moduleClass,
java.util.Properties configProps,
java.lang.String rmiServer,
java.lang.String rmiPort)
This creates an instance of moduleClass using
configProps and registers it in the local registry. |
static java.rmi.Remote |
registerRmiModule(java.lang.String rmiModuleClass,
java.util.Properties configProps,
java.lang.String rmiServer,
java.lang.String rmiPort)
This creates an instance of rmiModuleClass using
configProps and registers it in the rmi registry
using rmiServer and rmiPort . |
static void |
unregisterModule(java.lang.String moduleClass,
java.lang.String rmiServer,
java.lang.String rmiPort)
This executes the shutdown method of the registered instance of moduleClass and unregisters it in the local
registry and the rmi registry if necessary. |
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 RMI_MODULE_PROP
Method Detail |
---|
public static Module registerModule(java.lang.String moduleClass, java.util.Properties configProps, java.lang.String rmiServer, java.lang.String rmiPort) throws InitializationException
moduleClass
using
configProps
and registers it in the local registry.
We assume that each module has exactly one public constructor
that takes a properties object as its only argument. If module
registers in the rmi registry, use rmiServer
and
rmiPort
.
moduleClass
- a String
with the class name of
the moduleconfigProps
- a Properties
object with config
settingsrmiServer
- a String
with the rmi serverrmiPort
- a String
with the rmi port
Module
that is the new instance of
moduleClass
InitializationException
- if initialization failspublic static void registerModule(Module aModule)
aModule
in the local registry.
aModule
- the Module
to registerpublic static java.rmi.Remote registerRmiModule(java.lang.String rmiModuleClass, java.util.Properties configProps, java.lang.String rmiServer, java.lang.String rmiPort) throws InitializationException
rmiModuleClass
using
configProps
and registers it in the rmi registry
using rmiServer
and rmiPort
.
We assume that each rmi module has exactly one public constructor
that takes a Module
as its only argument.
rmiModuleClass
- a String
with the class name of
the moduleconfigProps
- a Properties
object with config
settingsrmiServer
- a String
with the rmi serverrmiPort
- a String
with the rmi port
Remote
that is the new instance of
rmiModuleClass
or null
if no rmi
server/port is specified
InitializationException
- if initialization failspublic static void unregisterModule(java.lang.String moduleClass, java.lang.String rmiServer, java.lang.String rmiPort) throws ShutdownException
moduleClass
and unregisters it in the local
registry and the rmi registry if necessary.
moduleClass
- a String
with the class name of
the module to shutdownrmiServer
- a String
with the rmi serverrmiPort
- a String
with the rmi port
ShutdownException
- if shutdown fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |