Package com.google.pubsub.v1
Class PublisherGrpc.PublisherStub
java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractAsyncStub<PublisherGrpc.PublisherStub>
com.google.pubsub.v1.PublisherGrpc.PublisherStub
- Enclosing class:
- PublisherGrpc
public static final class PublisherGrpc.PublisherStub
extends io.grpc.stub.AbstractAsyncStub<PublisherGrpc.PublisherStub>
A stub to allow clients to do asynchronous rpc calls to service Publisher.
The service that an application uses to manipulate topics, and to send messages to a topic.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>> -
Method Summary
Modifier and TypeMethodDescriptionprotected PublisherGrpc.PublisherStubbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions) voidcreateTopic(Topic request, io.grpc.stub.StreamObserver<Topic> responseObserver) Creates the given topic with the given name.voiddeleteTopic(DeleteTopicRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) Deletes the topic with the given name.voiddetachSubscription(DetachSubscriptionRequest request, io.grpc.stub.StreamObserver<DetachSubscriptionResponse> responseObserver) Detaches a subscription from this topic.voidgetTopic(GetTopicRequest request, io.grpc.stub.StreamObserver<Topic> responseObserver) Gets the configuration of a topic.voidlistTopics(ListTopicsRequest request, io.grpc.stub.StreamObserver<ListTopicsResponse> responseObserver) Lists matching topics.voidlistTopicSnapshots(ListTopicSnapshotsRequest request, io.grpc.stub.StreamObserver<ListTopicSnapshotsResponse> responseObserver) Lists the names of the snapshots on this topic.voidlistTopicSubscriptions(ListTopicSubscriptionsRequest request, io.grpc.stub.StreamObserver<ListTopicSubscriptionsResponse> responseObserver) Lists the names of the attached subscriptions on this topic.voidpublish(PublishRequest request, io.grpc.stub.StreamObserver<PublishResponse> responseObserver) Adds one or more messages to the topic.voidupdateTopic(UpdateTopicRequest request, io.grpc.stub.StreamObserver<Topic> responseObserver) Updates an existing topic.Methods inherited from class io.grpc.stub.AbstractAsyncStub
newStub, newStubMethods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOption, withWaitForReady
-
Method Details
-
build
protected PublisherGrpc.PublisherStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) - Specified by:
buildin classio.grpc.stub.AbstractStub<PublisherGrpc.PublisherStub>
-
createTopic
Creates the given topic with the given name. See the [resource name rules] (https://cloud.google.com/pubsub/docs/admin#resource_names).
-
updateTopic
public void updateTopic(UpdateTopicRequest request, io.grpc.stub.StreamObserver<Topic> responseObserver) Updates an existing topic. Note that certain properties of a topic are not modifiable.
-
publish
public void publish(PublishRequest request, io.grpc.stub.StreamObserver<PublishResponse> responseObserver) Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist.
-
getTopic
Gets the configuration of a topic.
-
listTopics
public void listTopics(ListTopicsRequest request, io.grpc.stub.StreamObserver<ListTopicsResponse> responseObserver) Lists matching topics.
-
listTopicSubscriptions
public void listTopicSubscriptions(ListTopicSubscriptionsRequest request, io.grpc.stub.StreamObserver<ListTopicSubscriptionsResponse> responseObserver) Lists the names of the attached subscriptions on this topic.
-
listTopicSnapshots
public void listTopicSnapshots(ListTopicSnapshotsRequest request, io.grpc.stub.StreamObserver<ListTopicSnapshotsResponse> responseObserver) Lists the names of the snapshots on this topic. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.
-
deleteTopic
public void deleteTopic(DeleteTopicRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`.
-
detachSubscription
public void detachSubscription(DetachSubscriptionRequest request, io.grpc.stub.StreamObserver<DetachSubscriptionResponse> responseObserver) Detaches a subscription from this topic. All messages retained in the subscription are dropped. Subsequent `Pull` and `StreamingPull` requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will stop.
-