code: public static InetAddressResolver listenFor(String host,
                                                  InetAddressListener listener) {
          synchronized (cResolvers) {
              InetAddressResolver resolver = 
                  (InetAddressResolver)cResolvers.get(host);
              if (resolver == null) {
                  resolver = new InetAddressResolver(host);
                  cResolvers.put(host, resolver);
              }
              resolver.addListener(listener);
              return resolver;
          }
      }
docs: Resolve the host name into InetAddresses and listen for changes.
  The caller must save a reference to the resolver to prevent it from
  being reclaimed by the garbage collector.
  
  @param host host to resolve into InetAddresses
  @param listener listens for InetAddresses