Package org.mozilla.geckoview
Class PageExtractionController.SessionPageExtractor
Object
org.mozilla.geckoview.PageExtractionController.SessionPageExtractor
- Enclosing class:
- PageExtractionController
Session page extractor coordinates session messaging between the page extractor actor and
GeckoView.
Performs page extraction actions that are dependent on the page.
-
Constructor Summary
ConstructorsConstructorDescriptionSessionPageExtractor(GeckoSession session) Construct a new page extractor session. -
Method Summary
Modifier and TypeMethodDescriptionGets the page content for the current page with default options.Gets the page content for the current page using the provided options.Gets metadata about the current page.
-
Constructor Details
-
SessionPageExtractor
Construct a new page extractor session.- Parameters:
session- that will be dispatching and receiving events.
-
-
Method Details
-
getPageContent
Gets the page content for the current page with default options.- Returns:
- the content of the current page as a
Stringor aPageExtractionController.PageExtractionExceptionif an error occurs while extracting the page content
-
getPageContent
@HandlerThread @NonNull public GeckoResult<String> getPageContent(@NonNull PageExtractionController.ContentParams options) Gets the page content for the current page using the provided options.- Parameters:
options- the options to control how the text is extracted- Returns:
- the content of the current page as a
Stringor aPageExtractionController.PageExtractionExceptionif an error occurs while extracting the page content
-
getPageMetadata
Gets metadata about the current page.- Returns:
- a
PageExtractionController.PageMetadatafor the current page or aPageExtractionController.PageExtractionExceptionif an error occurs
-