View Issue Details

IDProjectCategoryView StatusLast Update
0000018MAIDENSCore Applicationpublic2020-05-03 12:42
Reporteradministrator Assigned Toadministrator  
PrioritynoneSeverityfeatureReproducibilityalways
Status assignedResolutionopen 
Platform- - Web (OS independent)OS- 
Product Version1.5 
Target Version1.5 
Summary0000018: Add "retroactivelySubscribe()" method in the PTT class of the PTT library
DescriptionThis would save the client programmer some typing if he is also interested in notifications that occurred before any subscribers were available for a given key. Currently, the code needed to access the payload cached for such notifications is added to the core application, and resembles the snippet below:

/**
* Syntactic sugar. Subscribes given callback to given PTT key, also considering
* "cached notifications" (notifications that occurred before any subscribers were
* available; the last body/payload of such a notification gets cached and can
* be retrieved by late subscribers by using dedicated API).
*/
private function retroactivelySubscribe (keyName : String, callback : Function) : void {
    const GLOBAL_PIPE = PTT.getPipe();
    GLOBAL_PIPE.subscribe (keyName, callback);
        if (GLOBAL_PIPE.hasBackupFor(keyName)) {
            callback (GLOBAL_PIPE.recoverBackupFor(keyName));
            GLOBAL_PIPE.deleteBackupFor(keyName);
        }
}
TagsOSX, Windows

Activities

administrator

2020-05-03 12:42

administrator   ~0000018

Actually this is not related to MAIDENS itself. We should add a "libraries" category, if not a category for each library. On hold for now.

Issue History

Date Modified Username Field Change
2020-03-05 13:08 administrator New Issue
2020-03-05 13:08 administrator Status new => assigned
2020-03-05 13:08 administrator Assigned To => administrator
2020-03-05 13:08 administrator Tag Attached: OSX
2020-03-05 13:08 administrator Tag Attached: Windows
2020-05-03 12:42 administrator Priority normal => none
2020-05-03 12:42 administrator Note Added: 0000018