Package org.nuxeo.runtime.pubsub
Class AbstractPubSubProvider
java.lang.Object
org.nuxeo.runtime.pubsub.AbstractPubSubProvider
- All Implemented Interfaces:
PubSubProvider
- Direct Known Subclasses:
MemPubSubProvider
,StreamPubSubProvider
Abstract implementation of
PubSubProvider
.
This deals with subscribers registration and dispatch.
- Since:
- 9.1
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Frees the resources.void
initialize
(Map<String, String> options, Map<String, List<BiConsumer<String, byte[]>>> subscribers) Initializes the resources for this provider and registers the local subscribers map.void
localPublish
(String topic, byte[] message) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.pubsub.PubSubProvider
publish
-
Field Details
-
namespace
-
subscribers
List of subscribers for each topic.
-
-
Constructor Details
-
AbstractPubSubProvider
public AbstractPubSubProvider()
-
-
Method Details
-
initialize
public void initialize(Map<String, String> options, Map<String, List<BiConsumer<String, byte[]>>> subscribers) Description copied from interface:PubSubProvider
Initializes the resources for this provider and registers the local subscribers map.The options taken from the
PubSubProviderDescriptor
The subscribers map structure is thread-safe. The implementation must not modify the subscribers map in any way.- Specified by:
initialize
in interfacePubSubProvider
-
close
public void close()Description copied from interface:PubSubProvider
Frees the resources.- Specified by:
close
in interfacePubSubProvider
-
localPublish
-