Class HTTPSeekableLineReaderFactory

java.lang.Object
org.archive.util.binsearch.impl.HTTPSeekableLineReaderFactory
All Implemented Interfaces:
SeekableLineReaderFactory
Direct Known Subclasses:
ApacheHttp43SLRFactory, HTTPURLConnSLRFactory

public abstract class HTTPSeekableLineReaderFactory extends Object implements SeekableLineReaderFactory
  • Field Details

    • defaultURL

      protected String defaultURL
  • Constructor Details

    • HTTPSeekableLineReaderFactory

      protected HTTPSeekableLineReaderFactory()
  • Method Details

    • get

      public abstract HTTPSeekableLineReader get(String url) throws IOException
      Throws:
      IOException
    • getHttpFactory

      public static HTTPSeekableLineReaderFactory getHttpFactory()
    • getHttpFactory

    • getHttpFactory

      public static HTTPSeekableLineReaderFactory getHttpFactory(String defaultURL)
    • getHttpFactory

      public static HTTPSeekableLineReaderFactory getHttpFactory(HTTPSeekableLineReaderFactory.HttpLibs type, String defaultURL)
    • get

      public HTTPSeekableLineReader get() throws IOException
      Specified by:
      get in interface SeekableLineReaderFactory
      Throws:
      IOException
    • close

      public abstract void close() throws IOException
      Specified by:
      close in interface SeekableLineReaderFactory
      Throws:
      IOException
    • setProxyHostPort

      public abstract void setProxyHostPort(String hostPort)
      Parameters:
      hostPort - to proxy requests through - ex. "localhost:3128"
    • setMaxTotalConnections

      public abstract void setMaxTotalConnections(int maxTotalConnections)
      Parameters:
      maxTotalConnections - the HttpConnectionManagerParams config
    • getMaxTotalConnections

      public abstract int getMaxTotalConnections()
      Returns:
      the HttpConnectionManagerParams maxTotalConnections config
    • setMaxHostConnections

      public abstract void setMaxHostConnections(int maxHostConnections)
      Parameters:
      maxHostConnections - the HttpConnectionManagerParams config
    • getMaxHostConnections

      public abstract int getMaxHostConnections()
      Returns:
      the HttpConnectionManagerParams maxHostConnections config
    • getConnectionTimeoutMS

      public abstract int getConnectionTimeoutMS()
      Returns:
      the connectionTimeoutMS
    • setConnectionTimeoutMS

      public abstract void setConnectionTimeoutMS(int connectionTimeoutMS)
      Parameters:
      connectionTimeoutMS - the connectionTimeoutMS to set
    • getSocketTimeoutMS

      public abstract int getSocketTimeoutMS()
      Returns:
      the socketTimeoutMS
    • setSocketTimeoutMS

      public abstract void setSocketTimeoutMS(int socketTimeoutMS)
      Parameters:
      socketTimeoutMS - the socketTimeoutMS to set
    • setStaleChecking

      public abstract void setStaleChecking(boolean enabled)
    • isStaleChecking

      public abstract boolean isStaleChecking()
    • getModTime

      public abstract long getModTime()
      Specified by:
      getModTime in interface SeekableLineReaderFactory
    • reload

      public void reload()
      Specified by:
      reload in interface SeekableLineReaderFactory
    • setNumRetries

      public abstract void setNumRetries(int numRetries)