public abstract class NetworkAdapter extends Object implements NetworkListener
Extend this class to create a NetworkEvent listener and
override the methods for the events of interest. (If you implement the
NetworkListener interface, you have to define all of the methods
in it. This abstract class defines null methods for them all, so
you only have to define methods for events you care about.)
Create a listener object using the extended class and then register it
with a browser using the browser's addNetworkListener method.
When a network event occurs, the relevant method in the listener object is
invoked and the NetworkEvent is passed to it.
| Constructor and Description |
|---|
NetworkAdapter() |
| Modifier and Type | Method and Description |
|---|---|
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 |
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.
|
public void onHTTPInterceptHeaders(NetworkEvent e)
NetworkListenerIBrowserCanvas when before a HTTP request is sent.
Using this event you can modify the HTTP Request Headers before the request is sent.
onHTTPInterceptHeaders in interface NetworkListenerpublic void onProgressChange(NetworkEvent e)
NetworkListeneronProgressChange in interface NetworkListenerpublic void onDocumentLoad(NetworkEvent e)
NetworkListeneronDocumentLoad in interface NetworkListenerpublic void onDocumentComplete(NetworkEvent e)
NetworkListeneronDocumentComplete in interface NetworkListenerpublic void onNetworkStatus(NetworkEvent e)
NetworkListeneronNetworkStatus in interface NetworkListenerpublic void onNetworkError(NetworkEvent e)
NetworkListeneronNetworkError in interface NetworkListenerpublic void onHTTPResponse(NetworkEvent e)
NetworkListenerIMozillaBrowserCanvas when Http Response data is sent back from a request.
onHTTPResponse in interface NetworkListener