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,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)  | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublishprotected Map<String,List<BiConsumer<String,byte[]>>> subscribers
public AbstractPubSubProvider()
public void initialize(Map<String,String> options, Map<String,List<BiConsumer<String,byte[]>>> subscribers)
PubSubProvider
 The options taken from the PubSubProviderDescriptor
 The subscribers map structure is thread-safe. The implementation must not modify the subscribers map in any way.
initialize in interface PubSubProviderpublic void close()
PubSubProviderclose in interface PubSubProviderpublic void localPublish(String topic, byte[] message)
Copyright © 2019 Nuxeo. All rights reserved.