Package com.googlecode.sardine

Source Code of com.googlecode.sardine.SardineFactory

package com.googlecode.sardine;

import com.googlecode.sardine.impl.SardineImpl;

import java.net.ProxySelector;

/**
* The perfect name for a class. Provides the static methods for working with the Sardine interface.
*
* @author jonstevens
* @version $Id: SardineFactory.java 327 2011-12-10 16:06:15Z dkocher@sudo.ch $
*/
public final class SardineFactory
{
    private SardineFactory() {}

  /**
   * Default begin() for when you don't need anything but no authentication
   * and default settings for SSL.
   */
  public static Sardine begin()
  {
    return begin(null, null);
  }

  /**
   * Pass in a HTTP Auth username/password for being used with all
   * connections
   *
   * @param username Use in authentication header credentials
   * @param password Use in authentication header credentials
   */
  public static Sardine begin(String username, String password)
  {
    return begin(username, password, null);
  }

  /**
   * @param username Use in authentication header credentials
   * @param password Use in authentication header credentials
   * @param proxy  Proxy configuration
   */
  public static Sardine begin(String username, String password, ProxySelector proxy)
  {
    return new SardineImpl(username, password, proxy);
  }
}
TOP

Related Classes of com.googlecode.sardine.SardineFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.