Package de.xima.fc.webdav
Class SardineBuilder
- java.lang.Object
-
- de.xima.fc.webdav.SardineBuilder
-
public final class SardineBuilder extends Object
Factory for creating Sardine instances. Supports credentials and timeouts (which theSardineFactory
does not support).- Since:
- 7.1.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description SardineBuilder()
A new builder for anAutoCloseable
Sardine
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SardineBuilder
authUsernamePassword(String username, String password)
AutoClosableSardine
build()
SardineBuilder
connectionTimeout(Duration connectionTimeout)
SardineBuilder
readTimeout(Duration readTimeout)
-
-
-
Constructor Detail
-
SardineBuilder
public SardineBuilder()
A new builder for anAutoCloseable
Sardine
instance.
-
-
Method Detail
-
authUsernamePassword
public SardineBuilder authUsernamePassword(String username, String password)
- Parameters:
username
- Username for a HTTP basic authentication against the WebDAV server.password
- Password for a HTTP basic authentication against the WebDAV server.- Returns:
- This builder instance for chaining method calls.
-
build
public AutoClosableSardine build()
- Returns:
- A new
Sardine
instance for the current configuration.
-
connectionTimeout
public SardineBuilder connectionTimeout(Duration connectionTimeout)
- Parameters:
connectionTimeout
- Timeout for establishing a connection to the WebDAV server.- Returns:
- This builder instance for chaining method calls.
-
readTimeout
public SardineBuilder readTimeout(Duration readTimeout)
- Parameters:
readTimeout
- Timeout for reading data from the WebDAV server.- Returns:
- This builder instance for chaining method calls.
-
-