use of org.springframework.osgi.extender.event.BootstrappingDependencyEvent in project karaf by apache.
the class SpringStateService method getDiag.
public String getDiag(Bundle bundle) {
OsgiBundleApplicationContextEvent event = states.get(bundle.getBundleId());
if (event == null) {
return null;
}
StringBuilder message = new StringBuilder();
Date date = new Date(event.getTimestamp());
SimpleDateFormat df = new SimpleDateFormat();
message.append(df.format(date) + "\n");
if (event instanceof BootstrappingDependencyEvent) {
message.append(getServiceInfo((BootstrappingDependencyEvent) event));
}
Throwable ex = getException(event);
if (ex != null) {
message.append("Exception: \n");
addMessages(message, ex);
}
return message.toString();
}
Aggregations