Interface AsyncDocumentRequestHandler
- All Superinterfaces:
DocumentRequestHandler
- All Known Implementing Classes:
AsyncDocumentRequestHandlerImpl, DefaultDocumentRequestHandler
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).
-
Method Summary
Modifier and TypeMethodDescriptionvoidresourceRequestedAsync(DocumentInfo docInfo, IOCallback callback) This method is called by HTMLComponent when a resource is requested asynchronously.Methods inherited from interface DocumentRequestHandler
resourceRequested
-
Method Details
-
resourceRequestedAsync
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.
-
-