onPushUpdateBefore
onPushUpdateBefore
Called immediately before real-time (subscription) data is applied to the Data Set.
Parameters
contentsDSName(string): The name of the Data Set being updatedprovInstName(string): The name of the subscribed Provider Instance
Returns: No return value — this is a callback, so its return value isn't used.
Description
Called just before new data from a Provider Instance you subscribed to with subscribeData is applied to the Data Set. Unlike the normal request path (onResponseUpdateBefore), there is no reqID concept here — this is a continuous push, not a request-response pair.
Example
function onPushUpdateBefore(contentsDSName, provInstName) {
$log.i(contentsDSName + " push incoming from " + provInstName);
}
Related
- The key difference:
onResponseUpdateBeforehandles normal request responses,onPushUpdateBeforehandles real-time push data. - It never fires for a Provider Instance you haven't subscribed to.