public interface DocumentRequestHandler

Known subtypesAsyncDocumentRequestHandler, AsyncDocumentRequestHandlerImpl, DefaultDocumentRequestHandler

The DocumentRequestHandler interface should be implemented so it returns documents in requested URLs.

Concrete classes should handle in its single method all necessary networking and IO issues.

Implementations of this interface are used by HTMLComponent to obtain links and form results

Methods

public abstract InputStream 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.

Method details

resourceRequested

public abstract InputStream 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.

Parameters

docInfo DocumentInfo
A DocumentInfo object representing the requested URL and its attributes

Returns

the document at the URL as an InputStream