public abstract class ServiceLauncher extends Object implements org.apache.commons.daemon.Daemon
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.daemon.DaemonController |
controller |
protected static EngineAbstract |
engine |
protected static ServiceLauncher |
engineLauncherInstance |
protected ExecutorService |
executor |
protected static WaarpLogger |
logger
Internal Logger
|
protected static boolean |
stopCalledCorrectly |
Modifier | Constructor and Description |
---|---|
protected |
ServiceLauncher() |
Modifier and Type | Method and Description |
---|---|
static void |
_main(String[] args)
The Java entry point.
|
static void |
_windowsService(String[] args)
Windows mode
Static methods called by prunsrv to start/stop the Windows service. |
static void |
_windowsStart(String[] args)
Windows mode
Static methods called by prunsrv to start the Windows service. |
static void |
_windowsStop(String[] args)
Windows mode
Static methods called by prunsrv to stop the Windows service. |
void |
destroy() |
protected abstract EngineAbstract |
getNewEngineAbstract() |
void |
init(org.apache.commons.daemon.DaemonContext arg0) |
protected void |
initialize()
Do the work of starting the engine
|
protected static void |
initStatic() |
void |
start() |
void |
stop() |
protected void |
terminate()
Cleanly stop the engine.
|
protected void |
windowsStart()
Internal command
|
protected void |
windowsStop()
Internal command
|
protected static WaarpLogger logger
protected static EngineAbstract engine
protected static ServiceLauncher engineLauncherInstance
protected ExecutorService executor
protected static org.apache.commons.daemon.DaemonController controller
protected static boolean stopCalledCorrectly
protected abstract EngineAbstract getNewEngineAbstract()
protected static void initStatic()
public static void _main(String[] args)
args
- Command line arguments, all ignored.public static void _windowsService(String[] args) throws Exception
prunsrv.exe // IS/MyService --Classpath=C:\...\xxx.jar --Description="My Java Service" --Jvm=auto --StartMode=jvm // --StartClass=org.waarp.xxx.service.ServiceLauncher --StartMethod=windowsService --StartParams=start // --StopMode=jvm --StopClass=org.waarp.xxx.service.ServiceLauncher --StopMethod=windowsService // --StopParams=stop
args
- Arguments from prunsrv command lineException
public static void _windowsStart(String[] args) throws Exception
prunsrv.exe // IS/MyService --Classpath=C:\...\xxx.jar --Description="My Java Service" --Jvm=auto --StartMode=jvm // --StartClass=org.waarp.xxx.service.ServiceLauncher --StartMethod=windowsStart --StopMode=jvm // --StopClass=org.waarp.xxx.service.ServiceLauncher --StopMethod=windowsStop
args
- Arguments are ignoredException
public static void _windowsStop(String[] args)
prunsrv.exe // IS/MyService --Classpath=C:\...\xxx.jar --Description="My Java Service" --Jvm=auto --StartMode=jvm // --StartClass=org.waarp.xxx.service.ServiceLauncher --StartMethod=windowsStart --StopMode=jvm // --StopClass=org.waarp.xxx.service.ServiceLauncher --StopMethod=windowsStop
args
- Arguments are ignoredprotected void windowsStop()
public void init(org.apache.commons.daemon.DaemonContext arg0) throws Exception
init
in interface org.apache.commons.daemon.Daemon
Exception
public void start()
start
in interface org.apache.commons.daemon.Daemon
public void stop()
stop
in interface org.apache.commons.daemon.Daemon
public void destroy()
destroy
in interface org.apache.commons.daemon.Daemon
protected void initialize()
protected void terminate()
Copyright © 2009–2020 Waarp. All rights reserved.