Class GeckoWebExecutor

Object
org.mozilla.geckoview.GeckoWebExecutor

@AnyThread public class GeckoWebExecutor extends Object
GeckoWebExecutor is responsible for fetching a WebRequest and delivering a WebResponse to the caller via fetch(WebRequest). Example:
     final GeckoWebExecutor executor = new GeckoWebExecutor();

     final GeckoResult<WebResponse> result = executor.fetch(
             new WebRequest.Builder("https://example.org/json")
             .header("Accept", "application/json")
             .build());

     result.then(response -> {
         // Do something with response
     });
 
  • Field Details

    • FETCH_FLAGS_NONE

      public static final int FETCH_FLAGS_NONE
      No special treatment.
      See Also:
    • FETCH_FLAGS_ANONYMOUS

      public static final int FETCH_FLAGS_ANONYMOUS
      Don't send cookies or other user data along with the request.
      See Also:
    • FETCH_FLAGS_NO_REDIRECTS

      public static final int FETCH_FLAGS_NO_REDIRECTS
      Don't automatically follow redirects.
      See Also:
    • FETCH_FLAGS_PRIVATE

      public static final int FETCH_FLAGS_PRIVATE
      Associates this download with the current private browsing session
      See Also:
    • FETCH_FLAGS_STREAM_FAILURE_TEST

      public static final int FETCH_FLAGS_STREAM_FAILURE_TEST
      This flag causes a read error in the WebResponse body. Useful for testing.
      See Also:
  • Constructor Details

    • GeckoWebExecutor

      public GeckoWebExecutor(@NonNull GeckoRuntime runtime)
      Create a new GeckoWebExecutor instance.
      Parameters:
      runtime - A GeckoRuntime instance
  • Method Details