i've customized transportclient of elasticsearch and I want to migrate to RestClient
restHighLevelClient.indexAsync(indexRequest, new ActionListener<IndexResponse>() {
@Override
public void onResponse(IndexResponse indexResponse) {
// called when the operation is successfully completed
}
@Override
public void onFailure(Exception e) {
// called on failure
}
});