public class FileBasedMessagingService extends Object
Constructor and Description |
---|
FileBasedMessagingService() |
Modifier and Type | Method and Description |
---|---|
static void |
connect(File exchangeFile)
Installs the file watcher of the specified file.
|
static void |
emitMessage(String topic,
String event)
Emits a new message to the file.
|
static void |
listenToQueue(String queue,
com.sap.cds.feature.messaging.local.FileBasedMessagingService.QueueListener listener)
Registers a listener to the specified queue.
|
static void |
subscribeTopic(String queue,
String topic)
Subscribes a topic to the specified queue.
|
public static void connect(File exchangeFile) throws IOException
exchangeFile
- file to be used for the message exchangeIOException
- in case, the service is already connected or the file watching initialization failspublic static void emitMessage(String topic, String event)
topic
- the topic the message should be send toevent
- the event message to be sentpublic static void listenToQueue(String queue, com.sap.cds.feature.messaging.local.FileBasedMessagingService.QueueListener listener)
queue
- the queue to listen onlistener
- the listenerCopyright © 2020. All rights reserved.