Class PublisherGrpc.PublisherFutureStub (1.125.9)

public static final class PublisherGrpc.PublisherFutureStub extends AbstractFutureStub<PublisherGrpc.PublisherFutureStub>

A stub to allow clients to do ListenableFuture-style rpc calls to service Publisher.

The service that an application uses to manipulate topics, and to send messages to a topic.

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractFutureStub > PublisherGrpc.PublisherFutureStub

Methods

build(Channel channel, CallOptions callOptions)

protected PublisherGrpc.PublisherFutureStub build(Channel channel, CallOptions callOptions)
Parameters
NameDescription
channelio.grpc.Channel
callOptionsio.grpc.CallOptions
Returns
TypeDescription
PublisherGrpc.PublisherFutureStub
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

createTopic(Topic request)

public ListenableFuture<Topic> createTopic(Topic request)

Creates the given topic with the given name. See the resource name rules.

Parameter
NameDescription
requestTopic
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<Topic>

deleteTopic(DeleteTopicRequest request)

public ListenableFuture<Empty> deleteTopic(DeleteTopicRequest request)

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.

Parameter
NameDescription
requestDeleteTopicRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<Empty>

detachSubscription(DetachSubscriptionRequest request)

public ListenableFuture<DetachSubscriptionResponse> detachSubscription(DetachSubscriptionRequest request)

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.

Parameter
NameDescription
requestDetachSubscriptionRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<DetachSubscriptionResponse>

getTopic(GetTopicRequest request)

public ListenableFuture<Topic> getTopic(GetTopicRequest request)

Gets the configuration of a topic.

Parameter
NameDescription
requestGetTopicRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<Topic>

listTopicSnapshots(ListTopicSnapshotsRequest request)

public ListenableFuture<ListTopicSnapshotsResponse> listTopicSnapshots(ListTopicSnapshotsRequest request)

Lists the names of the snapshots on this topic. Snapshots are used in Seek 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.

Parameter
NameDescription
requestListTopicSnapshotsRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<ListTopicSnapshotsResponse>

listTopicSubscriptions(ListTopicSubscriptionsRequest request)

public ListenableFuture<ListTopicSubscriptionsResponse> listTopicSubscriptions(ListTopicSubscriptionsRequest request)

Lists the names of the attached subscriptions on this topic.

Parameter
NameDescription
requestListTopicSubscriptionsRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<ListTopicSubscriptionsResponse>

listTopics(ListTopicsRequest request)

public ListenableFuture<ListTopicsResponse> listTopics(ListTopicsRequest request)

Lists matching topics.

Parameter
NameDescription
requestListTopicsRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<ListTopicsResponse>

publish(PublishRequest request)

public ListenableFuture<PublishResponse> publish(PublishRequest request)

Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist.

Parameter
NameDescription
requestPublishRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<PublishResponse>

updateTopic(UpdateTopicRequest request)

public ListenableFuture<Topic> updateTopic(UpdateTopicRequest request)

Updates an existing topic. Note that certain properties of a topic are not modifiable.

Parameter
NameDescription
requestUpdateTopicRequest
Returns
TypeDescription
com.google.common.util.concurrent.ListenableFuture<Topic>