public class FileBasedMessagingBroker extends Object
| Modifier and Type | Method and Description |
|---|---|
static FileBasedMessagingBroker |
connect(String name,
File exchangeFile,
boolean forceListening)
Installs the file watcher of the specified file.
|
void |
emitMessage(String topic,
TopicMessageEventContext messageEventContext)
Emits a new message to the file.
|
void |
registerListener(MessagingBrokerQueueListener listener) |
void |
subscribeTopic(String topic) |
public static FileBasedMessagingBroker connect(String name, File exchangeFile, boolean forceListening) throws IOException
name - service nameexchangeFile - file to be used for the message exchangeforceListening - enforces the listening of all topics in the fileIOException - in case, the service is already connected or the file watching initialization failspublic void emitMessage(String topic, TopicMessageEventContext messageEventContext)
topic - the topic the message should be send tomessageEventContext - the TopicMessageEventContext containing the message that shall be sendpublic void registerListener(MessagingBrokerQueueListener listener)
public void subscribeTopic(String topic)
Copyright © 2023. All rights reserved.