Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360589

Summary: ServiceRegistry and PluginRegistry should support use of "progressHandler"
Product: [ECD] Orion Reporter: Simon Kaegi <simon_kaegi>
Component: ClientAssignee: Simon Kaegi <simon_kaegi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne
Version: 0.2   
Target Milestone: 0.3 RC2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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