Interface ProxyProvider

  • All Known Implementing Classes:
    SimpleProxyProvider

    public interface ProxyProvider
    Proxy provider.
    Since:
    0.7.0
    • Method Detail

      • returnProxy

        void returnProxy​(Proxy proxy,
                         Page page,
                         Task task)
        Return proxy to Provider when complete a download.
        Parameters:
        proxy - the proxy config contains host,port and identify info
        page - the download result
        task - the download task
      • getProxy

        @Deprecated
        default Proxy getProxy​(Task task)
        Deprecated.
        Get a proxy for task by some strategy.
        Parameters:
        task - the download task
        Returns:
        proxy
      • getProxy

        default Proxy getProxy​(Request request,
                               Task task)
        Returns a proxy for the request.
        Parameters:
        request - the request
        task - the download task
        Returns:
        proxy
        Since:
        0.9.0