P - Type of payload received.T - Type of concrete manager, needed for fluent methods.public abstract class AbstractSubscriberManager<P,T extends AbstractSubscriberManager<P,T>> extends AbstractSubscriberBase<P,T> implements ISubscriberManager<P,T>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractSubscriberManager.Builder<P,T extends AbstractSubscriberManager.Builder<P,T,B>,B extends AbstractSubscriberManager<P,B>>
Builder.
|
| Modifier and Type | Field and Description |
|---|---|
protected IConfiguration |
config_ |
protected ICounter |
counter_ |
protected static long |
FAILED_CONSUMER_RETRY_TIME |
protected static long |
FAILED_DEAD_LETTER_RETRY_TIME |
protected static long |
MESSAGE_PROCESSED_OK |
protected ITraceContextTransactionFactory |
traceFactory_ |
protected IThreadSafeErrorConsumer<P> |
unprocessableMessageConsumer_ |
nameFactory_, subscribers_, totalSubscriptionCnt_| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSubscriberManager(Class<T> type,
AbstractSubscriberManager.Builder<P,?,T> builder) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertConfigurable() |
protected ICounter |
getCounter() |
protected ITraceContextTransactionFactory |
getTraceFactory() |
long |
handleMessage(IThreadSafeRetryableConsumer<P> consumer,
P payload,
ITraceContext trace,
String messageId)
Handle the given message.
|
protected abstract void |
initSubscription(SubscriptionImpl<P> subscription) |
void |
quiesce() |
protected void |
setLifeCycleState(FugueLifecycleState arg0) |
void |
start() |
protected abstract void |
startSubscriptions() |
void |
stop() |
protected abstract void |
stopSubscriptions()
Stop all subscribers.
|
getSubscribers, getTotalSubscriptionCntclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetComponentId, getComponentState, getComponentStatusMessageprotected static final long FAILED_DEAD_LETTER_RETRY_TIME
protected static final long FAILED_CONSUMER_RETRY_TIME
protected static final long MESSAGE_PROCESSED_OK
protected final ITraceContextTransactionFactory traceFactory_
protected final IThreadSafeErrorConsumer<P> unprocessableMessageConsumer_
protected final IConfiguration config_
protected final ICounter counter_
protected AbstractSubscriberManager(Class<T> type, AbstractSubscriberManager.Builder<P,?,T> builder)
protected ICounter getCounter()
protected abstract void initSubscription(SubscriptionImpl<P> subscription)
protected abstract void startSubscriptions()
protected abstract void stopSubscriptions()
protected ITraceContextTransactionFactory getTraceFactory()
public void start()
start in interface IFugueComponentpublic void quiesce()
quiesce in interface IFugueComponentpublic void stop()
stop in interface IFugueComponentpublic long handleMessage(IThreadSafeRetryableConsumer<P> consumer, P payload, ITraceContext trace, String messageId)
consumer - The consumer for the message.payload - A received message.trace - A trace context.messageId - A unique ID for the message.protected void assertConfigurable()
protected void setLifeCycleState(FugueLifecycleState arg0)
Copyright © 2018 Symphony Software Foundation. All rights reserved.