com.sun.lwuit.html
Interface AsyncDocumentRequestHandler

All Superinterfaces:
DocumentRequestHandler
All Known Implementing Classes:
DefaultDocumentRequestHandler

public interface AsyncDocumentRequestHandler
extends DocumentRequestHandler

Provides an interface for Asynchronous request handling. The resourceRequestedAsync will be called without creating a new thread, but it has to return immediately. This can be useful when an external threading mechanism is to be utilized instead of the internal threading which is done by HTMLComponent. Note that the resourceRequested method should be implemented as well, since HTMLComponent has situations in which a resource needs to be fetched immediately (And block all the rest).


Nested Class Summary
static interface AsyncDocumentRequestHandler.IOCallback
          This interface is implemented by HTMLComponent and ResourceThread (The two classes using the AsyncDocumentRequestHandler)
 
Method Summary
 void resourceRequestedAsync(DocumentInfo docInfo, AsyncDocumentRequestHandler.IOCallback callback)
          This method is called by HTMLComponent when a resource is requested asynchronously.
 
Methods inherited from interface com.sun.lwuit.html.DocumentRequestHandler
resourceRequested
 

Method Detail

resourceRequestedAsync

void resourceRequestedAsync(DocumentInfo docInfo,
                            AsyncDocumentRequestHandler.IOCallback callback)
This method is called by HTMLComponent when a resource is requested asynchronously. This method should return immediately and start a process of fetching the requested resource on another thread. When the resource was fetched, the HTMLComponent.streamReady should be called.

Parameters:
docInfo - A DocumentInfo object representing the requested URL and its attributes
callback - The HTMLComponent that should be called back when the stream was fetched.