public abstract class AbstractNotification
Beta
Notification metadata sent to this client about a watched resource.
Implementation is not thread-safe.
Constructors
AbstractNotification(AbstractNotification source)
protected AbstractNotification(AbstractNotification source)
Copy constructor based on a source notification object.
Name | Description |
source | AbstractNotification |
AbstractNotification(long messageNumber, String resourceState, String resourceId, String resourceUri, String channelId)
protected AbstractNotification(long messageNumber, String resourceState, String resourceId, String resourceUri, String channelId)
Name | Description |
messageNumber | long message number (a monotonically increasing value starting with 1) |
resourceState | String resource state |
resourceId | String opaque ID for the watched resource that is stable across API versions |
resourceUri | String opaque ID (in the form of a canonicalized URI) for the watched resource that is sensitive to the API version |
channelId | String notification channel UUID provided by the client in the watch request |
Methods
getChanged()
public final String getChanged()
Returns the type of change performed on the resource or null
for none.
Type | Description |
String |
getChannelExpiration()
public final String getChannelExpiration()
Returns the notification channel expiration time or null
for none.
Type | Description |
String |
getChannelId()
public final String getChannelId()
Returns the notification channel UUID provided by the client in the watch request.
Type | Description |
String |
getChannelToken()
public final String getChannelToken()
Returns the notification channel token (an opaque string) provided by the client in the watch
request or null
for none.
Type | Description |
String |
getMessageNumber()
public final long getMessageNumber()
Returns the message number (a monotonically increasing value starting with 1).
Type | Description |
long |
getResourceId()
public final String getResourceId()
Returns the opaque ID for the watched resource that is stable across API versions.
Type | Description |
String |
getResourceState()
public final String getResourceState()
Returns the resource state.
Type | Description |
String |
getResourceUri()
public final String getResourceUri()
Returns the opaque ID (in the form of a canonicalized URI) for the watched resource that is sensitive to the API version.
Type | Description |
String |
setChanged(String changed)
public AbstractNotification setChanged(String changed)
Sets the type of change performed on the resource or null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
changed | String |
Type | Description |
AbstractNotification |
setChannelExpiration(String channelExpiration)
public AbstractNotification setChannelExpiration(String channelExpiration)
Sets the notification channel expiration time or null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
channelExpiration | String |
Type | Description |
AbstractNotification |
setChannelId(String channelId)
public AbstractNotification setChannelId(String channelId)
Sets the notification channel UUID provided by the client in the watch request.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
channelId | String |
Type | Description |
AbstractNotification |
setChannelToken(String channelToken)
public AbstractNotification setChannelToken(String channelToken)
Sets the notification channel token (an opaque string) provided by the client in the watch
request or null
for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
channelToken | String |
Type | Description |
AbstractNotification |
setMessageNumber(long messageNumber)
public AbstractNotification setMessageNumber(long messageNumber)
Sets the message number (a monotonically increasing value starting with 1).
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
messageNumber | long |
Type | Description |
AbstractNotification |
setResourceId(String resourceId)
public AbstractNotification setResourceId(String resourceId)
Sets the opaque ID for the watched resource that is stable across API versions.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
resourceId | String |
Type | Description |
AbstractNotification |
setResourceState(String resourceState)
public AbstractNotification setResourceState(String resourceState)
Sets the resource state.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
resourceState | String |
Type | Description |
AbstractNotification |
setResourceUri(String resourceUri)
public AbstractNotification setResourceUri(String resourceUri)
Sets the opaque ID (in the form of a canonicalized URI) for the watched resource that is sensitive to the API version.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
resourceUri | String |
Type | Description |
AbstractNotification |
toString()
public String toString()
Type | Description |
String |
toStringHelper()
protected Objects.ToStringHelper toStringHelper()
Returns the helper for #toString().
Type | Description |
com.google.api.client.util.Objects.ToStringHelper |