use of org.openntf.domino.xots.ScheduleData in project org.openntf.domino by OpenNTF.
the class XotsNsfScanner method scan.
/**
* Scans all databases on the specified server
*/
public List<ScheduleData> scan() {
// Returns a XotsSessionType.NATIVE
Session session = Factory.getSession(SessionType.CURRENT);
DbDirectory dir = session.getDbDirectory(getServerName());
dir.setDirectoryType(DbDirectory.Type.DATABASE);
List<Future<List<ScheduleData>>> futures = new ArrayList<Future<List<ScheduleData>>>();
for (Database db : dir) {
try {
Future<List<ScheduleData>> future = scanDatabase(db);
if (future != null) {
futures.add(future);
}
} catch (Throwable t) {
t.printStackTrace();
}
}
List<ScheduleData> ret = new ArrayList<ScheduleData>();
for (Future<List<ScheduleData>> future : futures) {
try {
ret.addAll(future.get());
} catch (Exception e) {
// exceptions should already been logged
}
}
setChanged();
notifyObservers(null);
return ret;
}
Aggregations