Check that connections are connected *and* open, since it is possible to be either and both

Use Class.getName() to get readable declarations for anon classes