public abstract class AbstractPubSubProvider extends Object implements PubSubProvider
PubSubProvider
.
This deals with subscribers registration and dispatch.
Modifier and Type | Field and Description |
---|---|
protected String |
namespace |
protected Map<String,List<BiConsumer<String,byte[]>>> |
subscribers
List of subscribers for each topic.
|
Constructor and Description |
---|
AbstractPubSubProvider() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Frees the resources.
|
void |
initialize(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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
publish
protected Map<String,List<BiConsumer<String,byte[]>>> subscribers
public AbstractPubSubProvider()
public void initialize(Map<String,List<BiConsumer<String,byte[]>>> subscribers)
PubSubProvider
The subscribers map structure is thread-safe. The implementation must not modify the subscribers map in any way.
initialize
in interface PubSubProvider
public void close()
PubSubProvider
close
in interface PubSubProvider
public void localPublish(String topic, byte[] message)
Copyright © 2017 Nuxeo. All rights reserved.