public class MemPubSubProvider extends AbstractPubSubProvider
PubSubProvider
.namespace, subscribers
Constructor and Description |
---|
MemPubSubProvider() |
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 |
publish(String topic,
byte[] message)
Publishes a message to the given topic.
|
localPublish
public MemPubSubProvider()
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 PubSubProvider
initialize
in class AbstractPubSubProvider
public void close()
PubSubProvider
close
in interface PubSubProvider
close
in class AbstractPubSubProvider
public void publish(String topic, byte[] message)
PubSubProvider
topic
- the topicmessage
- the messageCopyright © 2018 Nuxeo. All rights reserved.