/** * Asynchronously sends a message to multiple servers, potentially multiple times, registering a * listener to receive a callback on success or exception. Multiple asynchronous lookups can be * performed in parallel. Since the callback may be invoked before the function returns, external * synchronization is necessary. * * @param query The query to send * @param listener The object containing the callbacks. * @return An identifier, which is also a parameter in the callback */ public Object sendAsync(final Message query, final ResolverListener listener) { Resolution res = new Resolution(this, query); res.startAsync(listener); return res; }