Package io.hstream
Interface HStreamClientBuilder
-
public interface HStreamClientBuilder
A builder forHStreamClient
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HStreamClient
build()
HStreamClientBuilder
enableTls()
Optional, Enable TLS, it requires the tlsCaPath option.HStreamClientBuilder
enableTlsAuthentication()
Optional, enable authentication based on TLS, it requires tlsKeyPath and tlsCertPath options.HStreamClientBuilder
requestTimeoutMs(long timeoutMs)
HStreamClientBuilder
serviceUrl(String serviceUrl)
Positional, serviceUrl is the bootstrap service url, whenHStreamClientBuilder
builds anHStreamClient
, it will lookup and set the real cluster service toHStreamClient
urls through serviceUrl.HStreamClientBuilder
tlsCaPath(String caPath)
Optional if enableTls is not set.HStreamClientBuilder
tlsCertPath(String certPath)
Optional if enableTlsAuthentication() is not setHStreamClientBuilder
tlsKeyPath(String keyPath)
Optional if enableTlsAuthentication() is not setHStreamClientBuilder
withMetadata(String key, String value)
-
-
-
Method Detail
-
serviceUrl
HStreamClientBuilder serviceUrl(String serviceUrl)
Positional, serviceUrl is the bootstrap service url, whenHStreamClientBuilder
builds anHStreamClient
, it will lookup and set the real cluster service toHStreamClient
urls through serviceUrl.- Parameters:
serviceUrl
- the bootstrap service url- Returns:
- the
HStreamClientBuilder
instance
-
enableTls
HStreamClientBuilder enableTls()
Optional, Enable TLS, it requires the tlsCaPath option.- Returns:
- the
HStreamClientBuilder
instance
-
tlsCaPath
HStreamClientBuilder tlsCaPath(String caPath)
Optional if enableTls is not set.- Parameters:
caPath
- the CA certificate file path- Returns:
- the
HStreamClientBuilder
instance
-
enableTlsAuthentication
HStreamClientBuilder enableTlsAuthentication()
Optional, enable authentication based on TLS, it requires tlsKeyPath and tlsCertPath options.- Returns:
- the
HStreamClientBuilder
instance
-
tlsKeyPath
HStreamClientBuilder tlsKeyPath(String keyPath)
Optional if enableTlsAuthentication() is not set- Parameters:
keyPath
- the pk8 format key file path- Returns:
- the
HStreamClientBuilder
instance
-
tlsCertPath
HStreamClientBuilder tlsCertPath(String certPath)
Optional if enableTlsAuthentication() is not set- Parameters:
certPath
- the certificate file path- Returns:
- the
HStreamClientBuilder
instance
-
requestTimeoutMs
HStreamClientBuilder requestTimeoutMs(long timeoutMs)
-
withMetadata
HStreamClientBuilder withMetadata(String key, String value)
-
build
HStreamClient build()
-
-