Package org.apache.pulsar.client.impl
Class ClientBuilderImpl
java.lang.Object
org.apache.pulsar.client.impl.ClientBuilderImpl
- All Implemented Interfaces:
Serializable
,Cloneable
,ClientBuilder
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowTlsInsecureConnection
(boolean tlsAllowInsecureConnection) authentication
(String authPluginClassName, String authParamsString) authentication
(String authPluginClassName, Map<String, String> authParams) authentication
(Authentication authentication) build()
clone()
connectionMaxIdleSeconds
(int connectionMaxIdleSeconds) connectionsPerBroker
(int connectionsPerBroker) connectionTimeout
(int duration, TimeUnit unit) description
(String description) Set the description.dnsLookupBind
(String address, int port) enableBusyWait
(boolean enableBusyWait) enableTcpNoDelay
(boolean useTcpNoDelay) enableTls
(boolean useTls) enableTlsHostnameVerification
(boolean enableTlsHostnameVerification) enableTransaction
(boolean enableTransaction) ioThreads
(int numIoThreads) keepAliveInterval
(int keepAliveInterval, TimeUnit unit) listenerName
(String listenerName) listenerThreads
(int numListenerThreads) lookupTimeout
(int lookupTimeout, TimeUnit unit) maxBackoffInterval
(long duration, TimeUnit unit) maxConcurrentLookupRequests
(int concurrentLookupRequests) maxLookupRedirects
(int maxLookupRedirects) maxLookupRequests
(int maxLookupRequests) maxNumberOfRejectedRequestPerConnection
(int maxNumberOfRejectedRequestPerConnection) memoryLimit
(long memoryLimit, SizeUnit unit) operationTimeout
(int operationTimeout, TimeUnit unit) proxyServiceUrl
(String proxyServiceUrl, ProxyProtocol proxyProtocol) serviceUrl
(String serviceUrl) serviceUrlProvider
(ServiceUrlProvider serviceUrlProvider) socks5ProxyAddress
(InetSocketAddress socks5ProxyAddress) socks5ProxyPassword
(String socks5ProxyPassword) socks5ProxyUsername
(String socks5ProxyUsername) sslProvider
(String sslProvider) startingBackoffInterval
(long duration, TimeUnit unit) statsInterval
(long statsInterval, TimeUnit unit) tlsCertificateFilePath
(String tlsCertificateFilePath) tlsCiphers
(Set<String> tlsCiphers) tlsKeyFilePath
(String tlsKeyFilePath) tlsKeyStorePassword
(String tlsKeyStorePassword) tlsKeyStorePath
(String tlsTrustStorePath) tlsKeyStoreType
(String tlsKeyStoreType) tlsProtocols
(Set<String> tlsProtocols) tlsTrustCertsFilePath
(String tlsTrustCertsFilePath) tlsTrustStorePassword
(String tlsTrustStorePassword) tlsTrustStorePath
(String tlsTrustStorePath) tlsTrustStoreType
(String tlsTrustStoreType) useKeyStoreTls
(boolean useKeyStoreTls)
-
Constructor Details
-
ClientBuilderImpl
public ClientBuilderImpl() -
ClientBuilderImpl
-
-
Method Details
-
build
- Specified by:
build
in interfaceClientBuilder
- Throws:
PulsarClientException
-
clone
- Specified by:
clone
in interfaceClientBuilder
- Overrides:
clone
in classObject
-
loadConf
- Specified by:
loadConf
in interfaceClientBuilder
-
serviceUrl
- Specified by:
serviceUrl
in interfaceClientBuilder
-
serviceUrlProvider
- Specified by:
serviceUrlProvider
in interfaceClientBuilder
-
listenerName
- Specified by:
listenerName
in interfaceClientBuilder
-
connectionMaxIdleSeconds
- Specified by:
connectionMaxIdleSeconds
in interfaceClientBuilder
-
authentication
- Specified by:
authentication
in interfaceClientBuilder
-
authentication
public ClientBuilder authentication(String authPluginClassName, String authParamsString) throws PulsarClientException.UnsupportedAuthenticationException - Specified by:
authentication
in interfaceClientBuilder
- Throws:
PulsarClientException.UnsupportedAuthenticationException
-
authentication
public ClientBuilder authentication(String authPluginClassName, Map<String, String> authParams) throws PulsarClientException.UnsupportedAuthenticationException- Specified by:
authentication
in interfaceClientBuilder
- Throws:
PulsarClientException.UnsupportedAuthenticationException
-
operationTimeout
- Specified by:
operationTimeout
in interfaceClientBuilder
-
lookupTimeout
- Specified by:
lookupTimeout
in interfaceClientBuilder
-
ioThreads
- Specified by:
ioThreads
in interfaceClientBuilder
-
listenerThreads
- Specified by:
listenerThreads
in interfaceClientBuilder
-
connectionsPerBroker
- Specified by:
connectionsPerBroker
in interfaceClientBuilder
-
enableTcpNoDelay
- Specified by:
enableTcpNoDelay
in interfaceClientBuilder
-
enableTls
- Specified by:
enableTls
in interfaceClientBuilder
-
tlsKeyFilePath
- Specified by:
tlsKeyFilePath
in interfaceClientBuilder
-
tlsCertificateFilePath
- Specified by:
tlsCertificateFilePath
in interfaceClientBuilder
-
enableTlsHostnameVerification
- Specified by:
enableTlsHostnameVerification
in interfaceClientBuilder
-
tlsTrustCertsFilePath
- Specified by:
tlsTrustCertsFilePath
in interfaceClientBuilder
-
allowTlsInsecureConnection
- Specified by:
allowTlsInsecureConnection
in interfaceClientBuilder
-
useKeyStoreTls
- Specified by:
useKeyStoreTls
in interfaceClientBuilder
-
sslProvider
- Specified by:
sslProvider
in interfaceClientBuilder
-
tlsKeyStoreType
- Specified by:
tlsKeyStoreType
in interfaceClientBuilder
-
tlsKeyStorePath
- Specified by:
tlsKeyStorePath
in interfaceClientBuilder
-
tlsKeyStorePassword
- Specified by:
tlsKeyStorePassword
in interfaceClientBuilder
-
tlsTrustStoreType
- Specified by:
tlsTrustStoreType
in interfaceClientBuilder
-
tlsTrustStorePath
- Specified by:
tlsTrustStorePath
in interfaceClientBuilder
-
tlsTrustStorePassword
- Specified by:
tlsTrustStorePassword
in interfaceClientBuilder
-
tlsCiphers
- Specified by:
tlsCiphers
in interfaceClientBuilder
-
tlsProtocols
- Specified by:
tlsProtocols
in interfaceClientBuilder
-
statsInterval
- Specified by:
statsInterval
in interfaceClientBuilder
-
maxConcurrentLookupRequests
- Specified by:
maxConcurrentLookupRequests
in interfaceClientBuilder
-
maxLookupRequests
- Specified by:
maxLookupRequests
in interfaceClientBuilder
-
maxLookupRedirects
- Specified by:
maxLookupRedirects
in interfaceClientBuilder
-
maxNumberOfRejectedRequestPerConnection
public ClientBuilder maxNumberOfRejectedRequestPerConnection(int maxNumberOfRejectedRequestPerConnection) - Specified by:
maxNumberOfRejectedRequestPerConnection
in interfaceClientBuilder
-
keepAliveInterval
- Specified by:
keepAliveInterval
in interfaceClientBuilder
-
connectionTimeout
- Specified by:
connectionTimeout
in interfaceClientBuilder
-
startingBackoffInterval
- Specified by:
startingBackoffInterval
in interfaceClientBuilder
-
maxBackoffInterval
- Specified by:
maxBackoffInterval
in interfaceClientBuilder
-
enableBusyWait
- Specified by:
enableBusyWait
in interfaceClientBuilder
-
getClientConfigurationData
-
memoryLimit
- Specified by:
memoryLimit
in interfaceClientBuilder
-
clock
- Specified by:
clock
in interfaceClientBuilder
-
proxyServiceUrl
- Specified by:
proxyServiceUrl
in interfaceClientBuilder
-
enableTransaction
- Specified by:
enableTransaction
in interfaceClientBuilder
-
dnsLookupBind
- Specified by:
dnsLookupBind
in interfaceClientBuilder
-
socks5ProxyAddress
- Specified by:
socks5ProxyAddress
in interfaceClientBuilder
-
socks5ProxyUsername
- Specified by:
socks5ProxyUsername
in interfaceClientBuilder
-
socks5ProxyPassword
- Specified by:
socks5ProxyPassword
in interfaceClientBuilder
-
description
Set the description.By default, when the client connects to the broker, a version string like "Pulsar-Java-v<x.y.z>" will be carried and saved by the broker. The client version string could be queried from the topic stats.
This method provides a way to add more description to a specific PulsarClient instance. If it's configured, the description will be appended to the original client version string, with '-' as the separator.
For example, if the client version is 3.0.0, and the description is "forked", the final client version string will be "Pulsar-Java-v3.0.0-forked".
- Parameters:
description
- the description of the current PulsarClient instance- Throws:
IllegalArgumentException
- if the length of description exceeds 64
-