Inherits From:nsIRequest

The URI checker is a component that can be used to verify the existance of a resource at the location specified by a given URI. It will use protocol specific methods to verify the URI (e.g., use of HEAD request for HTTP URIs).

This interface is implemented by the following components:


readonly nsIChannel baseChannel

Returns the base channel that will be used to verify the URI.


void asyncCheck ( nsIRequestObserver observer , nsISupports context ) void init ( nsIURI URI )

void asyncCheck ( nsIRequestObserver observer , nsISupports context )

Begin asynchronous checking URI for validity. Notification will be asynchronous through the nsIRequestObserver callback interface. When OnStartRequest is fired, the baseChannel attribute will have been updated to reflect the final channel used (corresponding to any redirects that may have been followed).

Our interpretations of the nsIRequestObserver status codes: NS_BINDING_SUCCEEDED: link is valid NS_BINDING_FAILED: link is invalid (gave an error) NS_BINDING_ABORTED: timed out, or cancelled

observer: The object to notify when the link is verified. We will call observer.OnStartRequest followed immediately by observer.OnStopRequest. It is recommended that the caller use OnStopRequest to act on the link's status. The underlying request will not be cancelled until after OnStopRequest has been called.
context: A closure that will be passed back to the nsIRequestObserver methods.

void init ( nsIURI URI )

Initializes the URI checker. After this method is called, it is valid to further configure the URI checker by calling its nsIRequest methods. This method creates the channel that will be used to verify the URI. In the case of the HTTP protocol, only a HEAD request will be issued.

URI: The URI to be checked.

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com