Interface Fetcher

  • All Superinterfaces:
    AutoCloseable
    All Known Implementing Classes:
    AsyncFetcher, StorageFetcher

    public interface Fetcher
    extends AutoCloseable
    This interface represents only the most basic of fetching a request. It imposes no restrictions or particular details on the request execution process and leaves the specifics of proxy management, validation and response status handling up to individual implementations.
    Author:
    Maksim Tkachenko, Truong Quoc Tuan, Ween Jiann Lee
    • Method Detail

      • start

        void start()
        Fetcher starter.
      • fetch

        @NotNull
        @NotNull Future<Response> fetch​(@NotNull
                                        @NotNull Request request)
        Fetch the desired HTTP page given in Request.
        Parameters:
        request - information for the page to fetch.
        Returns:
        Response future
      • fetch

        @NotNull
        @NotNull Future<Response> fetch​(@NotNull
                                        @NotNull Request request,
                                        @NotNull
                                        @NotNull Callback callback)
        Fetch the desired HTTP page given in Request. Executes callback upon completion.
        Parameters:
        request - information for the page to fetch.
        callback - callback
        Returns:
        Response future