public class Services extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EXTENSION_POINT_ID |
private static boolean |
initialised |
private static org.slf4j.Logger |
log |
static EventType |
SERVICE_STARTED
Events of this type are sent to the extensions registry whenever a
service extension is started.
|
static EventType |
SERVICE_STOPPED
Events of this type are sent to the extensions registry whenever a
service extension is stopped.
|
Constructor and Description |
---|
Services() |
Modifier and Type | Method and Description |
---|---|
static void |
close()
Stop all services.
|
private static ExtensionsInvoker<ServiceControllerAction> |
getInvoker(Extension<ServiceControllerAction> extension) |
static void |
init()
Initialise and start the installed services.
|
static void |
restart(Extension<ServiceControllerAction> ext)
Restart services as a result of an administrator has uninstalled an extension
or is updating/disabling an existing on.
|
static void |
start(Extension<ServiceControllerAction> ext)
Start services as a result of an administrator has installed a new extension
or updated/enabled an existing on.
|
static void |
stop(Extension<ServiceControllerAction> ext)
Start services as a result of an administrator has uninstalled an extension
or is updating/disabling an existing on.
|
private static final org.slf4j.Logger log
public static final String EXTENSION_POINT_ID
public static final EventType SERVICE_STARTED
Registry.registerEventHandler(EventHandler, EventFilter)
.public static final EventType SERVICE_STOPPED
Registry.registerEventHandler(EventHandler, EventFilter)
.private static boolean initialised
public static void init()
public static void close()
public static void start(Extension<ServiceControllerAction> ext)
ext
- The extension, or null to start all enabled extensionpublic static void stop(Extension<ServiceControllerAction> ext)
ext
- The extension, or null to stop all enabled extensionpublic static void restart(Extension<ServiceControllerAction> ext)
ext
- The extension, or null to stop all enabled extensionprivate static ExtensionsInvoker<ServiceControllerAction> getInvoker(Extension<ServiceControllerAction> extension)