T - Java type of the notification content@Beta public class TypedNotification<T> extends AbstractNotification
Beta Implementation is not thread-safe.
| Constructor and Description |
|---|
TypedNotification(long messageNumber,
String resourceState,
String resourceId,
String resourceUri,
String channelId) |
TypedNotification(UnparsedNotification sourceNotification) |
| Modifier and Type | Method and Description |
|---|---|
T |
getContent()
Returns the parsed notification content or
null for none. |
TypedNotification<T> |
setChanged(String changed)
Sets the type of change performed on the resource or
null for none. |
TypedNotification<T> |
setChannelExpiration(String channelExpiration)
Sets the notification channel expiration time or
null for none. |
TypedNotification<T> |
setChannelId(String channelId)
Sets the notification channel UUID provided by the client in the watch request.
|
TypedNotification<T> |
setChannelToken(String channelToken)
Sets the notification channel token (an opaque string) provided by the client in the watch
request or
null for none. |
TypedNotification<T> |
setContent(T content)
Sets the parsed notification content or
null for none. |
TypedNotification<T> |
setMessageNumber(long messageNumber)
Sets the message number (a monotonically increasing value starting with 1).
|
TypedNotification<T> |
setResourceId(String resourceId)
Sets the opaque ID for the watched resource that is stable across API versions.
|
TypedNotification<T> |
setResourceState(String resourceState)
Sets the
resource state. |
TypedNotification<T> |
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.
|
String |
toString() |
getChanged, getChannelExpiration, getChannelId, getChannelToken, getMessageNumber, getResourceId, getResourceState, getResourceUri, toStringHelperpublic TypedNotification(long messageNumber,
String resourceState,
String resourceId,
String resourceUri,
String channelId)
messageNumber - message number (a monotonically increasing value starting with 1)resourceState - resource stateresourceId - opaque ID for the watched resource that is stable across API versionsresourceUri - opaque ID (in the form of a canonicalized URI) for the watched resource that
is sensitive to the API versionchannelId - notification channel UUID provided by the client in the watch requestpublic TypedNotification(UnparsedNotification sourceNotification)
sourceNotification - source notification metadata to copypublic final T getContent()
null for none.public TypedNotification<T> setContent(T content)
null for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public TypedNotification<T> setMessageNumber(long messageNumber)
AbstractNotificationOverriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setMessageNumber in class AbstractNotificationpublic TypedNotification<T> setResourceState(String resourceState)
AbstractNotificationresource state.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setResourceState in class AbstractNotificationpublic TypedNotification<T> setResourceId(String resourceId)
AbstractNotificationOverriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setResourceId in class AbstractNotificationpublic TypedNotification<T> setResourceUri(String resourceUri)
AbstractNotificationOverriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setResourceUri in class AbstractNotificationpublic TypedNotification<T> setChannelId(String channelId)
AbstractNotificationOverriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setChannelId in class AbstractNotificationpublic TypedNotification<T> setChannelExpiration(String channelExpiration)
AbstractNotificationnull for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setChannelExpiration in class AbstractNotificationpublic TypedNotification<T> setChannelToken(String channelToken)
AbstractNotificationnull for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setChannelToken in class AbstractNotificationpublic TypedNotification<T> setChanged(String changed)
AbstractNotificationnull for none.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
setChanged in class AbstractNotificationpublic String toString()
toString in class AbstractNotificationCopyright © 2010–2021 Google. All rights reserved.