Methods Summary |
---|
private void | addService(SystemService service)
removeService(service.getServiceID());
SystemServiceEntry entry = new SystemServiceEntry(service);
serviceEntries.put(service.getServiceID(), entry);
|
public synchronized SystemService | getService(java.lang.String serviceID)
SystemServiceEntry entry =
(SystemServiceEntry)serviceEntries.get(serviceID);
if (entry == null) {
return null;
}
if (!entry.isStarted) {
entry.service.start();
entry.isStarted = true;
}
return entry.service;
|
public synchronized void | registerService(SystemService service)
addService(service);
|
private void | removeAllServices()
Enumeration e = serviceEntries.keys();
for(; e.hasMoreElements(); ) {
String serviceID = (String)e.nextElement();
removeService(serviceID);
}
|
private void | removeService(java.lang.String serviceID)
SystemServiceEntry entry =
(SystemServiceEntry)serviceEntries.get(serviceID);
if (entry == null) {
return;
}
if (entry.isStarted) {
entry.service.stop();
entry.isStarted = false;
}
serviceEntries.remove(serviceID);
|
public void | shutdown()
removeAllServices();
|