public void disconnected(OfficeConnectionEvent event) { taskExecutor.setAvailable(false); if (stopping) { // expected stopping = false; } else { logger.warning("connection lost unexpectedly; attempting restart"); if (currentTask != null) { currentTask.cancel(true); } managedOfficeProcess.restartDueToLostConnection(); } }
public void connected(OfficeConnectionEvent event) { taskCount = 0; taskExecutor.setAvailable(true); }
public void stop() throws OfficeException { taskExecutor.setAvailable(false); stopping = true; taskExecutor.shutdownNow(); managedOfficeProcess.stopAndWait(); }