|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object i3.dragos.core.ServiceManager
public class ServiceManager
The ServiceManager
manages all services used by the DRAGOS
database.
Constructor Summary | |
---|---|
ServiceManager()
Constructs the service manager. |
Method Summary | |
---|---|
boolean |
addService(Service service)
Adds the services to the manager and initializes it. |
boolean |
addService(java.lang.String serviceClass)
Adds the services to the manager and initializes it. |
static ServiceManager |
getInstance()
Returns the service manager registered to the module manager. |
java.lang.String |
getRole()
Returns the kernel module's role. |
Service |
getService(java.lang.String name)
Returns the service with the given name. |
void |
initialize()
Initializes the kernel module. |
java.lang.String[] |
listServices()
Reutrns a list of the names of all services managed by this service manager. |
boolean |
removeService(Service service)
Removes the services from the manager. |
boolean |
startServices()
Starts all services managed by this service manager in the order they were added to it. |
void |
stopServices()
Stops all services managed by this service manager in the reverse order of their addition. |
void |
uninitialize()
Uninitializes the kernel module and releases all resources used by it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceManager()
Method Detail |
---|
public static ServiceManager getInstance()
public java.lang.String getRole()
getRole
in interface KernelModule
public void initialize()
initialize
in interface KernelModule
public void uninitialize()
uninitialize
in interface KernelModule
public boolean addService(java.lang.String serviceClass)
serviceClass
- The class that implements the service.
true
if the service could be added and
false
otherwise.public boolean addService(Service service)
service
- The service that should be removed.
true
if the service could be added and
false
otherwise.public boolean removeService(Service service)
service
- The service that should be removed.
true
if the service has been removed successfully
and false
otherwise.public boolean startServices()
true
if all registered services were started
successfully and false
otherwise.public void stopServices()
public java.lang.String[] listServices()
public Service getService(java.lang.String name)
null
is returned.
name
- The name of the service.
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |