public class DataSender extends Object implements Fiber
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED| Constructor and Description | 
|---|
| DataSender(AvailabilityService dataMgr,
          RTCConfigFactory configFactory)The constructor for this object | 
| Modifier and Type | Method and Description | 
|---|---|
| String | getName()Returns a name/ID for this fiber | 
| int | getStatus()Returns the current status | 
| void | handleRtcSubscribe(IEvent event)Inform the data sender of the new listener | 
| void | handleRtcUnsubscribe(IEvent event)Inform the data sender of the listener unsubscribing | 
| void | notifyToSend()Notify the DataSender to send data - create a new 'SendRequest' to send
 the data and queue to the consumer | 
| void | sendData()Loop through the categories and send out data for all categories that
 have changed | 
| void | start()Start the data sender thread pool | 
| void | stop()
 Shutdown the data sender thread pool | 
| void | subscribe(String url,
         String catlabel,
         String user,
         String passwd)Subscribe - Add the received URL and related info to the category->URLs map
 so the sendData() can send out to appropriate URLs for each category. | 
| void | unsubscribe(String urlStr)Unsubscribe - remove the received URL and related info from the
 category->URLs map so the sendData() will know when it sends data out | 
public DataSender(AvailabilityService dataMgr, RTCConfigFactory configFactory)
categories - The category map.numSenders - The number of senders.public String getName()
public int getStatus()
public void subscribe(String url, String catlabel, String user, String passwd)
public void unsubscribe(String urlStr)
urlStr - a String object.public void sendData()
public void notifyToSend()
public void handleRtcSubscribe(IEvent event)
public void handleRtcUnsubscribe(IEvent event)
Copyright © 2021. All rights reserved.