public static final class PushConfig.Builder extends Object
PushConfig objects.| Modifier and Type | Method and Description |
|---|---|
PushConfig.Builder |
addAttribute(String name,
String value)
Adds an API-supported attribute that can be used to control different aspects of the message
delivery.
|
PushConfig.Builder |
attributes(Map<String,String> attributes)
Sets the API-supported attributes that can be used to control different aspects of the
message delivery.
|
PushConfig |
build()
Creates a
PushConfig object. |
PushConfig.Builder |
clearAttributes()
Clears all API-supported attributes.
|
PushConfig.Builder |
endpoint(String endpoint)
Sets the URL locating the endpoint to which messages should be pushed.
|
PushConfig.Builder |
removeAttribute(String name)
Removes an API-supported attribute.
|
public PushConfig.Builder endpoint(String endpoint)
https://example.com/push.public PushConfig.Builder addAttribute(String name, String value)
The currently supported attribute is x-goog-version, which can be used to change
the format of the push message. This attribute indicates the version of the data expected by
the endpoint. The endpoint version is based on the version of the Pub/Sub API. Possible
values for this attribute are:
v1beta1: uses the push format defined in the v1beta1 Pub/Sub API
v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API
If the x-goog-version attribute is not present when a subscription is created (see
PubSub.create(SubscriptionInfo) and PubSub.createAsync(SubscriptionInfo)), it
will default to v1. If it is not present when modifying the push config (see
PubSub.replacePushConfig(String, PushConfig) and
PubSub.replacePushConfigAsync(String, PushConfig)), its value will not be changed.
public PushConfig.Builder attributes(Map<String,String> attributes)
The currently supported attribute is x-goog-version, which can be used to change
the format of the push message. This attribute indicates the version of the data expected by
the endpoint. The endpoint version is based on the version of the Pub/Sub API. Possible
values for this attribute are:
v1beta1: uses the push format defined in the v1beta1 Pub/Sub API
v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API
If the x-goog-version attribute is not present when a subscription is created (see
PubSub.create(SubscriptionInfo) and PubSub.createAsync(SubscriptionInfo)), it
will default to v1. If it is not present when modifying the push config (see
PubSub.replacePushConfig(String, PushConfig) and
PubSub.replacePushConfigAsync(String, PushConfig)), its value will not be changed.
public PushConfig.Builder removeAttribute(String name)
public PushConfig.Builder clearAttributes()
public PushConfig build()
PushConfig object.Copyright © 2016 Google. All rights reserved.