target.apidocs.com.google.api.services.pubsub.model.ReceivedMessage.html Maven / Gradle / Ivy
ReceivedMessage (Cloud Pub/Sub API v1-rev20240607-2.0.0)
com.google.api.services.pubsub.model
Class ReceivedMessage
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.pubsub.model.ReceivedMessage
-
public final class ReceivedMessage
extends com.google.api.client.json.GenericJson
A message and its corresponding acknowledgment ID.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Cloud Pub/Sub API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
ReceivedMessage()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
ReceivedMessage
clone()
String
getAckId()
Optional.
Integer
getDeliveryAttempt()
Optional.
PubsubMessage
getMessage()
Optional.
ReceivedMessage
set(String fieldName,
Object value)
ReceivedMessage
setAckId(String ackId)
Optional.
ReceivedMessage
setDeliveryAttempt(Integer deliveryAttempt)
Optional.
ReceivedMessage
setMessage(PubsubMessage message)
Optional.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getAckId
public String getAckId()
Optional. This ID can be used to acknowledge the received message.
- Returns:
- value or
null
for none
-
setAckId
public ReceivedMessage setAckId(String ackId)
Optional. This ID can be used to acknowledge the received message.
- Parameters:
ackId
- ackId or null
for none
-
getDeliveryAttempt
public Integer getDeliveryAttempt()
Optional. The approximate number of times that Pub/Sub has attempted to deliver the associated
message to a subscriber. More precisely, this is 1 + (number of NACKs) + (number of
ack_deadline exceeds) for this message. A NACK is any call to ModifyAckDeadline with a 0
deadline. An ack_deadline exceeds event is whenever a message is not acknowledged within
ack_deadline. Note that ack_deadline is initially Subscription.ackDeadlineSeconds, but may get
extended automatically by the client library. Upon the first delivery of a given message,
`delivery_attempt` will have a value of 1. The value is calculated at best effort and is
approximate. If a DeadLetterPolicy is not set on the subscription, this will be 0.
- Returns:
- value or
null
for none
-
setDeliveryAttempt
public ReceivedMessage setDeliveryAttempt(Integer deliveryAttempt)
Optional. The approximate number of times that Pub/Sub has attempted to deliver the associated
message to a subscriber. More precisely, this is 1 + (number of NACKs) + (number of
ack_deadline exceeds) for this message. A NACK is any call to ModifyAckDeadline with a 0
deadline. An ack_deadline exceeds event is whenever a message is not acknowledged within
ack_deadline. Note that ack_deadline is initially Subscription.ackDeadlineSeconds, but may get
extended automatically by the client library. Upon the first delivery of a given message,
`delivery_attempt` will have a value of 1. The value is calculated at best effort and is
approximate. If a DeadLetterPolicy is not set on the subscription, this will be 0.
- Parameters:
deliveryAttempt
- deliveryAttempt or null
for none
-
getMessage
public PubsubMessage getMessage()
Optional. The message.
- Returns:
- value or
null
for none
-
setMessage
public ReceivedMessage setMessage(PubsubMessage message)
Optional. The message.
- Parameters:
message
- message or null
for none
-
set
public ReceivedMessage set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public ReceivedMessage clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy