Package org.symphonyoss.s2.fugue.pubsub
Class TopicSubscriptionAdmin.AbstractBuilder<T extends TopicSubscriptionAdmin.AbstractBuilder<T,B>,B extends ISubscriptionAdmin>
- java.lang.Object
-
- org.symphonyoss.s2.common.fluent.Fluent<T>
-
- org.symphonyoss.s2.common.fluent.BaseAbstractBuilder<T,B>
-
- org.symphonyoss.s2.fugue.pubsub.AbstractSubscription.AbstractBuilder<T,B>
-
- org.symphonyoss.s2.fugue.pubsub.TopicSubscriptionAdmin.AbstractBuilder<T,B>
-
- Type Parameters:
T- The concrete type of the builder for fluent methods.B- The type of the built object.
- All Implemented Interfaces:
org.symphonyoss.s2.common.fluent.IBuilder<T,B>,org.symphonyoss.s2.common.fluent.IFluent<T>
- Direct Known Subclasses:
TopicSubscription.Builder,TopicSubscriptionAdmin.Builder
- Enclosing class:
- TopicSubscriptionAdmin
public abstract static class TopicSubscriptionAdmin.AbstractBuilder<T extends TopicSubscriptionAdmin.AbstractBuilder<T,B>,B extends ISubscriptionAdmin> extends AbstractSubscription.AbstractBuilder<T,B>
AbstractBuilder.- Author:
- Bruce Skingle
-
-
Field Summary
-
Fields inherited from class org.symphonyoss.s2.fugue.pubsub.AbstractSubscription.AbstractBuilder
nameFactory_
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractBuilder(Class<T> type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidvalidate(org.symphonyoss.s2.common.fault.FaultAccumulator faultAccumulator)TwithFilterExclude(boolean filterExclude)Set the filtering to be inclusive or exclusive.TwithFilterPropertyName(String filterPropertyName)Set the name of the property to be used for filtering.TwithFilterPropertyValues(String... value)Add the given values to the list of filterPropertyName values to be accepted or excluded.TwithLambdaConsumer(String lambdaConsumer)Set the name of a lambda function to be triggered to process messages on this subscription.TwithServiceId(String serviceId)Set the serviceId of the topic owner.TwithSubscriptionId(String subscriptionId)Set the optional subscriptionId.TwithTopicIds(String... topicIds)Add the given topic IDs to the list of topics to be subscribed to.-
Methods inherited from class org.symphonyoss.s2.fugue.pubsub.AbstractSubscription.AbstractBuilder
withNameFactory
-
-
-
-
Method Detail
-
withSubscriptionId
public T withSubscriptionId(String subscriptionId)
Set the optional subscriptionId. The subscription (or queue in the case of SNS/SQS) will be named using the service name of the topic owner and the subscriber. In the case where a single subscribing service requires more than one subscription an additional subscription ID is needed to distinguish the multiple subscriptions.- Parameters:
subscriptionId- The subscription ID.- Returns:
- This (fluent method).
-
withServiceId
public T withServiceId(String serviceId)
Set the serviceId of the topic owner. Defaults to the service ID in the provided nameFactory.- Parameters:
serviceId- The serviceId of the topic owner.- Returns:
- This (fluent method).
-
withTopicIds
public T withTopicIds(String... topicIds)
Add the given topic IDs to the list of topics to be subscribed to.- Parameters:
topicIds- topic IDs to the list of topics to be subscribed to.- Returns:
- This (fluent method).
-
withFilterPropertyName
public T withFilterPropertyName(String filterPropertyName)
Set the name of the property to be used for filtering.- Parameters:
filterPropertyName- The name of the property to be used for filtering.- Returns:
- This (fluent method).
-
withFilterExclude
public T withFilterExclude(boolean filterExclude)
Set the filtering to be inclusive or exclusive.- Parameters:
filterExclude- If true then filtering is exclusive, the default is inclusive.- Returns:
- This (fluent method).
-
withFilterPropertyValues
public T withFilterPropertyValues(String... value)
Add the given values to the list of filterPropertyName values to be accepted or excluded.- Parameters:
value- values of filterPropertyName values to be accepted or excluded.- Returns:
- This (fluent method).
-
withLambdaConsumer
public T withLambdaConsumer(String lambdaConsumer)
Set the name of a lambda function to be triggered to process messages on this subscription.- Parameters:
lambdaConsumer- The name of a lambda function to be triggered to process messages on this subscription.- Returns:
- this (fluent method).
-
validate
protected void validate(org.symphonyoss.s2.common.fault.FaultAccumulator faultAccumulator)
- Overrides:
validatein classAbstractSubscription.AbstractBuilder<T extends TopicSubscriptionAdmin.AbstractBuilder<T,B>,B extends ISubscriptionAdmin>
-
-