public final class PushConfig extends Object implements Serializable
In a push subscription, the Pub/Sub server sends a request to the subscriber application. A
PushConfig object can be used to configure the application endpoint. The subscriber's
HTTP response serves as an implicit acknowledgement: a success response indicates that the
message has been succesfully processed and the Pub/Sub system can delete it from the
subscription; a non-success response indicates that the Pub/Sub server should resend it
(implicit "nack").
| Modifier and Type | Class and Description |
|---|---|
static class |
PushConfig.Builder
Builder for
PushConfig objects. |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
attributes()
Returns the API-supported attributes that can be used to control different aspects of the
message delivery.
|
static PushConfig.Builder |
builder(String endpoint)
Creates a builder for
PushConfig objects given the push endpoint. |
static PushConfig.Builder |
builder(String endpoint,
Map<String,String> attributes)
Creates a builder for
PushConfig objects given the push endpoint and the API-supported
attributes that can be used to control different aspects of the message delivery. |
String |
endpoint()
Returns the URL locating the endpoint to which messages should be pushed.
|
boolean |
equals(Object obj) |
int |
hashCode() |
static PushConfig |
of(String endpoint)
Creates a
PushConfig object given the push endpoint. |
static PushConfig |
of(String endpoint,
Map<String,String> attributes)
Creates a
PushConfig object given the push endpoint and the API-supported attributes
that can be used to control different aspects of the message delivery. |
PushConfig.Builder |
toBuilder()
Returns a builder for the
PushConfig object. |
String |
toString() |
public String endpoint()
https://example.com/push.public 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 toBuilder()
PushConfig object.public static PushConfig of(String endpoint)
PushConfig object given the push endpoint.endpoint - the URL locating the endpoint to which messages should be pushed. For example,
an endpoint might use https://example.com/push.public static PushConfig of(String endpoint, Map<String,String> attributes)
PushConfig object given the push endpoint and the API-supported attributes
that can be used to control different aspects of the message delivery.endpoint - the URL locating the endpoint to which messages should be pushed. For example,
an endpoint might use https://example.com/push.attributes - API supported attributes used to control message delivery. See
PushConfig.Builder.attributes(Map) for more details.public static PushConfig.Builder builder(String endpoint)
PushConfig objects given the push endpoint.endpoint - the URL locating the endpoint to which messages should be pushed. For example,
an endpoint might use https://example.com/push.public static PushConfig.Builder builder(String endpoint, Map<String,String> attributes)
PushConfig objects given the push endpoint and the API-supported
attributes that can be used to control different aspects of the message delivery.endpoint - the URL locating the endpoint to which messages should be pushed. For example,
an endpoint might use https://example.com/push.attributes - API supported attributes used to control message delivery. See
PushConfig.Builder.attributes(Map) for more details.Copyright © 2016 Google. All rights reserved.