Interface ClientOptions


  • public interface ClientOptions
    Options for the ksqlDB Client.
    • Method Detail

      • setHost

        ClientOptions setHost​(String host)
        Sets the host name of the ksqlDB server to connect to. Defaults to "localhost".
        Parameters:
        host - host name
        Returns:
        a reference to this
      • setPort

        ClientOptions setPort​(int port)
        Sets the host port of the ksqlDB server to connect to. Defaults to 8088.
        Parameters:
        port - host port
        Returns:
        a reference to this
      • setUseTls

        ClientOptions setUseTls​(boolean useTls)
        Sets whether TLS should be used when connecting to the ksqlDB server. Defaults to false.
        Parameters:
        useTls - whether TLS should be used
        Returns:
        a reference to this
      • setVerifyHost

        ClientOptions setVerifyHost​(boolean verifyHost)
        Sets whether hostname verification (for TLS) is enabled. Defaults to true.
        Parameters:
        verifyHost - whether hostname verification should be enabled
        Returns:
        a reference to this
      • setUseAlpn

        ClientOptions setUseAlpn​(boolean useAlpn)
        Sets whether ALPN should be used. Defaults to false.
        Parameters:
        useAlpn - whether ALPN should be used
        Returns:
        a reference to this
      • setTrustStore

        ClientOptions setTrustStore​(String trustStorePath)
        Sets the trust store path.
        Parameters:
        trustStorePath - trust store path
        Returns:
        a reference to this
      • setTrustStorePassword

        ClientOptions setTrustStorePassword​(String trustStorePassword)
        Sets the trust store password.
        Parameters:
        trustStorePassword - trust store password
        Returns:
        a reference to this
      • setKeyStore

        ClientOptions setKeyStore​(String keyStorePath)
        Sets the key store path.
        Parameters:
        keyStorePath - key store path
        Returns:
        a reference to this
      • setKeyStorePassword

        ClientOptions setKeyStorePassword​(String keyStorePassword)
        Sets the key store password.
        Parameters:
        keyStorePassword - key store password
        Returns:
        a reference to this
      • setBasicAuthCredentials

        ClientOptions setBasicAuthCredentials​(String username,
                                              String password)
        Sets the username and password to be used for HTTP basic authentication when connecting to the ksqlDB server. Basic authentication will be used unless both username and password are null (the default).
        Parameters:
        username - username for basic authentication
        password - password for basic authentication
        Returns:
        a reference to this
      • setExecuteQueryMaxResultRows

        ClientOptions setExecuteQueryMaxResultRows​(int maxRows)
        Sets the maximum number of rows that may be returned in a BatchedQueryResult. Defaults to 10000.
        Parameters:
        maxRows - number of rows
        Returns:
        a reference to this
      • getHost

        String getHost()
        Returns the host name of the ksqlDB server to connect to.
        Returns:
        host name
      • getPort

        int getPort()
        Returns the host port of the ksqlDB server to connect to.
        Returns:
        host port
      • isUseTls

        boolean isUseTls()
        Returns whether TLS should be used when connecting to the ksqlDB server.
        Returns:
        whether TLS should be used
      • isVerifyHost

        boolean isVerifyHost()
        Returns whether hostname verification (for TLS) is enabled.
        Returns:
        whether hostname verification is enabled
      • isUseAlpn

        boolean isUseAlpn()
        Returns whether ALPN should be used.
        Returns:
        whether ALPN should be used
      • isUseBasicAuth

        boolean isUseBasicAuth()
        Returns whether HTTP basic authentication will be used when connecting to the ksqlDB server.
        Returns:
        whether basic authentication will be used
      • getTrustStore

        String getTrustStore()
        Returns the trust store path.
        Returns:
        trust store path
      • getTrustStorePassword

        String getTrustStorePassword()
        Returns the trust store password.
        Returns:
        trust store password
      • getKeyStore

        String getKeyStore()
        Returns the key store path.
        Returns:
        key store path
      • getKeyStorePassword

        String getKeyStorePassword()
        Returns the key store password.
        Returns:
        key store password
      • getBasicAuthUsername

        String getBasicAuthUsername()
        Returns the username to be used for HTTP basic authentication, if applicable.
        Returns:
        username
      • getBasicAuthPassword

        String getBasicAuthPassword()
        Returns the password to be used for HTTP basic authentication, if applicable.
        Returns:
        password
      • getExecuteQueryMaxResultRows

        int getExecuteQueryMaxResultRows()
        Returns the maximum number of rows that may be returned in a BatchedQueryResult.
        Returns:
        number of rows
      • copy

        ClientOptions copy()
        Creates a copy of these ClientOptions.
        Returns:
        the copy