public abstract static class SubscriptionInfo.Builder extends Object
SubscriptionInfo objects.| Constructor and Description |
|---|
SubscriptionInfo.Builder() |
| Modifier and Type | Method and Description |
|---|---|
abstract SubscriptionInfo.Builder |
ackDeadLineSeconds(int ackDeadLineSeconds)
Sets the maximum time after a subscriber receives a message before the subscriber should
acknowledge the message.
|
abstract SubscriptionInfo |
build()
Creates a subscription object.
|
abstract SubscriptionInfo.Builder |
name(String name)
Sets the name of the subscription.
|
abstract SubscriptionInfo.Builder |
pushConfig(PushConfig pushConfig)
Sets the push configuration for the subscription.
|
abstract SubscriptionInfo.Builder |
topic(String topic)
Sets the topic the subscription refers to, given the topic name.
|
abstract SubscriptionInfo.Builder |
topic(String project,
String topic)
Sets the topic the subscription refers to, given the project and topic names.
|
abstract SubscriptionInfo.Builder |
topic(TopicId topic)
Sets the topic the subscription refers to, given the topic identity.
|
public abstract SubscriptionInfo.Builder name(String name)
[A-Za-z]), numbers ([0-9]), dashes (-), underscores
(_), periods (.), tildes (~), plus (+) or percent signs
(%). It must be between 3 and 255 characters in length and cannot begin with the
string goog.public abstract SubscriptionInfo.Builder topic(String topic)
ServiceOptions.projectId() project.public abstract SubscriptionInfo.Builder topic(String project, String topic)
public abstract SubscriptionInfo.Builder topic(TopicId topic)
topic.project() is null the topic is assumed to reside in the
ServiceOptions.projectId() project.public abstract SubscriptionInfo.Builder pushConfig(PushConfig pushConfig)
pushConfig parameter provides the push endpoint. If not set, the
subscription will be in pull mode.public abstract SubscriptionInfo.Builder ackDeadLineSeconds(int ackDeadLineSeconds)
PubSub.modifyAckDeadline(String, int, TimeUnit, Iterable). For push
delivery, this value is used to set the request timeout for the call to the push endpoint.
This value must be between 10 and 600 seconds, if not specified, 10 seconds is used.public abstract SubscriptionInfo build()
Copyright © 2016 Google. All rights reserved.