public class JWService
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JWService.ServiceManagementException |
static class |
JWService.ServiceMessageHandler
We use this message handler to receive messages from the elevated service install component.
|
| Constructor and Description |
|---|
JWService() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getDefaultServiceName()
Get the default service name used when setting up a JWrapper service.
|
static java.lang.String |
getServicePID()
Return the process identifier reported by the last running service.
|
static void |
installService(java.lang.String startVirtualApp,
boolean requiresUI)
Install an OS service which launches the specified virtual app.
|
static void |
installService(java.lang.String startVirtualApp,
java.lang.String stopVirtualApp,
boolean requiresUI)
Install an OS service which launches the specified virtual app.
|
static void |
installService(java.lang.String startVirtualApp,
java.lang.String stopVirtualApp,
java.net.URL overrideUpdateURL,
boolean requiresUI)
Install an OS service which launches the specified virtual app.
|
static boolean |
isServiceRunning()
Check whether an instance of the service is running.
|
static void |
removeService()
Called to remove the OS service.
|
static void |
setServiceRestartOnFailure(java.lang.String serviceName,
boolean on,
boolean neverGiveUp)
Currently only on Windows
|
public static boolean isServiceRunning()
public static java.lang.String getServicePID()
public static void installService(java.lang.String startVirtualApp,
boolean requiresUI)
throws java.lang.Exception
startVirtualApp - the name of the virtual app that should be started by the service.requiresUI - set to true if this service requires access to the UI service.java.lang.Exceptionpublic static void installService(java.lang.String startVirtualApp,
java.lang.String stopVirtualApp,
boolean requiresUI)
throws java.lang.Exception
startVirtualApp - the name of the virtual app that should be started by the service.stopVirtualApp - the name of the virtual app to call when the service should be stopped.requiresUI - set to true if this service requires access to the UI service.java.lang.Exceptionpublic static void installService(java.lang.String startVirtualApp,
java.lang.String stopVirtualApp,
java.net.URL overrideUpdateURL,
boolean requiresUI)
throws java.lang.Exception
startVirtualApp - the name of the virtual app that should be started by the service.stopVirtualApp - the name of the virtual app that should be called when the OS service wishes to stop the service app. This can be null.overrideUpdateURL - a new update URL to use for the virtual app launchers, or null if no update URL overriding is required.requiresUI - set to true if this service requires access to the UI service.java.lang.Exceptionpublic static void removeService()
throws JWService.ServiceManagementException,
java.io.IOException,
java.lang.Exception
JWService.ServiceManagementExceptionjava.io.IOExceptionjava.lang.Exceptionpublic static java.lang.String getDefaultServiceName()
public static void setServiceRestartOnFailure(java.lang.String serviceName,
boolean on,
boolean neverGiveUp)
b -