public void run() {
            try {
                if (session != null) {
                    session.destroy();
                }
            } catch (IllegalStateException ise) {
                //ignore this
            }
            try {
                if (access != null) {
                    access.shutdown();
                }
            } catch (IllegalStateException ise) {
                //ignore this too
            }
        }
Example client using visiting

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