.getServiceReferences(ServerLifeCycleListener.class.getName(), null);
if (refs != null) {
ServerLifeCycleManager clcm = bus.getExtension(ServerLifeCycleManager.class);
for (ServiceReference ref : refs) {
if (allowService(ref)) {
ServerLifeCycleListener listener
= (ServerLifeCycleListener)defaultContext.getService(ref);
clcm.registerListener(listener);
}
}
}
} catch (InvalidSyntaxException e) {
//ignore
}
try {
ServiceReference refs[] = defaultContext
.getServiceReferences(BusCreationListener.class.getName(), null);
if (refs != null) {
for (ServiceReference ref : refs) {
if (allowService(ref)) {
BusCreationListener listener
= (BusCreationListener)defaultContext.getService(ref);
listener.busCreated(bus);
}
}
}
} catch (InvalidSyntaxException e) {
//ignore