Class PublisherServiceGrpc.PublisherServiceStub (1.13.8)

public static final class PublisherServiceGrpc.PublisherServiceStub extends AbstractAsyncStub<PublisherServiceGrpc.PublisherServiceStub>

A stub to allow clients to do asynchronous rpc calls to service PublisherService.

The service that a publisher client application uses to publish messages to topics. Published messages are retained by the service for the duration of the retention period configured for the respective topic, and are delivered to subscriber clients upon request (via the SubscriberService).

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractAsyncStub > PublisherServiceGrpc.PublisherServiceStub

Methods

build(Channel channel, CallOptions callOptions)

protected PublisherServiceGrpc.PublisherServiceStub build(Channel channel, CallOptions callOptions)
Parameters
Name Description
channel io.grpc.Channel
callOptions io.grpc.CallOptions
Returns
Type Description
PublisherServiceGrpc.PublisherServiceStub
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

publish(StreamObserver<PublishResponse> responseObserver)

public StreamObserver<PublishRequest> publish(StreamObserver<PublishResponse> responseObserver)

Establishes a stream with the server for publishing messages. Once the stream is initialized, the client publishes messages by sending publish requests on the stream. The server responds with a PublishResponse for each PublishRequest sent by the client, in the same order that the requests were sent. Note that multiple PublishRequests can be in flight simultaneously, but they will be processed by the server in the order that they are sent by the client on a given stream.

Parameter
Name Description
responseObserver io.grpc.stub.StreamObserver<PublishResponse>
Returns
Type Description
io.grpc.stub.StreamObserver<PublishRequest>