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 voidhandleException(Consumer<Throwable> onException, Throwable th) protected voidvoidPublishes the event synchronously.voidPublishes the supplied event synchronously and calls theConsumerwhen allSubscriptions 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:PublisherPublishes the event synchronously. -
publish
Description copied from interface:PublisherPublishes the supplied event synchronously and calls theConsumerwhen allSubscriptions have been notified.- Specified by:
publishin interfacePublisher<T>- Parameters:
t- the eventonFinish- theConsumerto be called after allSubscriptions have been notified
-
logException
-
handleException
-