Class MessageSubscriptionBuilder
- All Implemented Interfaces:
Builder<MessageSubscription>
Example to create an instance using the builder pattern
MessageSubscription messageSubscription = MessageSubscription.builder()
.resourceTypeId(MessageSubscriptionResourceTypeId.APPROVAL_FLOW)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds MessageSubscription with checking for non-null required valuesbuilds MessageSubscription without checking for non-null required valuesUnique identifier for the type of resource, for example,order
.getTypes()
Must contain valid message types for the resource.static MessageSubscriptionBuilder
of()
factory method for an instance of MessageSubscriptionBuilderstatic MessageSubscriptionBuilder
of
(MessageSubscription template) create builder for MessageSubscription instanceMust contain valid message types for the resource.resourceTypeId
(MessageSubscriptionResourceTypeId resourceTypeId) Unique identifier for the type of resource, for example,order
.Must contain valid message types for the resource.Must contain valid message types for the resource.
-
Constructor Details
-
MessageSubscriptionBuilder
public MessageSubscriptionBuilder()
-
-
Method Details
-
resourceTypeId
Unique identifier for the type of resource, for example,
order
.- Parameters:
resourceTypeId
- value to be set- Returns:
- Builder
-
types
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
- value to be set- Returns:
- Builder
-
types
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
- value to be set- Returns:
- Builder
-
plusTypes
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
- value to be set- Returns:
- Builder
-
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
-
build
builds MessageSubscription with checking for non-null required values- Specified by:
build
in interfaceBuilder<MessageSubscription>
- Returns:
- MessageSubscription
-
buildUnchecked
builds MessageSubscription without checking for non-null required values- Returns:
- MessageSubscription
-
of
factory method for an instance of MessageSubscriptionBuilder- Returns:
- builder
-
of
create builder for MessageSubscription instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-