public class BlockingResponseCallback extends Object implements ResponseCallback
Constructor and Description |
---|
BlockingResponseCallback(org.kie.server.api.marshalling.Marshaller marshaller) |
BlockingResponseCallback(org.kie.server.api.marshalling.Marshaller marshaller,
int queueSize) |
Modifier and Type | Method and 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
|
public BlockingResponseCallback(org.kie.server.api.marshalling.Marshaller marshaller)
public BlockingResponseCallback(org.kie.server.api.marshalling.Marshaller marshaller, int queueSize)
public void onResponse(String selector, org.kie.server.api.model.ServiceResponsesList response)
ResponseCallback
onResponse
in interface ResponseCallback
selector
- message selector used to filter messagesresponse
- actual (unmarshalled) response received from the server.public org.kie.server.api.model.ServiceResponsesList get()
ResponseCallback
get
in interface ResponseCallback
public <T> T get(Class<T> type)
ResponseCallback
get
in interface ResponseCallback
T
- actual type expectedtype
- class type of expected resultCopyright © 2001–2018 JBoss by Red Hat. All rights reserved.