public void onDone(CompletionCode code, String message) {
            // Flush any remaining unwritten progress updates.
            // It is expected that this happens-after any and all calls to onProgress().
            if (progressMeta.unwrittenUpdates > 0) {
                rewriteProgressFile();
            }
            if (lastLineIsProgress) {
                System.err.print('\n');
                lastLineIsProgress = false;
            }
            if (code != CompletionCode.SUCCESS) {
                if (code == CompletionCode.ABORTED) {
                    System.err.println("Visitor aborted: " + message);
                }
                else if (code == CompletionCode.TIMEOUT) {
                    System.err.println("Visitor timed out: " + message);
                }
                else {
                    System.err.println("Visitor aborted due to unknown issue " + code + ": " + message);
                }
            } else {
                if (showProgress) {
                    System.err.println("Completed visiting.");
                }
                if (showStatistics) {
                    System.err.println("*** Visitor statistics");
                    System.err.println(statistics == null ? "Nothing visited" : statistics.toString());
                }
            }
            super.onDone(code, message);
        }
An abstract class that can be subclassed by different visitor handlers.

@author Thomas Gundersen
vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisitHandler.java