Package org.symphonyoss.s2.fugue.pubsub
Class AbstractSubscriberManager.Builder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>
- java.lang.Object
-
- org.symphonyoss.s2.common.fluent.Fluent<T>
-
- org.symphonyoss.s2.common.fluent.BaseAbstractBuilder<T,B>
-
- org.symphonyoss.s2.fugue.pubsub.AbstractSubscriberBase.Builder<P,T,B>
-
- org.symphonyoss.s2.fugue.pubsub.AbstractSubscriberManager.Builder<P,T,B>
-
- Type Parameters:
T- The concrete type returned by fluent methods.B- The concrete type of the built object.
- All Implemented Interfaces:
org.symphonyoss.s2.common.fluent.IBuilder<T,B>,org.symphonyoss.s2.common.fluent.IFluent<T>,ISubscriberManagerBuilder<P,T,B>
- Direct Known Subclasses:
AbstractPullSubscriberManager.Builder
- Enclosing class:
- AbstractSubscriberManager<P,T extends AbstractSubscriberManager<P,T>>
protected abstract static class AbstractSubscriberManager.Builder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>> extends AbstractSubscriberBase.Builder<P,T,B> implements ISubscriberManagerBuilder<P,T,B>
Builder.- Author:
- Bruce Skingle
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.symphonyoss.s2.fugue.core.trace.ITraceContextTransactionFactorygetTraceContextTransactionFactory()voidvalidate(org.symphonyoss.s2.common.fault.FaultAccumulator faultAccumulator)TwithConfig(org.symphonyoss.s2.fugue.config.IConfiguration config)TwithCounter(org.symphonyoss.s2.fugue.counter.ICounter counter)TwithSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, String subscriptionId, String[] topicNames)Subscribe to the given subscription on the given topics.TwithSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, String subscriptionId, String topicId, String... additionalTopicIds)Subscribe to the given subscription on the given topics.TwithSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, String subscriptionId, 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)-
Methods inherited from class org.symphonyoss.s2.fugue.pubsub.AbstractSubscriberBase.Builder
withNameFactory
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.symphonyoss.s2.fugue.pubsub.ISubscriberManagerBuilder
withNameFactory
-
-
-
-
Method Detail
-
withSubscription
public T withSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, Subscription subscription)
- Specified by:
withSubscriptionin interfaceISubscriberManagerBuilder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>- Overrides:
withSubscriptionin classAbstractSubscriberBase.Builder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>
-
withSubscription
public T withSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, String subscriptionId, String topicId, String... additionalTopicIds)
Description copied from interface:ISubscriberManagerBuilderSubscribe 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.- Specified by:
withSubscriptionin interfaceISubscriberManagerBuilder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>- Overrides:
withSubscriptionin classAbstractSubscriberBase.Builder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>- Parameters:
consumer- A consumer for received messages.subscriptionId- A subscription name.topicId- A topic name.additionalTopicIds- An optional list of additional topic names.- Returns:
- this (fluent method)
-
withSubscription
public T withSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, String subscriptionId, Collection<org.symphonyoss.s2.fugue.naming.TopicName> topicNames)
Description copied from interface:ISubscriberManagerBuilderSubscribe 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.- Specified by:
withSubscriptionin interfaceISubscriberManagerBuilder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>- Overrides:
withSubscriptionin classAbstractSubscriberBase.Builder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>- Parameters:
consumer- A consumer for received messages.subscriptionId- A subscription name.topicNames- A list of topic names.- Returns:
- this (fluent method)
-
withSubscription
public T withSubscription(org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P> consumer, String subscriptionId, String[] topicNames)
Description copied from interface:ISubscriberManagerBuilderSubscribe 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.- Specified by:
withSubscriptionin interfaceISubscriberManagerBuilder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>- Overrides:
withSubscriptionin classAbstractSubscriberBase.Builder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>- Parameters:
consumer- A consumer for received messages.subscriptionId- A subscription name.topicNames- A list of topic names.- Returns:
- this (fluent method)
-
withConfig
public T withConfig(org.symphonyoss.s2.fugue.config.IConfiguration config)
- Specified by:
withConfigin interfaceISubscriberManagerBuilder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>
-
withCounter
public T withCounter(org.symphonyoss.s2.fugue.counter.ICounter counter)
- Specified by:
withCounterin interfaceISubscriberManagerBuilder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>
-
withTraceContextTransactionFactory
public T withTraceContextTransactionFactory(org.symphonyoss.s2.fugue.core.trace.ITraceContextTransactionFactory traceFactory)
- Specified by:
withTraceContextTransactionFactoryin interfaceISubscriberManagerBuilder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>
-
getTraceContextTransactionFactory
public org.symphonyoss.s2.fugue.core.trace.ITraceContextTransactionFactory getTraceContextTransactionFactory()
-
withUnprocessableMessageConsumer
public T withUnprocessableMessageConsumer(org.symphonyoss.s2.fugue.pipeline.IThreadSafeErrorConsumer<P> unprocessableMessageConsumer)
- Specified by:
withUnprocessableMessageConsumerin interfaceISubscriberManagerBuilder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>
-
validate
public void validate(org.symphonyoss.s2.common.fault.FaultAccumulator faultAccumulator)
- Overrides:
validatein classAbstractSubscriberBase.Builder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>
-
-