org.apache.openejb.server
Class ServiceManager
java.lang.Object
org.apache.openejb.server.ServiceManager
- Direct Known Subclasses:
- ServiceManagerExtender, SimpleServiceManager
public abstract class ServiceManager
- extends Object
- Version:
- $Rev$ $Date$
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceManager
public ServiceManager()
getManager
public static ServiceManager getManager()
get
public static ServiceManager get()
setServiceManager
protected static void setServiceManager(ServiceManager newManager)
accept
protected boolean accept(String serviceName)
initServers
protected List<ServerService> initServers(Map<String,Properties> availableServices)
throws IOException
- Throws:
IOException
initServer
protected ServerService initServer(String serviceName,
Properties serviceProperties)
throws IOException
- Throws:
IOException
getObjectName
protected static ObjectName getObjectName(String serviceName)
register
public static void register(String serviceName,
ServerService service,
MBeanServer server)
manage
public static ServerService manage(String serviceName,
Properties serviceProperties,
ServerService service)
isEnabled
public static boolean isEnabled(Properties props)
init
public abstract void init()
throws Exception
- Throws:
Exception
start
public final void start()
throws ServiceException
- Throws:
ServiceException
start
public abstract void start(boolean block)
throws ServiceException
- Start the services managed by this instance.
Services should not be started if
stop() has already been called,
in which case a ServiceException should be thrown
- Parameters:
block - A request to block
- Throws:
ServiceException - On error or if the manager has been stopped already
stop
public abstract void stop()
throws ServiceException
- Throws:
ServiceException
Copyright © 1999–2015 The Apache Software Foundation. All rights reserved.