public interface ResponseCallback extends MessageCallback
Response messages.
Response callbacks are typically used when invoking a service asynchronously.
The following is a simple example of using a response callback with an asynchronous service invocation:
ResponseCallback myResponseCallback =
response -> System.out.println("Received response! " + response.getServiceId());
Request req = new Request("/testservice/testrequesttopic");
client.asyncRequest(req, myResponseCallback);
| Modifier and Type | Method and Description |
|---|---|
void |
onResponse(Response response)
Invoked when a
Response has been received. |