// Watcher Object is need in log object to give a simple way to say if a running office is alive.
// As long as a log comes, it pings the Watcher and says the office is alive, if not an
// internal counter increase and at a given point (300 seconds) the office is killed.
GlobalLogWriter.get().println("Set office watcher");
OfficeWatcher aWatcher = (OfficeWatcher)param.get("Watcher");
GlobalLogWriter.get().setWatcher(aWatcher);
// initializeWatcher(param);
String sStatusRunThrough = "";
String sStatusMessage = "";
try
{
DB.destination_start();
// better was:
// load document
// create postscript from document
// check file
GraphicalDifferenceCheck.checkOneFile(_sInputFile, _sOutputPath, _sReferencePath, _sDiffPath, aGTA);
sStatusRunThrough = "PASSED, OK";
DB.destination_finished();
}
catch(ConvWatchCancelException e)
{
assure(e.getMessage(), false, true);
sStatusRunThrough = "CANCELLED, FAILED";
sStatusMessage = e.getMessage();
DB.destination_failed(sStatusRunThrough, sStatusMessage);
}
catch(ConvWatchException e)
{
assure(e.getMessage(), false, true);
sStatusMessage = e.getMessage();
sStatusRunThrough = "PASSED, FAILED";
DB.destination_failed(sStatusRunThrough, sStatusMessage);
}
catch(com.sun.star.lang.DisposedException e)
{
assure(e.getMessage(), false, true);
sStatusMessage = e.getMessage();
sStatusRunThrough = "FAILED, FAILED";
DB.destination_failed(sStatusRunThrough, sStatusMessage);
}
GlobalLogWriter.get().println("Watcher count is: " + aWatcher.getPing());
// Office shutdown
if (aProvider != null)
{
aProvider.closeExistingOffice(param, true);