Class ClientParameters


  • public class ClientParameters
    extends Object
    Parameters to create an instance of Client.
    Since:
    3.6.0
    • Constructor Detail

      • ClientParameters

        public ClientParameters()
    • Method Detail

      • url

        public ClientParameters url​(URL url)
        Set the URL to use.

        It is not expected that the URL contains any user info. Use url(String) user info must be extracted from the URL and assigned to username and password.

        Parameters:
        url - the URL
        Returns:
        this client parameters instance
      • url

        public ClientParameters url​(String url)
                             throws MalformedURLException
        Set the URL to use.

        The URL can contain user info. If so, they are automatically assigned to the username and password properties of this instance.

        Parameters:
        url - the URL
        Returns:
        this client parameters instance
        Throws:
        MalformedURLException - for a badly formed URL.
      • username

        public ClientParameters username​(String username)
        Set the username to use when authenticating.
        Parameters:
        username - the username
        Returns:
        this client parameters instance
      • password

        public ClientParameters password​(String password)
        Set the password to use when authenticating.
        Parameters:
        password - the password
        Returns:
        this client parameters instance
      • getUrl

        public URL getUrl()
      • getUsername

        public String getUsername()
      • getPassword

        public String getPassword()