User:Brahmana/Biesi Diagram Explained

From MozillaWiki
Jump to: navigation, search

This is my understanding of what Biesi has drawn up here: [1]. Only the first diagram is explained here.

Whenever an user clicks on a link the URILoader service is called up. Now if the content type is unknown then the HelperAppService comes into picture. The URILoader calls the HelperAppService with the DoContent menthod. Now this HelperAppService finds out the MIME type of the content. Then it creates an instance of the ExternalAppHandler to handle this particular download and returns this handler to the URILoader module.

So the HelperAppService is a singleton and acts as a daemon process creating an instance of ExternalAppHandler for every download.

The URI loader sends the start request to the handler and handler then creates an instance of the HelperAppDialog where the user can choose the action needed to be taken(Open with some application or Save it do disk or .....). Then this dialog will be set as the Progress Listener, meaning the progress information of the download is sent to this dialog. (Biesi says progress information is needed here for some error checking.


Whenever some data is available, meaning when some data arrives from the network(i.e server) the OnDataAvailable {ODA} calls happen. This function is implemented by the ExternalAppHandler. These calls keep happening through out the download.

Then the user choice is returned to the App handler and the dialog is no longer the progress listener. (Because it will no longer exist).