public class ProducerBuilder
extends java.lang.Object
| Constructor and Description |
|---|
ProducerBuilder(java.lang.String base,
ChannelAuth auth)
Constructor for
ProducerBuilder |
| Modifier and Type | Method and Description |
|---|---|
Producer |
build()
|
ProducerBuilder |
withCertificateBundle(java.lang.String verifyCertBundle)
|
ProducerBuilder |
withHttpProxy(HttpProxySettings httpProxySettings)
|
ProducerBuilder |
withProducerPathPrefix(java.lang.String producerPathPrefix)
|
public ProducerBuilder(java.lang.String base,
ChannelAuth auth)
Constructor for ProducerBuilder
base - base URL at which the streaming service resides.auth - Authentication object to use for channel requests.public ProducerBuilder withProducerPathPrefix(java.lang.String producerPathPrefix)
producerPathPrefix - Path to append to producer-related requests made to the streaming service. Note that
if the pathPrefix parameter is set to a non-empty value, the pathPrefix value will be
appended to producer-related requests instead of the producerPathPrefix value.ProducerBuilder instancepublic ProducerBuilder withCertificateBundle(java.lang.String verifyCertBundle)
verifyCertBundle - CA Bundle chain certificates. This string shall be either the certificates themselves or
a path to a CA bundle file containing those certificates. The CA bundle is used to
validate that the certificate of the authentication server being connected to was signed
by a valid authority. If set to an empty string, the server certificate will not be
validated.ProducerBuilder instancepublic ProducerBuilder withHttpProxy(HttpProxySettings httpProxySettings)
httpProxySettings - contains http proxy hostname, port, username and password.ProducerBuilder instancepublic Producer build() throws TemporaryError
Producer object which only exposes the Channel.produce(ProducerRecords),
Channel.produce(String) and Channel.close() methodsTemporaryError - if Channel http client request object failed to be created.