Interface ClientOptions


public interface ClientOptions
Options for the ksqlDB Client.
  • Field Details

  • Method Details

    • 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
    • setKeyPassword

      ClientOptions setKeyPassword(String keyPassword)
      Sets the key password.
      Parameters:
      keyPassword - key password
      Returns:
      a reference to this
    • setKeyAlias

      ClientOptions setKeyAlias(String keyAlias)
      Sets the key alias.
      Parameters:
      keyAlias - key alias
      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
    • setHttp2MultiplexingLimit

      ClientOptions setHttp2MultiplexingLimit(int http2MultiplexingLimit)
      Sets the maximum number of requests per HTTP/2 connection. Defaults to -1.
      Parameters:
      http2MultiplexingLimit - number of requests
      Returns:
      a reference to this
    • setRequestHeaders

      ClientOptions setRequestHeaders(Map<String,String> requestHeaders)
      Sets custom request headers to be sent with requests to the ksqlDB server. These headers are in addition to any automatic headers such as the authorization header.

      If this method is called more than once, only the headers passed on the last invocation will be used. To update existing custom headers, use this method in combination with getRequestHeaders().

      In case of overlap between these custom headers and automatic headers such as the authorization header, these custom headers take precedence.

      Parameters:
      requestHeaders - custom request headers
      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
    • getKeyPassword

      String getKeyPassword()
      Returns the key password.
      Returns:
      key password
    • getKeyAlias

      String getKeyAlias()
      Returns the key alias.
      Returns:
      key alias
    • 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
    • getHttp2MultiplexingLimit

      int getHttp2MultiplexingLimit()
      Returns the maximum number of requests per HTTP/2 connection.
      Returns:
      number of requests
    • getRequestHeaders

      Map<String,String> getRequestHeaders()
      Returns a copy of the custom request headers to be sent with ksqlDB requests. If not set, then this method returns an empty map.
      Returns:
      custom request headers
    • copy

      Creates a copy of these ClientOptions.
      Returns:
      the copy
    • create

      static ClientOptions create()