Package org.symphonyoss.s2.fugue.pubsub
Class AbstractSubscriberManager.Builder<T extends AbstractSubscriberManager.Builder<T,P,B>,P,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.AbstractSubscriberManager.Builder<T,P,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<T,P,B>
- Direct Known Subclasses:
AbstractPullSubscriberManager.Builder
- Enclosing class:
- AbstractSubscriberManager<P,T extends AbstractSubscriberManager<P,T>>
protected abstract static class AbstractSubscriberManager.Builder<T extends AbstractSubscriberManager.Builder<T,P,B>,P,B extends AbstractSubscriberManager<P,B>> extends org.symphonyoss.s2.common.fluent.BaseAbstractBuilder<T,B> implements ISubscriberManagerBuilder<T,P,B>
Builder.- Author:
- Bruce Skingle
-
-
Field Summary
Fields Modifier and Type Field Description protected org.symphonyoss.s2.fugue.config.IConfigurationconfig_protected org.symphonyoss.s2.fugue.counter.ICountercounter_protected org.symphonyoss.s2.fugue.naming.INameFactorynameFactory_protected List<ISubscription<P>>subscribers_protected inttotalSubscriptionCnt_protected org.symphonyoss.s2.fugue.core.trace.ITraceContextTransactionFactorytraceFactory_protected org.symphonyoss.s2.fugue.pipeline.IThreadSafeErrorConsumer<P>unprocessableMessageConsumer_
-
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)Set the configuration to be used.TwithCounter(org.symphonyoss.s2.fugue.counter.ICounter counter)Set the metric counter to be used.TwithNameFactory(org.symphonyoss.s2.fugue.naming.INameFactory nameFactory)Set the name factory to be used.TwithSubscription(ISubscription<P> subscription)TwithTraceContextTransactionFactory(org.symphonyoss.s2.fugue.core.trace.ITraceContextTransactionFactory traceFactory)Set the trace context transaction factory to be used.TwithUnprocessableMessageConsumer(org.symphonyoss.s2.fugue.pipeline.IThreadSafeErrorConsumer<P> unprocessableMessageConsumer)Set the consumer for unprocessable messages.
-
-
-
Field Detail
-
nameFactory_
protected org.symphonyoss.s2.fugue.naming.INameFactory nameFactory_
-
subscribers_
protected List<ISubscription<P>> subscribers_
-
traceFactory_
protected org.symphonyoss.s2.fugue.core.trace.ITraceContextTransactionFactory traceFactory_
-
unprocessableMessageConsumer_
protected org.symphonyoss.s2.fugue.pipeline.IThreadSafeErrorConsumer<P> unprocessableMessageConsumer_
-
config_
protected org.symphonyoss.s2.fugue.config.IConfiguration config_
-
counter_
protected org.symphonyoss.s2.fugue.counter.ICounter counter_
-
totalSubscriptionCnt_
protected int totalSubscriptionCnt_
-
-
Method Detail
-
withNameFactory
public T withNameFactory(org.symphonyoss.s2.fugue.naming.INameFactory nameFactory)
Description copied from interface:ISubscriberManagerBuilderSet the name factory to be used.- Specified by:
withNameFactoryin interfaceISubscriberManagerBuilder<T extends AbstractSubscriberManager.Builder<T,P,B>,P,B extends AbstractSubscriberManager<P,B>>- Parameters:
nameFactory- The name factory to be used.- Returns:
- this (fluent method)
-
withSubscription
public T withSubscription(ISubscription<P> subscription)
- Specified by:
withSubscriptionin interfaceISubscriberManagerBuilder<T extends AbstractSubscriberManager.Builder<T,P,B>,P,B extends AbstractSubscriberManager<P,B>>- Returns:
- this (fluent method)
-
withConfig
public T withConfig(org.symphonyoss.s2.fugue.config.IConfiguration config)
Description copied from interface:ISubscriberManagerBuilderSet the configuration to be used.- Specified by:
withConfigin interfaceISubscriberManagerBuilder<T extends AbstractSubscriberManager.Builder<T,P,B>,P,B extends AbstractSubscriberManager<P,B>>- Parameters:
config- The configuration to be used.- Returns:
- this (fluent method)
-
withCounter
public T withCounter(org.symphonyoss.s2.fugue.counter.ICounter counter)
Description copied from interface:ISubscriberManagerBuilderSet the metric counter to be used.- Specified by:
withCounterin interfaceISubscriberManagerBuilder<T extends AbstractSubscriberManager.Builder<T,P,B>,P,B extends AbstractSubscriberManager<P,B>>- Parameters:
counter- The metric counter to be used.- Returns:
- this (fluent method)
-
withTraceContextTransactionFactory
public T withTraceContextTransactionFactory(org.symphonyoss.s2.fugue.core.trace.ITraceContextTransactionFactory traceFactory)
Description copied from interface:ISubscriberManagerBuilderSet the trace context transaction factory to be used.- Specified by:
withTraceContextTransactionFactoryin interfaceISubscriberManagerBuilder<T extends AbstractSubscriberManager.Builder<T,P,B>,P,B extends AbstractSubscriberManager<P,B>>- Parameters:
traceFactory- The trace context transaction factory to be used.- Returns:
- this (fluent method)
-
getTraceContextTransactionFactory
public org.symphonyoss.s2.fugue.core.trace.ITraceContextTransactionFactory getTraceContextTransactionFactory()
-
withUnprocessableMessageConsumer
public T withUnprocessableMessageConsumer(org.symphonyoss.s2.fugue.pipeline.IThreadSafeErrorConsumer<P> unprocessableMessageConsumer)
Description copied from interface:ISubscriberManagerBuilderSet the consumer for unprocessable messages. Messages will be sent to this consumer immediately of the handler throws a fatal exception and possibly after some number of retries in the case of a retryable exception.- Specified by:
withUnprocessableMessageConsumerin interfaceISubscriberManagerBuilder<T extends AbstractSubscriberManager.Builder<T,P,B>,P,B extends AbstractSubscriberManager<P,B>>- Parameters:
unprocessableMessageConsumer- The consumer for unprocessable messages.- Returns:
- this (fluent method)
-
validate
public void validate(org.symphonyoss.s2.common.fault.FaultAccumulator faultAccumulator)
- Overrides:
validatein classorg.symphonyoss.s2.common.fluent.BaseAbstractBuilder<T extends AbstractSubscriberManager.Builder<T,P,B>,B extends AbstractSubscriberManager<P,B>>
-
-