Package org.symphonyoss.s2.fugue.pubsub
Interface ISubscriberManagerBuilder<P,T extends ISubscriberManagerBuilder<P,T,B>,B extends ISubscriberManager<P,B>>
-
- Type Parameters:
P- The type of payload received.T- Type of concrete builder, needed for fluent methods.B- Type of concrete manager (built object), needed for fluent methods.
- All Superinterfaces:
org.symphonyoss.s2.common.fluent.IBuilder<T,B>,org.symphonyoss.s2.common.fluent.IFluent<T>
- All Known Subinterfaces:
IPullSubscriberManagerBuilder<P,T,B>
- All Known Implementing Classes:
AbstractPullSubscriberManager.Builder,AbstractSubscriberManager.Builder
public interface ISubscriberManagerBuilder<P,T extends ISubscriberManagerBuilder<P,T,B>,B extends ISubscriberManager<P,B>> extends org.symphonyoss.s2.common.fluent.IBuilder<T,B>A builder for a subscriber manager of payload type P.- Author:
- Bruce Skingle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TwithConfig(org.symphonyoss.s2.fugue.config.IConfiguration config)TwithCounter(org.symphonyoss.s2.fugue.counter.ICounter counter)TwithNameFactory(org.symphonyoss.s2.fugue.naming.INameFactory nameFactory)TwithSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, String subscriptionName, String[] topicNames)Subscribe to the given subscription on the given topics.TwithSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, String subscriptionName, String topicName, String... additionalTopicNames)Subscribe to the given subscription on the given topics.TwithSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, String subscriptionName, Collection<org.symphonyoss.s2.fugue.naming.TopicName> topicNames)Subscribe to the given subscription on the given topics.TwithSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, Subscription subscription)TwithTraceContextTransactionFactory(org.symphonyoss.s2.fugue.core.trace.ITraceContextTransactionFactory traceFactory)TwithUnprocessableMessageConsumer(org.symphonyoss.s2.fugue.pipeline.IThreadSafeErrorConsumer<P> unprocessableMessageConsumer)
-
-
-
Method Detail
-
withNameFactory
T withNameFactory(org.symphonyoss.s2.fugue.naming.INameFactory nameFactory)
-
withSubscription
T withSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, Subscription subscription)
-
withSubscription
T withSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, String subscriptionName, String topicName, String... additionalTopicNames)
Subscribe to the given subscription on the given topics. This method allows for the creation of the same subscription on one or more topics, the same consumer will receive messages received on the given subscription on any of the topics. The topics are all treated in the same way, the method is declared with topic and additionalTopics to ensure that at least one topic is provided. This method does the same thing as the other withSubscription methods, alternative signatures are provided as a convenience.- Parameters:
consumer- A consumer for received messages.subscriptionName- A subscription name.topicName- A topic name.additionalTopicNames- An optional list of additional topic names.- Returns:
- this (fluent method)
-
withSubscription
T withSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, String subscriptionName, Collection<org.symphonyoss.s2.fugue.naming.TopicName> topicNames)
Subscribe to the given subscription on the given topics. This method allows for the creation of the same subscription on one or more topics, the same consumer will receive messages received on the given subscription on any of the topics. The topics are all treated in the same way, the method is declared with topic and additionalTopics to ensure that at least one topic is provided. This method does the same thing as the other withSubscription methods, alternative signatures are provided as a convenience.- Parameters:
consumer- A consumer for received messages.subscriptionName- A subscription name.topicNames- A list of topic names.- Returns:
- this (fluent method)
- Throws:
IllegalArgumentException- If the list of topics is empty.
-
withSubscription
T withSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, String subscriptionName, String[] topicNames)
Subscribe to the given subscription on the given topics. This method allows for the creation of the same subscription on one or more topics, the same consumer will receive messages received on the given subscription on any of the topics. The topics are all treated in the same way, the method is declared with topic and additionalTopics to ensure that at least one topic is provided. This method does the same thing as the other withSubscription methods, alternative signatures are provided as a convenience.- Parameters:
consumer- A consumer for received messages.subscriptionName- A subscription name.topicNames- A list of topic names.- Returns:
- this (fluent method)
- Throws:
IllegalArgumentException- If the list of topics is empty.
-
withConfig
T withConfig(org.symphonyoss.s2.fugue.config.IConfiguration config)
-
withCounter
T withCounter(org.symphonyoss.s2.fugue.counter.ICounter counter)
-
withTraceContextTransactionFactory
T withTraceContextTransactionFactory(org.symphonyoss.s2.fugue.core.trace.ITraceContextTransactionFactory traceFactory)
-
-