Search in sources :

Example 1 with IfInfo

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();
}
Also used : IfInfo(org.bedework.calfacade.ifs.IfInfo)

Example 2 with IfInfo

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);
    }
}
Also used : IfInfo(org.bedework.calfacade.ifs.IfInfo) Calintf(org.bedework.calcorei.Calintf)

Aggregations

IfInfo (org.bedework.calfacade.ifs.IfInfo)2 Calintf (org.bedework.calcorei.Calintf)1