public static void main(String args[]) {
        LogSetup.initVespaLogging("vespa-visit-target");
        VdsVisitTarget visitTarget = new VdsVisitTarget();


        try {
            visitTarget.parseArguments(args);
            visitTarget.initShutdownHook();
            visitTarget.run();
            System.exit(0);
        } catch (HelpShownException e) {
            System.exit(0);
        } catch (IllegalArgumentException e) {
            System.err.println(e.getMessage());
            System.exit(1);
        } catch (org.apache.commons.cli.ParseException e) {
            System.err.println("Failed to parse arguments. Try --help for syntax. " + e.getMessage());
            System.exit(1);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
Example client using visiting

@author Einar M R Rosenvinge
vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisitTarget.java