public abstract class ServiceManager extends Object
| Constructor and Description |
|---|
ServiceManager() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
accept(String serviceName) |
static ServiceManager |
get() |
static ServiceManager |
getManager() |
protected static ObjectName |
getObjectName(String serviceName) |
abstract void |
init() |
protected ServerService |
initServer(String serviceName,
Properties serviceProperties) |
protected List<ServerService> |
initServers(Map<String,Properties> availableServices) |
static boolean |
isEnabled(Properties props) |
static ServerService |
manage(String serviceName,
Properties serviceProperties,
ServerService service) |
static void |
register(String serviceName,
ServerService service,
MBeanServer server) |
protected static void |
setServiceManager(ServiceManager newManager) |
void |
start() |
abstract void |
start(boolean block)
Start the services managed by this instance.
|
abstract void |
stop() |
public static ServiceManager getManager()
public static ServiceManager get()
protected static void setServiceManager(ServiceManager newManager)
protected boolean accept(String serviceName)
protected List<ServerService> initServers(Map<String,Properties> availableServices) throws IOException
IOExceptionprotected ServerService initServer(String serviceName, Properties serviceProperties) throws IOException
IOExceptionprotected static ObjectName getObjectName(String serviceName)
public static void register(String serviceName, ServerService service, MBeanServer server)
public static ServerService manage(String serviceName, Properties serviceProperties, ServerService service)
public static boolean isEnabled(Properties props)
public final void start()
throws ServiceException
ServiceExceptionpublic abstract void start(boolean block)
throws ServiceException
stop() has already been called,
in which case a ServiceException should be thrownblock - A request to blockServiceException - On error or if the manager has been stopped alreadypublic abstract void stop()
throws ServiceException
ServiceExceptionCopyright © 1999–2019 The Apache Software Foundation. All rights reserved.