Class TypedNotification<T> (2.0.0)

public class TypedNotification<T> extends AbstractNotification

Beta
Notification metadata and parsed content sent to this client about a watched resource.

Implementation is not thread-safe.

Inheritance

java.lang.Object > AbstractNotification > TypedNotification<T>

Type Parameter

NameDescription
T

Constructors

TypedNotification(UnparsedNotification sourceNotification)

public TypedNotification(UnparsedNotification sourceNotification)
Parameter
NameDescription
sourceNotificationUnparsedNotification

source notification metadata to copy

TypedNotification(long messageNumber, String resourceState, String resourceId, String resourceUri, String channelId)

public TypedNotification(long messageNumber, String resourceState, String resourceId, String resourceUri, String channelId)
Parameters
NameDescription
messageNumberlong

message number (a monotonically increasing value starting with 1)

resourceStateString
resource state
resourceIdString

opaque ID for the watched resource that is stable across API versions

resourceUriString

opaque ID (in the form of a canonicalized URI) for the watched resource that is sensitive to the API version

channelIdString

notification channel UUID provided by the client in the watch request

Methods

getContent()

public final T getContent()

Returns the parsed notification content or null for none.

Returns
TypeDescription
T

setChanged(String changed)

public TypedNotification<T> 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.

Parameter
NameDescription
changedString
Returns
TypeDescription
TypedNotification<T>
Overrides

setChannelExpiration(String channelExpiration)

public TypedNotification<T> 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.

Parameter
NameDescription
channelExpirationString
Returns
TypeDescription
TypedNotification<T>
Overrides

setChannelId(String channelId)

public TypedNotification<T> 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.

Parameter
NameDescription
channelIdString
Returns
TypeDescription
TypedNotification<T>
Overrides

setChannelToken(String channelToken)

public 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.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
channelTokenString
Returns
TypeDescription
TypedNotification<T>
Overrides

setContent(T content)

public TypedNotification<T> setContent(T content)

Sets the parsed notification content or null for none.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
contentT
Returns
TypeDescription
TypedNotification<T>

setMessageNumber(long messageNumber)

public TypedNotification<T> 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.

Parameter
NameDescription
messageNumberlong
Returns
TypeDescription
TypedNotification<T>
Overrides

setResourceId(String resourceId)

public TypedNotification<T> 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.

Parameter
NameDescription
resourceIdString
Returns
TypeDescription
TypedNotification<T>
Overrides

setResourceState(String resourceState)

public TypedNotification<T> 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.

Parameter
NameDescription
resourceStateString
Returns
TypeDescription
TypedNotification<T>
Overrides

setResourceUri(String resourceUri)

public 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.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
NameDescription
resourceUriString
Returns
TypeDescription
TypedNotification<T>
Overrides

toString()

public String toString()
Returns
TypeDescription
String
Overrides