|
SRJRCFrames v0.1.296 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.schwarzrot.app.support.AbstractApplicationLauncher<C> de.schwarzrot.app.support.ServiceLauncher<C>
C
- - config type for service configurationpublic class ServiceLauncher<C extends ServiceConfig>
a helper class to start background/system services. This class provides property parsing, logfile setup and instantiation of the real service instance.
Field Summary | |
---|---|
static String |
KEY_CLASSPATH
|
static String |
KEY_JAR_FILENAME
|
static String |
KEY_PID_FILE
|
static String |
KEY_SLEEP_TIME
|
static String |
SERVICE_START_TOKEN
|
Fields inherited from class de.schwarzrot.app.support.AbstractApplicationLauncher |
---|
APPLICATION_TYPE, starter, sysInfo |
Constructor Summary | |
---|---|
ServiceLauncher(Service<C> service,
String[] appContextFiles,
List<String> appArgs)
|
Method Summary | |
---|---|
protected void |
daemonize()
detach the service, so it can run in the background |
protected Service<C> |
getService()
|
protected Thread |
getServiceManagerThread()
accessor to the main thread of the service |
protected AbstractApplicationContext |
init(String[] appContextFiles)
|
static boolean |
isDebug()
|
boolean |
isShutdownRequested()
a shutdown request for a service may occure from inside (the service) or from outside (the operating system). |
static void |
setDebug(boolean debug)
|
protected void |
setupConfig()
process common service parameters from jvms system properties |
protected void |
shutdown()
initiate the shutdown procedure. |
void |
start()
the mainloop of all services. |
Methods inherited from class de.schwarzrot.app.support.AbstractApplicationLauncher |
---|
checkDBAccess, doUsage, dumpCharsets, getLogger, getStarter, getSysInfo, loadExtensions, parseAppArgs, printAppInfo, setSysInfo, sysDump |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SERVICE_START_TOKEN
public static final String KEY_CLASSPATH
public static final String KEY_JAR_FILENAME
public static final String KEY_PID_FILE
public static final String KEY_SLEEP_TIME
Constructor Detail |
---|
public ServiceLauncher(Service<C> service, String[] appContextFiles, List<String> appArgs)
Method Detail |
---|
public boolean isShutdownRequested()
public void start()
start
in class AbstractApplicationLauncher<C extends ServiceConfig>
protected void daemonize()
protected final Service<C> getService()
protected Thread getServiceManagerThread()
protected AbstractApplicationContext init(String[] appContextFiles)
init
in class AbstractApplicationLauncher<C extends ServiceConfig>
protected void setupConfig()
protected void shutdown()
public static final boolean isDebug()
public static final void setDebug(boolean debug)
|
SRJRCFrames v0.1.296 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |