public interface AdminClient extends ApiBackgroundResource
| Modifier and Type | Method and Description |
|---|---|
static AdminClient |
create(AdminClientSettings settings) |
com.google.api.core.ApiFuture<Subscription> |
createSubscription(Subscription subscription)
Create the provided subscription if it does not yet exist.
|
com.google.api.core.ApiFuture<Topic> |
createTopic(Topic topic)
Create the provided topic if it does not yet exist.
|
com.google.api.core.ApiFuture<Void> |
deleteSubscription(SubscriptionPath path)
Delete the subscription with id
id if it exists. |
com.google.api.core.ApiFuture<Void> |
deleteTopic(TopicPath path)
Delete the topic with id
id if it exists. |
com.google.api.core.ApiFuture<Subscription> |
getSubscription(SubscriptionPath path)
Get the subscription with id
id if it exists. |
com.google.api.core.ApiFuture<Topic> |
getTopic(TopicPath path)
Get the topic with id
id if it exists. |
com.google.api.core.ApiFuture<Long> |
getTopicPartitionCount(TopicPath path)
Get the partitioning info for the topic with id
id if it exists. |
com.google.api.core.ApiFuture<List<Subscription>> |
listSubscriptions(LocationPath path)
List all subscriptions for the specified project.
|
com.google.api.core.ApiFuture<List<Topic>> |
listTopics(LocationPath path)
List all topics for the specified project.
|
com.google.api.core.ApiFuture<List<SubscriptionPath>> |
listTopicSubscriptions(TopicPath path)
Get the list of subscriptions for the topic with id
id if it exists. |
CloudRegion |
region()
The Google Cloud region this client operates on.
|
com.google.api.core.ApiFuture<Subscription> |
updateSubscription(Subscription subscription,
com.google.protobuf.FieldMask mask)
Update the subscription with path
subscription.getPath() if it exists. |
com.google.api.core.ApiFuture<Topic> |
updateTopic(Topic topic,
com.google.protobuf.FieldMask mask)
Update the topic with path
topic.getPath() if it exists. |
closestatic AdminClient create(AdminClientSettings settings) throws io.grpc.StatusException
io.grpc.StatusExceptionCloudRegion region()
com.google.api.core.ApiFuture<Topic> createTopic(Topic topic)
topic - The topic to create.StatusException or the topic on
success.com.google.api.core.ApiFuture<Topic> getTopic(TopicPath path)
id if it exists.path - The path of the topic to retrieve.StatusException or the topic on
success.com.google.api.core.ApiFuture<Long> getTopicPartitionCount(TopicPath path)
id if it exists.path - The path of the topic to retrieve.StatusException or the number
of topic partitions on success.com.google.api.core.ApiFuture<List<Topic>> listTopics(LocationPath path)
path - The path of the project to list topics for.StatusException or the list of
topic paths on success.com.google.api.core.ApiFuture<Topic> updateTopic(Topic topic, com.google.protobuf.FieldMask mask)
topic.getPath() if it exists.topic - The topic to update.mask - The mask indicating which fields should be updated.StatusException or the
resulting topic on success. Updating nonexistent topics will cause the future to have an
exception with status Status.Code.NOT_FOUNDcom.google.api.core.ApiFuture<Void> deleteTopic(TopicPath path)
id if it exists.path - The path of the topic to retrieve.StatusException or void on
success. Deleting nonexistent topics will cause the future to have an exception with status
Status.Code.NOT_FOUNDcom.google.api.core.ApiFuture<List<SubscriptionPath>> listTopicSubscriptions(TopicPath path)
id if it exists.path - The path of the topic to retrieve.StatusException or the list of
subscriptions on success.com.google.api.core.ApiFuture<Subscription> createSubscription(Subscription subscription)
subscription - The subscription to create.StatusException or the
subscription on success.com.google.api.core.ApiFuture<Subscription> getSubscription(SubscriptionPath path)
id if it exists.path - The path of the subscription to retrieve.StatusException or the
subscription on success.com.google.api.core.ApiFuture<List<Subscription>> listSubscriptions(LocationPath path)
path - The path of the project to list subscriptions for.StatusException or the list of
subscription paths on success.com.google.api.core.ApiFuture<Subscription> updateSubscription(Subscription subscription, com.google.protobuf.FieldMask mask)
subscription.getPath() if it exists.subscription - The subscription to update.mask - The mask indicating which fields should be updated.StatusException or the
resulting subscription on success. Updating nonexistent subscriptions will cause the future
to have an exception with status Status.Code.NOT_FOUNDcom.google.api.core.ApiFuture<Void> deleteSubscription(SubscriptionPath path)
id if it exists.path - The path of the subscription to retrieve.StatusException or void on
success. Deleting nonexistent subscriptions will cause the future to have an exception with
status Status.Code.NOT_FOUNDCopyright © 2020 Google LLC. All rights reserved.