Interface MessageSubscription
Messages will be delivered even if the Messages Query HTTP API is not enabled.
For MessageSubscriptions, the format of the payload is MessageDeliveryPayload.
Example to create an instance using the builder pattern
MessageSubscription messageSubscription = MessageSubscription.builder()
.resourceTypeId(MessageSubscriptionResourceTypeId.APPROVAL_FLOW)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic MessageSubscriptionBuilder
builder()
builder factory method for MessageSubscriptionstatic MessageSubscriptionBuilder
builder
(MessageSubscription template) create builder for MessageSubscription instancestatic MessageSubscription
deepCopy
(MessageSubscription template) factory method to create a deep copy of MessageSubscription@NotNull MessageSubscriptionResourceTypeId
Unique identifier for the type of resource, for example,order
.getTypes()
Must contain valid message types for the resource.static MessageSubscription
of()
factory methodstatic MessageSubscription
of
(MessageSubscription template) factory method to create a shallow copy MessageSubscriptionvoid
setResourceTypeId
(MessageSubscriptionResourceTypeId resourceTypeId) Unique identifier for the type of resource, for example,order
.void
Must contain valid message types for the resource.void
Must contain valid message types for the resource.static com.fasterxml.jackson.core.type.TypeReference<MessageSubscription>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withMessageSubscription
(Function<MessageSubscription, T> helper) accessor map function
-
Method Details
-
getResourceTypeId
Unique identifier for the type of resource, for example,
order
.- Returns:
- resourceTypeId
-
getTypes
Must contain valid message types for the resource. For example, for resource type
product
the message typeProductPublished
is valid. If notypes
of messages are given, the Subscription will receive all messages for this resource.- Returns:
- types
-
setResourceTypeId
Unique identifier for the type of resource, for example,
order
.- Parameters:
resourceTypeId
- value to be set
-
setTypes
Must contain valid message types for the resource. For example, for resource type
product
the message typeProductPublished
is valid. If notypes
of messages are given, the Subscription will receive all messages for this resource.- Parameters:
types
- values to be set
-
setTypes
Must contain valid message types for the resource. For example, for resource type
product
the message typeProductPublished
is valid. If notypes
of messages are given, the Subscription will receive all messages for this resource.- Parameters:
types
- values to be set
-
of
factory method- Returns:
- instance of MessageSubscription
-
of
factory method to create a shallow copy MessageSubscription- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of MessageSubscription- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MessageSubscription- Returns:
- builder
-
builder
create builder for MessageSubscription instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withMessageSubscription
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-