Class AbstractPublisher<T>
java.lang.Object
dev.getelements.elements.sdk.util.AbstractPublisher<T>
- Type Parameters:
T
- the type published
- All Implemented Interfaces:
Publisher<T>
- Direct Known Subclasses:
ConcurrentDequePublisher
,LinkedPublisher
Represents an abstract
Publisher
instance.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
handleException
(Consumer<Throwable> onException, Throwable th) protected void
void
Publishes the event synchronously.void
Publishes the supplied event synchronously and calls theConsumer
when allSubscription
s have been notified.
-
Field Details
-
logger
protected final org.slf4j.Logger logger
-
-
Constructor Details
-
AbstractPublisher
-
AbstractPublisher
public AbstractPublisher(org.slf4j.Logger logger)
-
-
Method Details
-
publish
Description copied from interface:Publisher
Publishes the event synchronously. -
publish
Description copied from interface:Publisher
Publishes the supplied event synchronously and calls theConsumer
when allSubscription
s have been notified.- Specified by:
publish
in interfacePublisher<T>
- Parameters:
t
- the eventonFinish
- theConsumer
to be called after allSubscription
s have been notified
-
logException
-
handleException
-