Class HttpFileSystemConfigBuilder

    • Field Detail

      • KEY_FOLLOW_REDIRECT

        protected static final java.lang.String KEY_FOLLOW_REDIRECT
        See Also:
        Constant Field Values
    • Constructor Detail

      • HttpFileSystemConfigBuilder

        protected HttpFileSystemConfigBuilder​(java.lang.String prefix)
        Create new config builder.
        Parameters:
        prefix - String for properties of this file system.
        Since:
        2.0
    • Method Detail

      • setUrlCharset

        public void setUrlCharset​(FileSystemOptions opts,
                                  java.lang.String chaset)
        Set the charset used for url encoding.
        Parameters:
        opts - The FileSystem options.
        chaset - the chaset
      • getUrlCharset

        public java.lang.String getUrlCharset​(FileSystemOptions opts)
        Set the charset used for url encoding.
        Parameters:
        opts - The FileSystem options.
        Returns:
        the chaset
      • setProxyAuthenticator

        public void setProxyAuthenticator​(FileSystemOptions opts,
                                          UserAuthenticator authenticator)
        Set the proxy authenticator where the system should get the credentials from.
        Parameters:
        opts - The FileSystem options.
        authenticator - The UserAuthenticator.
      • getProxyAuthenticator

        public UserAuthenticator getProxyAuthenticator​(FileSystemOptions opts)
        Get the proxy authenticator where the system should get the credentials from.
        Parameters:
        opts - The FileSystem options.
        Returns:
        The UserAuthenticator.
      • setCookies

        public void setCookies​(FileSystemOptions opts,
                               org.apache.commons.httpclient.Cookie[] cookies)
        The cookies to add to the request.
        Parameters:
        opts - The FileSystem options.
        cookies - An array of Cookies.
      • getCookies

        public org.apache.commons.httpclient.Cookie[] getCookies​(FileSystemOptions opts)
        The cookies to add to the request.
        Parameters:
        opts - The FileSystem options.
        Returns:
        the Cookie array.
      • setMaxTotalConnections

        public void setMaxTotalConnections​(FileSystemOptions opts,
                                           int maxTotalConnections)
        The maximum number of connections allowed.
        Parameters:
        opts - The FileSystem options.
        maxTotalConnections - The maximum number of connections.
        Since:
        2.0
      • getMaxTotalConnections

        public int getMaxTotalConnections​(FileSystemOptions opts)
        Retrieve the maximum number of connections allowed.
        Parameters:
        opts - The FileSystemOptions.
        Returns:
        The maximum number of connections allowed.
        Since:
        2.0
      • setMaxConnectionsPerHost

        public void setMaxConnectionsPerHost​(FileSystemOptions opts,
                                             int maxHostConnections)
        The maximum number of connections allowed to any host.
        Parameters:
        opts - The FileSystem options.
        maxHostConnections - The maximum number of connections to a host.
        Since:
        2.0
      • getMaxConnectionsPerHost

        public int getMaxConnectionsPerHost​(FileSystemOptions opts)
        Retrieve the maximum number of connections allowed per host.
        Parameters:
        opts - The FileSystemOptions.
        Returns:
        The maximum number of connections allowed per host.
        Since:
        2.0
      • isPreemptiveAuth

        public boolean isPreemptiveAuth​(FileSystemOptions opts)
        Determines if the FileSystemOptions indicate that preemptive authentication is requested.
        Parameters:
        opts - The FileSystemOptions.
        Returns:
        true if preemptiveAuth is requested.
        Since:
        2.0
      • setPreemptiveAuth

        public void setPreemptiveAuth​(FileSystemOptions opts,
                                      boolean preemptiveAuth)
        Sets the given value for preemptive HTTP authentication (using BASIC) on the given FileSystemOptions object. Defaults to false if not set. It may be appropriate to set to true in cases when the resulting chattiness of the conversation outweighs any architectural desire to use a stronger authentication scheme than basic/preemptive.
        Parameters:
        opts - The FileSystemOptions.
        preemptiveAuth - the desired setting; true=enabled and false=disabled.
      • setConnectionTimeout

        public void setConnectionTimeout​(FileSystemOptions opts,
                                         int connectionTimeout)
        The connection timeout.
        Parameters:
        opts - The FileSystem options.
        connectionTimeout - The connection timeout.
        Since:
        2.1
      • getConnectionTimeout

        public int getConnectionTimeout​(FileSystemOptions opts)
        Retrieve the connection timeout.
        Parameters:
        opts - The FileSystem options.
        Returns:
        The connection timeout.
        Since:
        2.1
      • setSoTimeout

        public void setSoTimeout​(FileSystemOptions opts,
                                 int soTimeout)
        The socket timeout.
        Parameters:
        opts - The FileSystem options.
        soTimeout - socket timeout.
        Since:
        2.1
      • getSoTimeout

        public int getSoTimeout​(FileSystemOptions opts)
        Retrieve the socket timeout.
        Parameters:
        opts - The FileSystemOptions.
        Returns:
        The socket timeout.
        Since:
        2.1
      • setUserAgent

        public void setUserAgent​(FileSystemOptions opts,
                                 java.lang.String userAgent)
        Assign the user agent to attach to the outgoing http methods
        Parameters:
        userAgent - User Agent String
      • getUserAgent

        public java.lang.String getUserAgent​(FileSystemOptions opts)
        Return the user agent string
        Returns:
        User provided User-Agent string, otherwise default of: Jakarta-Commons-VFS