use of io.knotx.reactivex.proxy.AdapterProxy in project knotx by Cognifide.
the class HttpServiceAdapterProxyTest method callAdapterServiceWithAssertions.
private void callAdapterServiceWithAssertions(TestContext context, String servicePath, Action1<AdapterResponse> onSuccess, Consumer<Throwable> onError) {
AdapterRequest message = payloadMessage(servicePath);
Async async = context.async();
AdapterProxy service = AdapterProxy.createProxy(new Vertx(vertx.vertx()), ADAPTER_ADDRESS);
service.rxProcess(message).doOnSuccess(onSuccess::call).subscribe(success -> async.complete(), onError);
}
use of io.knotx.reactivex.proxy.AdapterProxy in project knotx by Cognifide.
the class ActionKnotProxyImpl method callActionAdapter.
private Single<AdapterResponse> callActionAdapter(KnotContext knotContext, FormEntity current) {
LOGGER.trace("Process form for {} ", knotContext);
AdapterProxy adapter = AdapterProxy.createProxyWithOptions(vertx, current.adapter().getAddress(), configuration.getDeliveryOptions());
return adapter.rxProcess(prepareAdapterRequest(knotContext, current));
}
Aggregations