com.webrenderer.se.event
Interface NetworkListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
NetworkAdapter

public interface NetworkListener
extends java.util.EventListener

The listener interface for receiving browser network events (documents loading/finished, progress changes).

The class that is interested in processing a network event either implements this interface (and all the methods it contains) or extends the abstract NetworkAdapter class (overriding only the methods of interest).

The listener object created from that class is then registered with an IBrowserCanvas using the addNetworkListener method.


Method Summary
 void onDocumentComplete(NetworkEvent e)
          Invoked when a document stops loading in a browser.
 void onDocumentLoad(NetworkEvent e)
          Invoked when a document starts loading in a browser.
 void onDocumentPendingRequestsComplete(NetworkEvent e)
          Invoked when pending requests are completed that were current during an onDocumentComplete event (such as Ajax).
 void onHTTPInterceptHeaders(NetworkEvent e)
          Invoked from an IBrowserCanvas when before a HTTP request is sent.
 void onHTTPResponse(NetworkEvent e)
          Invoked from an IMozillaBrowserCanvas when Http Response data is sent back from a request.
 void onNetworkError(NetworkEvent e)
          Invoked when an error occurs on the network.
 void onNetworkStatus(NetworkEvent e)
          Invoked when the status of the network has changed.
 void onProgressChange(NetworkEvent e)
          Invoked when the progress of a document download changes.
 

Method Detail

onProgressChange

void onProgressChange(NetworkEvent e)
Invoked when the progress of a document download changes.
Availble Methods from NetworkEvent at the time this event is fired:


onDocumentLoad

void onDocumentLoad(NetworkEvent e)
Invoked when a document starts loading in a browser.
Availble Methods from NetworkEvent at the time this event is fired: None


onDocumentComplete

void onDocumentComplete(NetworkEvent e)
Invoked when a document stops loading in a browser.
Availble Methods from NetworkEvent at the time this event is fired: e.getURL() e.hasPendingRequests()


onNetworkStatus

void onNetworkStatus(NetworkEvent e)
Invoked when the status of the network has changed.
Availble Methods from NetworkEvent at the time this event is fired:


onNetworkError

void onNetworkError(NetworkEvent e)
Invoked when an error occurs on the network.
Availble Methods from NetworkEvent at the time this event is fired:


onHTTPResponse

void onHTTPResponse(NetworkEvent e)
Invoked from an IMozillaBrowserCanvas when Http Response data is sent back from a request.
Availble Methods from NetworkEvent at the time this event is fired:
Note: This will not get fired from an IIEBrowserCanvas (an IBrowserCanvas created from BrowserFactory.spawnInternetExplorer)


onHTTPInterceptHeaders

void onHTTPInterceptHeaders(NetworkEvent e)
Invoked from an IBrowserCanvas when before a HTTP request is sent. Using this event you can modify the HTTP Request Headers before the request is sent.
Availble Methods from NetworkEvent at the time this event is fired:


onDocumentPendingRequestsComplete

void onDocumentPendingRequestsComplete(NetworkEvent e)
Invoked when pending requests are completed that were current during an onDocumentComplete event (such as Ajax). This event will not be fired for every page, only pages that initatate network activity after the page load has finished. It is not guaranteed to fire when onDocumentComplete has pending requests.
Availble Methods from NetworkEvent at the time this event is fired: e.getURL()