Class DatafeedLoopV1

java.lang.Object
com.symphony.bdk.core.service.datafeed.impl.DatafeedLoopV1
All Implemented Interfaces:
DatafeedLoop

@API(status=INTERNAL) public class DatafeedLoopV1 extends Object
A class for implementing the datafeed v1 loop service.

This service will be started by calling DatafeedLoop.start()

At the beginning, a datafeed will be created and the BDK bot will listen to this datafeed to receive the real-time events. With datafeed service v1, we don't have the api endpoint to retrieve the datafeed id that a service account is listening, so, the id of the created datafeed must be persisted in the bot side.

The BDK bot will listen to this datafeed to get all the received real-time events.

From the second time, the bot will firstly retrieve the datafeed that was persisted and try to read the real-time events from this datafeed. If this datafeed is expired or faulty, the datafeed service will create the new one for listening.

This service will be stopped by calling DatafeedLoop.stop()

If the datafeed service is stopped during a read datafeed call, it has to wait until the last read finish to be really stopped