/**
* Receives notification that the context of the entities bundle has had a lifecycle change and
* checks it current status.
*
* @param event The {@code ServiceEvent} object.
*/
@Override
public void serviceChanged(ServiceEvent event) {
ServiceReference<?> reference = event.getServiceReference();
if (isEntities(reference.getBundle())) {
Object service = bundleContext.getService(reference);
if (service instanceof ApplicationContext) {
LOGGER.trace(
"The Entities Bundle Application Context Status: {}",
nullSafeToString(event)
);
synchronized (lock) {
contextInitialized = event.getType() != ServiceEvent.UNREGISTERING;
if (contextInitialized) {
LOGGER.info("The entities bundle context has been initialized");
} else {
LOGGER.info("The entities bundle context has been unregistered");
}
}
}
}
}
EntitiesBundleMonitor.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:motech
作者:
评论列表
文章目录