use of org.bedework.calfacade.ifs.IfInfo in project bw-calendar-engine by Bedework.
the class SystemConf method listOpenIfs.
@Override
public String listOpenIfs() {
final StringBuilder sb = new StringBuilder();
try {
getSvci();
if (svci != null) {
for (final IfInfo ifInfo : svci.getActiveIfInfos()) {
sb.append(ifInfo.getId());
sb.append("\t");
sb.append(ifInfo.getLastStateTime());
sb.append("\t");
sb.append(ifInfo.getState());
sb.append("\t");
sb.append(ifInfo.getSeconds());
sb.append("\n");
}
}
} catch (final Throwable t) {
error(t);
} finally {
closeSvci();
}
return sb.toString();
}
use of org.bedework.calfacade.ifs.IfInfo in project bw-calendar-engine by Bedework.
the class CalSvc method kill.
@Override
public void kill(final IfInfo ifInfo) {
try {
for (final Calintf ci : getCal().active()) {
final IfInfo calIfInfo = ci.getIfInfo();
if (calIfInfo.getId().equals(ifInfo.getId())) {
warn("Stopping interface with id " + ifInfo.getId());
ci.kill();
break;
}
}
} catch (final Throwable t) {
error(t);
}
}