public class Ds3ClientBuilder extends java.lang.Object implements Builder<Ds3Client>
Ds3Client
.
For instance, the number of times that the Ds3Client instance will perform a 307 redirect before throwing an error
can be customized with the withRedirectRetries(int)
as well as
setting a proxy with withProxy(String)
.Modifier and Type | Method and Description |
---|---|
Ds3Client |
build()
Returns a new Ds3Client instance.
|
static Ds3ClientBuilder |
create(java.lang.String endpoint,
Credentials creds)
Returns a Builder which is used to customize the behavior of the Ds3Client library.
|
Ds3ClientBuilder |
withBufferSize(int bufferSize) |
Ds3ClientBuilder |
withCertificateVerification(boolean certificateVerification)
Specifies if the library should perform SSL certificate validation.
|
Ds3ClientBuilder |
withHttps(boolean secure)
Specifies if the library should use HTTP or HTTPS.
|
Ds3ClientBuilder |
withProxy(java.lang.String proxy)
Sets a HTTP proxy.
|
Ds3ClientBuilder |
withRedirectRetries(int retries)
Sets the number of retries the library will attempt to perform when it receives 307 redirects from a
DS3 appliance.
|
public static Ds3ClientBuilder create(java.lang.String endpoint, Credentials creds)
endpoint
- The DS3 endpoint the library should connect to.creds
- The Credentials
used for connecting to a DS3 endpoint.Ds3ClientImpl
object.public Ds3ClientBuilder withHttps(boolean secure)
secure
- True will use HTTPS, false will use HTTP.public Ds3ClientBuilder withBufferSize(int bufferSize)
bufferSize
- The size of the buffer to be used when writing content out to DS3.public Ds3ClientBuilder withCertificateVerification(boolean certificateVerification)
public Ds3ClientBuilder withProxy(java.lang.String proxy) throws java.lang.IllegalArgumentException
proxy
- The endpoint of the HTTP proxy.java.lang.IllegalArgumentException
- This will be thrown if the proxy endpoint is not a valid URI.public Ds3ClientBuilder withRedirectRetries(int retries)
retries
- The number of times the library should perform retries on 307.