The Hogs codebase is available in two packages (each distributed in a jar file).
The first and most obvious of these is hogsfull.jar, which contains all
code necessary to run Hogs. This includes:
The last of these (the Hogs tools) can be downloaded in a separate package,
called hogsconn.jar. It includes classes useful for browsing and
pinging remote servers. Their use should be fairly evident from the Javadocs,
but here's an example:
import hogs.tools.*;
public class ExternalHogsBrowser {
public static void main(String[] args) {
// look for servers 3h, 2d, and 4c (these are hostnames).
Browse br = new Browse(new String[]{"3h", "2d", "4c"});
br.queryAll();
// either insert some code here to wait for the pinging to
// finish, or use a handler (see Browse javadocs).
for(Browse.Host h : br.getHosts()) {
System.out.println(h.hostname);
}
}
}
To use this code, make sure the hogsconn.jar is on your classpath at
compile-time as well as run-time.