1 // Copyright (c) 1999-2004 Brian Wellington (bwelling (at) xbill.org) 2 3 package org.xbill.DNS; 4 5 import java.util.EventListener; 6 7 /** 8 * An interface to the asynchronous resolver. 9 * @see Resolver 10 * 11 * @author Brian Wellington 12 */ 13 14 public interface ResolverListener extends EventListener { 15 16 /** 17 * The callback used by an asynchronous resolver 18 * @param id The identifier returned by Resolver.sendAsync() 19 * @param m The response message as returned by the Resolver 20 */ 21 void receiveMessage(Object id, Message m); 22 23 /** 24 * The callback used by an asynchronous resolver when an exception is thrown 25 * @param id The identifier returned by Resolver.sendAsync() 26 * @param e The thrown exception 27 */ 28 void handleException(Object id, Exception e); 29 30 } 31