Class SardineBuilder


  • public final class SardineBuilder
    extends Object
    Factory for creating Sardine instances. Supports credentials and timeouts (which the SardineFactory does not support).
    Since:
    7.1.0
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • SardineBuilder

        public SardineBuilder()
        A new builder for an AutoCloseable 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.