| 1 |
package org.astrogrid.samp.client; |
| 2 |
|
| 3 |
import org.astrogrid.samp.Client; |
| 4 |
import org.astrogrid.samp.Response; |
| 5 |
|
| 6 |
/** |
| 7 |
* Interface which consumes call responses. |
| 8 |
* |
| 9 |
* @author Mark Taylor |
| 10 |
* @since 12 Nov 2008 |
| 11 |
*/ |
| 12 |
public interface ResultHandler { |
| 13 |
|
| 14 |
/** |
| 15 |
* Called when a response is received from a client to which the message |
| 16 |
* was sent. |
| 17 |
* |
| 18 |
* @param responder responder client |
| 19 |
* @param response content of response |
| 20 |
*/ |
| 21 |
public void result( Client responder, Response response ); |
| 22 |
|
| 23 |
/** |
| 24 |
* Called when no more {@link #result} invocations will be made, |
| 25 |
* either because all have been received or for some other reason, |
| 26 |
* such as a timeout or the hub shutting down. |
| 27 |
*/ |
| 28 |
public void done(); |
| 29 |
} |