Package com.daml.grpc.adapter.client.rs
Class ClientPublisher<Req,Resp>
- java.lang.Object
-
- com.daml.grpc.adapter.client.rs.ClientPublisher<Req,Resp>
-
- Type Parameters:
Req
- The request type of gRPC call.Resp
- The response type of the gRPC call.
- All Implemented Interfaces:
org.reactivestreams.Publisher<Resp>
public class ClientPublisher<Req,Resp> extends java.lang.Object implements org.reactivestreams.Publisher<Resp>
RS-gRPC bridge component for server streaming. Defers execution of the RPC call until a subscription is made. Supports multiple subscribers. Each subscription will trigger executing the same RPC call.
-
-
Constructor Summary
Constructors Constructor Description ClientPublisher(Req request, java.util.function.BiConsumer<Req,io.grpc.stub.StreamObserver<Resp>> clientStub, ExecutionSequencerFactory esf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
subscribe(org.reactivestreams.Subscriber<? super Resp> subscriber)
Executes the RPC call right away and feeds its results to the subscriber on demand.
-
-
-
Constructor Detail
-
ClientPublisher
public ClientPublisher(@Nonnull Req request, @Nonnull java.util.function.BiConsumer<Req,io.grpc.stub.StreamObserver<Resp>> clientStub, @Nonnull ExecutionSequencerFactory esf)
-
-