Package org.kie.server.client.jms
Interface ResponseCallback
-
- All Known Implementing Classes:
BlockingResponseCallback
public interface ResponseCallback
Receives callbacks upon received response from the server. Used with ASYNC_REPLY_PATTERN to allow processing of further work before receiving response.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.kie.server.api.model.ServiceResponsesList
get()
Returns received value if any.<T> T
get(Class<T> type)
Returns deserialized version of the response - it's taken from ServiceResponseList.getResponses().get(0).getResult().void
onResponse(String selector, org.kie.server.api.model.ServiceResponsesList response)
Invoked by async message listener when response was received that matches given selector
-
-
-
Method Detail
-
onResponse
void onResponse(String selector, org.kie.server.api.model.ServiceResponsesList response)
Invoked by async message listener when response was received that matches given selector- Parameters:
selector
- message selector used to filter messagesresponse
- actual (unmarshalled) response received from the server.
-
get
org.kie.server.api.model.ServiceResponsesList get()
Returns received value if any. It's up to implementation to either block while waiting for the response or return directly with null in case there is no response available- Returns:
- returns message received from the server, if exists
-
get
<T> T get(Class<T> type)
Returns deserialized version of the response - it's taken from ServiceResponseList.getResponses().get(0).getResult(). It attempts to provide as much as possible smooth usage as it would be directly via *ServiceClient- Type Parameters:
T
- actual type expected- Parameters:
type
- class type of expected result- Returns:
-
-