public class RedisPubSubProvider extends AbstractPubSubProvider
PubSubProvider.| Modifier and Type | Class and Description | 
|---|---|
class  | 
RedisPubSubProvider.Dispatcher
Subscribes to the provided Redis channel pattern and dispatches received messages. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
protected RedisPubSubProvider.Dispatcher | 
dispatcher  | 
protected Thread | 
thread  | 
static long | 
TIMEOUT_SUBSCRIBE_SECONDS
Maximum delay to wait for a channel subscription on startup. 
 | 
namespace, subscribers| Constructor and Description | 
|---|
RedisPubSubProvider()  | 
| 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. 
 | 
localPublishpublic static final long TIMEOUT_SUBSCRIBE_SECONDS
protected RedisPubSubProvider.Dispatcher dispatcher
public RedisPubSubProvider()
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 PubSubProviderinitialize in class AbstractPubSubProviderpublic void close()
PubSubProviderclose in interface PubSubProviderclose in class AbstractPubSubProviderpublic void publish(String topic, byte[] message)
PubSubProvidertopic - the topicmessage - the messageCopyright © 2019 Nuxeo. All rights reserved.