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
Constructors -
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:
buildin interfaceClientBuilder- Throws:
PulsarClientException
-
clone
- Specified by:
clonein interfaceClientBuilder- Overrides:
clonein classObject
-
loadConf
- Specified by:
loadConfin interfaceClientBuilder
-
serviceUrl
- Specified by:
serviceUrlin interfaceClientBuilder
-
serviceUrlProvider
- Specified by:
serviceUrlProviderin interfaceClientBuilder
-
listenerName
- Specified by:
listenerNamein interfaceClientBuilder
-
connectionMaxIdleSeconds
- Specified by:
connectionMaxIdleSecondsin interfaceClientBuilder
-
authentication
- Specified by:
authenticationin interfaceClientBuilder
-
authentication
public ClientBuilder authentication(String authPluginClassName, String authParamsString) throws PulsarClientException.UnsupportedAuthenticationException - Specified by:
authenticationin interfaceClientBuilder- Throws:
PulsarClientException.UnsupportedAuthenticationException
-
authentication
public ClientBuilder authentication(String authPluginClassName, Map<String, String> authParams) throws PulsarClientException.UnsupportedAuthenticationException- Specified by:
authenticationin interfaceClientBuilder- Throws:
PulsarClientException.UnsupportedAuthenticationException
-
operationTimeout
- Specified by:
operationTimeoutin interfaceClientBuilder
-
lookupTimeout
- Specified by:
lookupTimeoutin interfaceClientBuilder
-
ioThreads
- Specified by:
ioThreadsin interfaceClientBuilder
-
listenerThreads
- Specified by:
listenerThreadsin interfaceClientBuilder
-
connectionsPerBroker
- Specified by:
connectionsPerBrokerin interfaceClientBuilder
-
enableTcpNoDelay
- Specified by:
enableTcpNoDelayin interfaceClientBuilder
-
enableTls
- Specified by:
enableTlsin interfaceClientBuilder
-
tlsKeyFilePath
- Specified by:
tlsKeyFilePathin interfaceClientBuilder
-
tlsCertificateFilePath
- Specified by:
tlsCertificateFilePathin interfaceClientBuilder
-
enableTlsHostnameVerification
- Specified by:
enableTlsHostnameVerificationin interfaceClientBuilder
-
tlsTrustCertsFilePath
- Specified by:
tlsTrustCertsFilePathin interfaceClientBuilder
-
allowTlsInsecureConnection
- Specified by:
allowTlsInsecureConnectionin interfaceClientBuilder
-
useKeyStoreTls
- Specified by:
useKeyStoreTlsin interfaceClientBuilder
-
sslProvider
- Specified by:
sslProviderin interfaceClientBuilder
-
tlsKeyStoreType
- Specified by:
tlsKeyStoreTypein interfaceClientBuilder
-
tlsKeyStorePath
- Specified by:
tlsKeyStorePathin interfaceClientBuilder
-
tlsKeyStorePassword
- Specified by:
tlsKeyStorePasswordin interfaceClientBuilder
-
tlsTrustStoreType
- Specified by:
tlsTrustStoreTypein interfaceClientBuilder
-
tlsTrustStorePath
- Specified by:
tlsTrustStorePathin interfaceClientBuilder
-
tlsTrustStorePassword
- Specified by:
tlsTrustStorePasswordin interfaceClientBuilder
-
tlsCiphers
- Specified by:
tlsCiphersin interfaceClientBuilder
-
tlsProtocols
- Specified by:
tlsProtocolsin interfaceClientBuilder
-
statsInterval
- Specified by:
statsIntervalin interfaceClientBuilder
-
maxConcurrentLookupRequests
- Specified by:
maxConcurrentLookupRequestsin interfaceClientBuilder
-
maxLookupRequests
- Specified by:
maxLookupRequestsin interfaceClientBuilder
-
maxLookupRedirects
- Specified by:
maxLookupRedirectsin interfaceClientBuilder
-
maxNumberOfRejectedRequestPerConnection
public ClientBuilder maxNumberOfRejectedRequestPerConnection(int maxNumberOfRejectedRequestPerConnection) - Specified by:
maxNumberOfRejectedRequestPerConnectionin interfaceClientBuilder
-
keepAliveInterval
- Specified by:
keepAliveIntervalin interfaceClientBuilder
-
connectionTimeout
- Specified by:
connectionTimeoutin interfaceClientBuilder
-
startingBackoffInterval
- Specified by:
startingBackoffIntervalin interfaceClientBuilder
-
maxBackoffInterval
- Specified by:
maxBackoffIntervalin interfaceClientBuilder
-
enableBusyWait
- Specified by:
enableBusyWaitin interfaceClientBuilder
-
getClientConfigurationData
-
memoryLimit
- Specified by:
memoryLimitin interfaceClientBuilder
-
clock
- Specified by:
clockin interfaceClientBuilder
-
proxyServiceUrl
- Specified by:
proxyServiceUrlin interfaceClientBuilder
-
enableTransaction
- Specified by:
enableTransactionin interfaceClientBuilder
-
dnsLookupBind
- Specified by:
dnsLookupBindin interfaceClientBuilder
-
socks5ProxyAddress
- Specified by:
socks5ProxyAddressin interfaceClientBuilder
-
socks5ProxyUsername
- Specified by:
socks5ProxyUsernamein interfaceClientBuilder
-
socks5ProxyPassword
- Specified by:
socks5ProxyPasswordin 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
-