Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360589 - ServiceRegistry and PluginRegistry should support use of "progressHandler"
Summary: ServiceRegistry and PluginRegistry should support use of "progressHandler"
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.3 RC2   Edit
Assignee: Simon Kaegi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-11 16:19 EDT by Simon Kaegi CLA
Modified: 2011-10-13 09:46 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Kaegi CLA 2011-10-11 16:19:25 EDT
At the moment we have status fetching logic mixed in with our Status Reporting Service. The problem with this is that the fetching assumes in can do an XHR to get status updates. We could create an "orion.core.status" service but supporting a long running operation is so common we should just bite the bullet and support it directly in the service registry.

Each service call returns a promise object that has a "then" method. The then method should be made to take an optional "progressHandler" function as it's third argument.

e.g. promise.then(onSuccess, onError, onProgress)

Dojo.Deferred already has this support and it's more generally spec'ed here -- http://wiki.commonjs.org/wiki/Promises/A

We just need to support this in the serviceregistry, pluginregistry, and plugin orion components.
Comment 1 Simon Kaegi CLA 2011-10-12 18:26:10 EDT
Fixed.

a8914126b5b2eff64a18e8a1cc2a6074cc42c504
Comment 2 Simon Kaegi CLA 2011-10-13 09:46:15 EDT
Also see http://bugs.dojotoolkit.org/ticket/14090