// in this test program, we will stop in this situation. The real
// connector manager might wait for a while, then try again
return;
}
DocPusher push = null;
try {
push = new DocPusher(new GsaFeedConnection(null, "gogol", 19900, -1),
"dctm", new FileSizeLimitInfo(), new DocumentFilterChain());
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
int counter = 0;
while (true) {
counter = 0;
Document pm = null;
while ((pm = documentList.nextDocument()) != null) {
System.out.println("pm change");
counter++;
if (counter == batchHint) {
System.out.println("counter == batchhint !!!!");
// this test program only takes batchHint results from each
// resultSet. The real connector manager may take fewer -
// for example, if it receives a shutdown request
break;
}
int k = pm.getPropertyNames().size();
System.out.println("counter " + counter + ", num properties " + k);
System.out.println(pm.findProperty(
SpiConstants.PROPNAME_DISPLAYURL).nextValue());
push.take(pm);
}
String checkpoint = "";
if (counter != 0) {
System.out.println("appel checkpoint");
checkpoint = documentList.checkpoint();