RTI Routing Service  Version 7.0.0
StreamReaderListener Interface Reference

StreamReaderListener used to notify Routing Service that new data is available. More...

Public Member Functions

void onDataAvailable (StreamReader streamReader)
 Callback that notifies RTI Routing Service of new samples. More...
 

Detailed Description

StreamReaderListener used to notify Routing Service that new data is available.

RTI Routing Service uses the session threads (there is one per <session> tag) to read data from StreamReaders.

Each session thread will block waiting for new data using a WaitSet. When a StreamReader receives new data, it will use the StreamReaderListener's com.rti.routingservice.adapter.StreamReaderListener.onDataAvailable callback operation to wake up the associated session thread. After that, the session thread will invoke the StreamReader's com.rti.routingservice.adapter.StreamReader.read operation to get the new data.

The following figure describes how the session thread reads samples from a StreamReader.

SessionThread.PNG

Member Function Documentation

◆ onDataAvailable()

void onDataAvailable ( StreamReader  streamReader)

Callback that notifies RTI Routing Service of new samples.

When a StreamReader receives new data, it will use this callback to notify RTI Routing Service that there are new samples.