Interface SubscriptionDraft
- All Superinterfaces:
Draft<SubscriptionDraft>,WithKey
Either messages, changes, or events must be set.
Example to create an instance using the builder pattern
SubscriptionDraft subscriptionDraft = SubscriptionDraft.builder()
.destination(destinationBuilder -> destinationBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic SubscriptionDraftBuilderbuilder()builder factory method for SubscriptionDraftstatic SubscriptionDraftBuilderbuilder(SubscriptionDraft template) create builder for SubscriptionDraft instancecopyDeep()static SubscriptionDraftdeepCopy(SubscriptionDraft template) factory method to create a deep copy of SubscriptionDraft@Valid List<ChangeSubscription>Changes to be subscribed to.@NotNull @Valid DestinationMessaging service to which the notifications are sent.@Valid List<EventSubscription>Events to be subscribed to.@Valid DeliveryFormatFormat in which the payload is delivered.getKey()User-defined unique identifier for the Subscription.@Valid List<MessageSubscription>Messages to be subscribed to.static SubscriptionDraftof()factory methodstatic SubscriptionDraftof(SubscriptionDraft template) factory method to create a shallow copy SubscriptionDraftvoidsetChanges(ChangeSubscription... changes) Changes to be subscribed to.voidsetChanges(List<ChangeSubscription> changes) Changes to be subscribed to.voidsetDestination(Destination destination) Messaging service to which the notifications are sent.voidsetEvents(EventSubscription... events) Events to be subscribed to.voidsetEvents(List<EventSubscription> events) Events to be subscribed to.voidsetFormat(DeliveryFormat format) Format in which the payload is delivered.voidUser-defined unique identifier for the Subscription.voidsetMessages(MessageSubscription... messages) Messages to be subscribed to.voidsetMessages(List<MessageSubscription> messages) Messages to be subscribed to.static com.fasterxml.jackson.core.type.TypeReference<SubscriptionDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithSubscriptionDraft(Function<SubscriptionDraft, T> helper) accessor map function
-
Method Details
-
getDestination
Messaging service to which the notifications are sent.
- Returns:
- destination
-
getKey
String getKey()User-defined unique identifier for the Subscription.
-
getMessages
Messages to be subscribed to.
- Returns:
- messages
-
getChanges
Changes to be subscribed to.
- Returns:
- changes
-
getEvents
Events to be subscribed to.
- Returns:
- events
-
getFormat
Format in which the payload is delivered. When not provided, the PlatformFormat is selected by default.
- Returns:
- format
-
setDestination
Messaging service to which the notifications are sent.
- Parameters:
destination- value to be set
-
setKey
User-defined unique identifier for the Subscription.
- Parameters:
key- value to be set
-
setMessages
Messages to be subscribed to.
- Parameters:
messages- values to be set
-
setMessages
Messages to be subscribed to.
- Parameters:
messages- values to be set
-
setChanges
Changes to be subscribed to.
- Parameters:
changes- values to be set
-
setChanges
Changes to be subscribed to.
- Parameters:
changes- values to be set
-
setEvents
Events to be subscribed to.
- Parameters:
events- values to be set
-
setEvents
Events to be subscribed to.
- Parameters:
events- values to be set
-
setFormat
Format in which the payload is delivered. When not provided, the PlatformFormat is selected by default.
- Parameters:
format- value to be set
-
of
factory method- Returns:
- instance of SubscriptionDraft
-
of
factory method to create a shallow copy SubscriptionDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
SubscriptionDraft copyDeep() -
deepCopy
factory method to create a deep copy of SubscriptionDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for SubscriptionDraft- Returns:
- builder
-
builder
create builder for SubscriptionDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withSubscriptionDraft
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
-