edu.uci.isr.yancees.server.service
Class ServiceManager
java.lang.Object
edu.uci.isr.yancees.server.service.ServiceManager
- All Implemented Interfaces:
- ServiceManagerInterface
public class ServiceManager
- extends java.lang.Object
- implements ServiceManagerInterface
This class manages the current instances of services, special plug-ins
that can be shared by all other plugins.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
myInstance
protected static ServiceManager myInstance
ServiceManager
protected ServiceManager()
getInstance
public static ServiceManager getInstance()
- The only way to access the unique instance of ProtocolManager is by
using this access method
- Returns:
- the unique instance of this class.
getServiceByName
public ServiceInterface getServiceByName(java.lang.String name)
- Specified by:
getServiceByName
in interface ServiceManagerInterface
- Parameters:
name
- is the name of the service to be queried
- Returns:
- a service identified by the provided name
registerService
public void registerService(ServiceInterface service)
- Register a service. The name of the service needs to be unique. It is
collected using the getName() method in the service interface
- Specified by:
registerService
in interface ServiceManagerInterface
- Parameters:
service
- is the service to be registered under the name of the service
unregisterService
public void unregisterService(java.lang.String serviceName)
- Unregisters the service
- Specified by:
unregisterService
in interface ServiceManagerInterface
- Parameters:
serviceName
- is the name of the service to be unregistered
getAvailableServices
public ServiceInterface[] getAvailableServices()
- Specified by:
getAvailableServices
in interface ServiceManagerInterface
- Returns:
- a list of all the available service references
listAvailableServiceNames
public java.lang.String[] listAvailableServiceNames()
- Specified by:
listAvailableServiceNames
in interface ServiceManagerInterface
- Returns:
- a list with the names of all the installed services