How will High level rest client async calls return value

I am using the high level rest client and calling:

client.indexAsync(request, new ActionListener() {
public void onResponse(IndexResponse indexResponse) {
}
public void onFailure(Exception e) {
}
}

I want to convert the response to RxJava observable and give it back to the controller. But indexAsync does not have a return. Could someone please help me out?

Hi,
the response is returned via the ActionListener, the way to get it is to create your own ActionListener and pass it in to your indexAsync call. Why would you need a return value and what type would it be?

Cheers
Luca

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.