T - the resource type MessageSubscription.getResourceTypeId()public interface MessageSubscriptionPayload<T> extends Payload<T>
| Modifier and Type | Method and Description |
|---|---|
default <M extends Message> |
as(Class<M> messageClass)
Returns
getMessage() as a message of the given message class. |
Message |
getMessage()
The message payload will always contain the common fields:
Resource.getId()
Resource.getVersion()
Message.getSequenceNumber()
Message.getResourceVersion()
Resource.getCreatedAt()
Resource.getLastModifiedAt()
for any message. |
PayloadNotIncluded |
getPaylaodNotIncluded() |
default boolean |
hasCompleteMessage()
Returns true iff.
|
getNotificationType, getProjectKey, getResource, getResourceUserProvidedIdentifiersMessage getMessage()
Resource.getId()Resource.getVersion()Message.getSequenceNumber()Message.getResourceVersion()Resource.getCreatedAt()Resource.getLastModifiedAt()Message.getType() property).
If the payload did not fit, it can be retrieved from the Messages endpoint if messages are enabled.
You can check if this payloads contains a complete message with hasCompleteMessage().
In this case you can use as(Class) to retrieve the typed message.
@Nullable PayloadNotIncluded getPaylaodNotIncluded()
default boolean hasCompleteMessage()
getMessage()default <M extends Message> M as(Class<M> messageClass)
getMessage() as a message of the given message class.M - the message typemessageClass - the message classIllegalStateException - if this payload contains an incomplete message hasCompleteMessage()