Class AsyncDocumentRequestHandlerImpl
java.lang.Object
com.codename1.ui.html.DefaultDocumentRequestHandler
com.codename1.ui.html.AsyncDocumentRequestHandlerImpl
- All Implemented Interfaces:
AsyncDocumentRequestHandler, DocumentRequestHandler
Implementation of the HTML components document request handler to allow simple
HTML support in CodenameOne.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ConnectionRequestcreateConnectionRequest(DocumentInfo docInfo, IOCallback callback, Object[] response) resourceRequested(DocumentInfo docInfo) Implementations should return the document in the requested url as an InputStream This is triggered only for the main document requested and not for its resources.voidresourceRequestedAsync(DocumentInfo docInfo, IOCallback callback) This method is called by HTMLComponent when a resource is requested asynchronously.Methods inherited from class DefaultDocumentRequestHandler
getResFile, isTrackVisitedURLs, setResFile, setTrackVisitedURLs, visitingURL, wasURLVisited
-
Field Details
-
LOCK
-
-
Constructor Details
-
AsyncDocumentRequestHandlerImpl
public AsyncDocumentRequestHandlerImpl()
-
-
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.
- Specified by:
resourceRequestedAsyncin interfaceAsyncDocumentRequestHandler- Overrides:
resourceRequestedAsyncin classDefaultDocumentRequestHandler
-
-
resourceRequested
Implementations should return the document in the requested url as an InputStream This is triggered only for the main document requested and not for its resources.
Parameters
docInfo: A DocumentInfo object representing the requested URL and its attributes
Returns
the document at the URL as an InputStream
- Specified by:
resourceRequestedin interfaceDocumentRequestHandler- Overrides:
resourceRequestedin classDefaultDocumentRequestHandler
-
createConnectionRequest
protected ConnectionRequest createConnectionRequest(DocumentInfo docInfo, IOCallback callback, Object[] response)
-