@Test public void testNotReachableWrongHostname() { final Reachability r = new DefaultInetAddressReachability(); assertFalse(r.isReachable( new Host(new TestProtocol(), "iterate.ch.f", 22) )); }
@Override public boolean isReachable(final Host host) { try { return InetAddress.getByName(host.getHostname()).isReachable( preferences.getInteger("connection.timeout.seconds") * 1000 ); } catch(IOException e) { return false; } }
DefaultInetAddressReachability implements Reachability { @Override public boolean isReachable(final Host host) { try { return InetAddress.getByName(host.getHostname()).isReachable( preferences.getInteger("connection.timeout.seconds") * 1000 ); } catch(IOException e) { return false; } } }
DefaultInetAddressReachability implements Reachability { @Override public boolean isReachable(final Host host) { try { return InetAddress.getByName(host.getHostname()).isReachable( preferences.getInteger("connection.timeout.seconds") * 1000 ); } catch(IOException e) { return false; } }  }
DefaultInetAddressReachability implements Reachability { @Override public boolean isReachable(final Host host) { try { return InetAddress.getByName(host.getHostname()).isReachable( preferences.getInteger("connection.timeout.seconds") * 1000 ); } catch(IOException e) { return false; } }  @Override boolean isReachable(final Host host); @Override void diagnose(final Host host); @Override Monitor monitor(final Host host, final Callback callback); }
DefaultInetAddressReachability implements Reachability { @Override public boolean isReachable(final Host host) { try { return InetAddress.getByName(host.getHostname()).isReachable( preferences.getInteger("connection.timeout.seconds") * 1000 ); } catch(IOException e) { return false; } }  @Override boolean isReachable(final Host host); @Override void diagnose(final Host host); @Override Monitor monitor(final Host host, final Callback callback);  }