hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r774460 - in /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http: client/ client/params/ client/protocol/ conn/params/ cookie/ cookie/params/ impl/client/ impl/cookie/
Date Wed, 13 May 2009 18:13:50 GMT
Author: olegk
Date: Wed May 13 18:13:35 2009
New Revision: 774460

URL: http://svn.apache.org/viewvc?rev=774460&view=rev
Log:
Javadoc cleanups

Added:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/package.html   (with props)
Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/CookieStore.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParams.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ClientContext.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/Cookie.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieAttributeHandler.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieOrigin.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpecFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie2.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/package.html
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/package.html
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BasicClientCookie.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BasicClientCookie2.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpecFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965SpecFactory.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/CookieStore.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/CookieStore.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/CookieStore.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/CookieStore.java Wed May 13 18:13:35 2009
@@ -36,15 +36,15 @@
 import org.apache.http.cookie.Cookie;
 
 /**
- * Abstract cookie store.
- * 
+ * This interface represents an abstract store for {@link Cookie}
+ * objects.
  * 
  * @since 4.0
  */
 public interface CookieStore {
 
     /**
-     * Adds an {@link Cookie HTTP cookie}, replacing any existing equivalent cookies.
+     * Adds an {@link Cookie}, replacing any existing equivalent cookies.
      * If the given cookie has already expired it will not be added, but existing 
      * values will still be removed.
      * 
@@ -60,8 +60,8 @@
     List<Cookie> getCookies();
 
     /**
-     * Removes all of {@link Cookie cookies} in this store that have expired by 
-     * the specified {@link java.util.Date date}. 
+     * Removes all of {@link Cookie}s in this store that have expired by 
+     * the specified {@link java.util.Date}. 
      * 
      * @return true if any cookies were purged.
      */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientParamBean.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientParamBean.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientParamBean.java Wed May 13 18:13:35 2009
@@ -42,6 +42,9 @@
 import org.apache.http.params.HttpParams;
 
 /**
+ * This is a Java Bean class that can be used to wrap an instance of 
+ * {@link HttpParams} and manipulate HTTP client parameters using 
+ * Java Beans conventions.
  *
  * @since 4.0
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java Wed May 13 18:13:35 2009
@@ -34,6 +34,7 @@
 import net.jcip.annotations.Immutable;
 
 /**
+ * Standard cookie specifications supported by HttpClient. 
  *
  * @since 4.0
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParams.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParams.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParams.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParams.java Wed May 13 18:13:35 2009
@@ -37,9 +37,6 @@
 /**
  * An adaptor for accessing HTTP client parameters in {@link HttpParams}.
  * 
- * 
- * @version $Revision$
- * 
  * @since 4.0
  */
 @Immutable

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ClientContext.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ClientContext.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ClientContext.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ClientContext.java Wed May 13 18:13:35 2009
@@ -31,20 +31,39 @@
 
 package org.apache.http.client.protocol;
 
-
 /**
- * {@link org.apache.http.protocol.HttpContext Context}
- * attribute names for client.
+ * {@link org.apache.http.protocol.HttpContext} attribute names for 
+ * client side HTTP protocol processing.
  *
  * @since 4.0
  */
 public interface ClientContext {
     
+    /**
+     * Attribute name of a {@link org.apache.http.cookie.CookieSpecRegistry} 
+     * object that represents the actual cookie specification registry.
+     */
     public static final String COOKIESPEC_REGISTRY   = "http.cookiespec-registry"; 
-    public static final String AUTHSCHEME_REGISTRY   = "http.authscheme-registry"; 
-    public static final String COOKIE_STORE          = "http.cookie-store"; 
+
+    /**
+     * Attribute name of a {@link org.apache.http.cookie.CookieSpec} 
+     * object that represents the actual cookie specification.
+     */
     public static final String COOKIE_SPEC           = "http.cookie-spec"; 
+
+    /**
+     * Attribute name of a {@link org.apache.http.cookie.CookieOrigin} 
+     * object that represents the actual details of the origin server.
+     */
     public static final String COOKIE_ORIGIN         = "http.cookie-origin"; 
+    
+    /**
+     * Attribute name of a {@link org.apache.http.client.CookieStore} 
+     * object that represents the actual cookie store.
+     */
+    public static final String COOKIE_STORE          = "http.cookie-store"; 
+
+    public static final String AUTHSCHEME_REGISTRY   = "http.authscheme-registry"; 
     public static final String CREDS_PROVIDER        = "http.auth.credentials-provider"; 
     public static final String TARGET_AUTH_STATE     = "http.auth.target-scope"; 
     public static final String PROXY_AUTH_STATE      = "http.auth.proxy-scope";

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java Wed May 13 18:13:35 2009
@@ -62,10 +62,15 @@
 /**
  * Request interceptor that matches cookies available in the current
  * {@link CookieStore} to the request being executed and generates 
- * corresponding cookierequest headers.
- *
- *
- * @version $Revision$
+ * corresponding <code>Cookie</code> request headers.
+ * <p>
+ * The following parameters can be used to customize the behavior of this 
+ * class: 
+ * <ul>
+ *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
+ *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADER}</li>
+ *  <li>{@link org.apache.http.client.params.ClientPNames#COOKIE_POLICY}</li>
+ * </ul>
  * 
  * @since 4.0
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java Wed May 13 18:13:35 2009
@@ -54,9 +54,6 @@
 /**
  * Response interceptor that populates the current {@link CookieStore} with data 
  * contained in response cookies received in the given the HTTP response.
- *
- *
- * @version $Revision$
  * 
  * @since 4.0
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionParamBean.java Wed May 13 18:13:35 2009
@@ -37,9 +37,9 @@
 import org.apache.http.params.HttpParams;
 
 /**
- * Allows for setting parameters relating to connections on
- * {@link HttpParams}.  This class ensures that the values set on the params
- * are type-safe. 
+ * This is a Java Bean class that can be used to wrap an instance of 
+ * {@link HttpParams} and manipulate HTTP client connection parameters 
+ * using Java Beans conventions.
  *
  * @since 4.0
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java Wed May 13 18:13:35 2009
@@ -37,9 +37,9 @@
 import org.apache.http.params.HttpParams;
 
 /**
- * Allows for setting parameters relating to connection managers on
- * {@link HttpParams}.  This class ensures that the values set on the params
- * are type-safe. 
+ * This is a Java Bean class that can be used to wrap an instance of 
+ * {@link HttpParams} and manipulate connection manager parameters 
+ * using Java Beans conventions.
  *
  * @since 4.0
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java Wed May 13 18:13:35 2009
@@ -31,7 +31,7 @@
 package org.apache.http.conn.params;
 
 /**
- * Parameter names for routing in HttpConn.
+ * Parameter names for connection routing.
  * 
  * @since 4.0
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java Wed May 13 18:13:35 2009
@@ -41,9 +41,9 @@
 import org.apache.http.params.HttpParams;
 
 /**
- * Allows for setting parameters relating to connection routes on
- * {@link HttpParams}.  This class ensures that the values set on the params
- * are type-safe. 
+ * This is a Java Bean class that can be used to wrap an instance of 
+ * {@link HttpParams} and manipulate connection routing parameters 
+ * using Java Beans conventions.
  *
  * @since 4.0
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/Cookie.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/Cookie.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/Cookie.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/Cookie.java Wed May 13 18:13:35 2009
@@ -34,10 +34,10 @@
 import java.util.Date;
 
 /**
- * HTTP "magic-cookie" represents a piece of state information
- * that the HTTP agent and the target server can exchange to maintain 
- * a session.
- * 
+ * Cookie interface represents a token or short packet of state information 
+ * (also referred to as "magic-cookie") that the HTTP agent and the target 
+ * server can exchange to maintain a session. In its simples form an HTTP 
+ * cookie is merely a name / value pair.
  * 
  * @since 4.0
  */
@@ -91,14 +91,17 @@
     boolean isPersistent();
 
     /**
-     * Returns domain attribute of the cookie.
+     * Returns domain attribute of the cookie. The value of the Domain 
+     * attribute specifies the domain for which the cookie is valid.
      * 
-     * @return the value of the domain attribute
+     * @return the value of the domain attribute.
      */
     String getDomain();
 
     /**
-     * Returns the path attribute of the cookie
+     * Returns the path attribute of the cookie. The value of the Path 
+     * attribute specifies the subset of URLs on the origin server to which 
+     * this cookie applies.
      * 
      * @return The value of the path attribute.
      */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieAttributeHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieAttributeHandler.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieAttributeHandler.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieAttributeHandler.java Wed May 13 18:13:35 2009
@@ -31,7 +31,7 @@
 package org.apache.http.cookie;
 
 /**
- * Ths interface represents a cookie attribute handler responsible
+ * This interface represents a cookie attribute handler responsible
  * for parsing, validating, and matching a specific cookie attribute, 
  * such as path, domain, port, etc.
  *

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieIdentityComparator.java Wed May 13 18:13:35 2009
@@ -38,12 +38,9 @@
 
 /**
  * This cookie comparator can be used to compare identity of cookies.
- *  
  * <p>
  *  Cookies are considered identical if their names are equal and 
  *  their domain attributes match ignoring case.
- * </p>
- * 
  *
  * @since 4.0
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieOrigin.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieOrigin.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieOrigin.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieOrigin.java Wed May 13 18:13:35 2009
@@ -35,10 +35,9 @@
 import net.jcip.annotations.Immutable;
 
 /**
- * CookieOrigin class incapsulates details of an origin server that 
+ * CookieOrigin class encapsulates details of an origin server that 
  * are relevant when parsing, validating or matching HTTP cookies.
  * 
- * 
  * @since 4.0
  */
 @Immutable

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpecFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpecFactory.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpecFactory.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpecFactory.java Wed May 13 18:13:35 2009
@@ -34,12 +34,19 @@
 import org.apache.http.params.HttpParams;
 
 /**
- * 
+ * Factory for {@link CookieSpec} implementations. 
  *
  * @since 4.0
  */
 public interface CookieSpecFactory {    
 
+	/**
+	 * Creates an instance of {@link CookieSpec} using given HTTP parameters.
+	 * 
+	 * @param params HTTP parameters.
+	 * 
+	 * @return cookie spec.
+	 */
     CookieSpec newInstance(HttpParams params);
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie.java Wed May 13 18:13:35 2009
@@ -34,10 +34,9 @@
 import java.util.Date;
 
 /**
- * This interface represents a <code>SetCookie</code> response header sent by the 
+ * This interface represents a <code>Set-Cookie</code> response header sent by the 
  * origin server to the HTTP agent in order to maintain a conversational state.
  * 
- * 
  * @since 4.0
  */
 public interface SetCookie extends Cookie {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie2.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie2.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie2.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/SetCookie2.java Wed May 13 18:13:35 2009
@@ -32,10 +32,9 @@
 package org.apache.http.cookie;
 
 /**
- * This interface represents a <code>SetCookie2</code> response header sent by the 
+ * This interface represents a <code>Set-Cookie2</code> response header sent by the 
  * origin server to the HTTP agent in order to maintain a conversational state.
  * 
- * 
  * @since 4.0
  */
 public interface SetCookie2 extends SetCookie {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/package.html
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/package.html?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/package.html (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/package.html Wed May 13 18:13:35 2009
@@ -34,8 +34,6 @@
 -->
 </head>
 <body>
-The API for client-side state management via cookies,
-commonly referred to as <i>HttpCookie</i>.
-
+The API for client-side state management via cookies.
 </body>
 </html>

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java Wed May 13 18:13:35 2009
@@ -32,32 +32,30 @@
 package org.apache.http.cookie.params;
 
 /**
- * Parameter names for cookie specifications in HttpCookie.
- * 
- * 
- * @version $Revision$
+ * Parameter names for HTTP cookie management classes.
  * 
  * @since 4.0
  */
 public interface CookieSpecPNames {
 
     /**
-     * Parameter for the date patterns used for parsing.
+     * Defines valid date patterns to be used for parsing non-standard 
+     * <code>expires</code> attribute. Only required for compatibility 
+     * with non-compliant servers that still use <code>expires</code> 
+     * defined in the Netscape draft instead of the standard 
+     * <code>max-age</code> attribute.
      * <p>
      * This parameter expects a value of type {@link java.util.Collection}.
-     * The collection elements are of type {@link String}
-     * and must be compatible with the syntax of
-     * {@link java.text.SimpleDateFormat}.
+     * The collection elements must be of type {@link String} compatible 
+     * with the syntax of {@link java.text.SimpleDateFormat}.
      * </p>
      */
     public static final String DATE_PATTERNS = "http.protocol.cookie-datepatterns";
     
     /**
-     * Parameter for Cookie header formatting.
-     * Defines whether {@link org.apache.http.cookie.Cookie cookies}
-     * should be put on 
-     * a single {@link org.apache.http.Header request header}.
-     * If not, each cookie is formatted in a seperate Cookie header.
+     * Defines whether cookies should be forced into a single 
+     * <code>Cookie</code> request header. Otherwise, each cookie is formatted 
+     * as a separate <code>Cookie</code> header.
      * <p>
      * This parameter expects a value of type {@link Boolean}.
      * </p>

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecParamBean.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecParamBean.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecParamBean.java Wed May 13 18:13:35 2009
@@ -39,6 +39,9 @@
 import org.apache.http.params.HttpParams;
 
 /**
+ * This is a Java Bean class that can be used to wrap an instance of 
+ * {@link HttpParams} and manipulate HTTP cookie parameters using Java Beans 
+ * conventions.
  *
  * @since 4.0
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/package.html
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/package.html?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/package.html (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/package.html Wed May 13 18:13:35 2009
@@ -34,7 +34,7 @@
 -->
 </head>
 <body>
-Parameters for configuring <i>HttpCookie</i>.
-
+Parameters for configuring HTTP state management 
+related classes.
 </body>
 </html>

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractAuthenticationHandler.java Wed May 13 18:13:35 2009
@@ -32,6 +32,7 @@
 package org.apache.http.impl.client;
 
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -112,7 +113,7 @@
         return DEFAULT_SCHEME_PRIORITY;
     }
     
-    public AuthScheme selectScheme(
+	public AuthScheme selectScheme(
             final Map<String, Header> challenges, 
             final HttpResponse response,
             final HttpContext context) throws AuthenticationException {
@@ -123,7 +124,8 @@
             throw new IllegalStateException("AuthScheme registry not set in HTTP context");
         }
         
-        List<?> authPrefs = (List<?>) context.getAttribute(
+        @SuppressWarnings("unchecked")
+        Collection<String> authPrefs = (Collection<String>) context.getAttribute(
                 ClientContext.AUTH_SCHEME_PREF);
         if (authPrefs == null) {
             authPrefs = getAuthPreferences();
@@ -135,8 +137,7 @@
         }
 
         AuthScheme authScheme = null;
-        for (int i = 0; i < authPrefs.size(); i++) {
-            String id = (String) authPrefs.get(i);
+        for (String id: authPrefs) {
             Header challenge = challenges.get(id.toLowerCase(Locale.ENGLISH)); 
 
             if (challenge != null) {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java Wed May 13 18:13:35 2009
@@ -101,8 +101,23 @@
  * class: 
  * <ul>
  *  <li>{@link org.apache.http.params.CoreProtocolPNames#PROTOCOL_VERSION}</li>
+ *  <li>{@link org.apache.http.params.CoreProtocolPNames#STRICT_TRANSFER_ENCODING}</li>
+ *  <li>{@link org.apache.http.params.CoreProtocolPNames#HTTP_ELEMENT_CHARSET}</li>
+ *  <li>{@link org.apache.http.params.CoreProtocolPNames#USE_EXPECT_CONTINUE}</li>
+ *  <li>{@link org.apache.http.params.CoreProtocolPNames#WAIT_FOR_CONTINUE}</li>
+ *  <li>{@link org.apache.http.params.CoreProtocolPNames#USER_AGENT}</li>
+ *  <li>{@link org.apache.http.params.CoreConnectionPNames#SOCKET_BUFFER_SIZE}</li>
+ *  <li>{@link org.apache.http.params.CoreConnectionPNames#MAX_LINE_LENGTH}</li>
+ *  <li>{@link org.apache.http.params.CoreConnectionPNames#MAX_HEADER_COUNT}</li>
+ *  <li>{@link org.apache.http.params.CoreConnectionPNames#SO_TIMEOUT}</li>
+ *  <li>{@link org.apache.http.params.CoreConnectionPNames#SO_LINGER}</li>
+ *  <li>{@link org.apache.http.params.CoreConnectionPNames#TCP_NODELAY}</li>
+ *  <li>{@link org.apache.http.params.CoreConnectionPNames#CONNECTION_TIMEOUT}</li>
  *  <li>{@link org.apache.http.params.CoreConnectionPNames#STALE_CONNECTION_CHECK}</li>
  *  <li>{@link org.apache.http.conn.params.ConnManagerPNames#TIMEOUT}</li>
+ *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
+ *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADER}</li>
+ *  <li>{@link org.apache.http.client.params.ClientPNames#COOKIE_POLICY}</li>
  *  <li>{@link org.apache.http.client.params.ClientPNames#VIRTUAL_HOST}</li>
  *  <li>{@link org.apache.http.client.params.ClientPNames#MAX_REDIRECTS}</li>
  *  <li>{@link org.apache.http.client.params.ClientPNames#DEFAULT_HOST}</li>

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BasicClientCookie.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BasicClientCookie.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BasicClientCookie.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BasicClientCookie.java Wed May 13 18:13:35 2009
@@ -42,12 +42,7 @@
 import org.apache.http.cookie.SetCookie;
 
 /**
- * HTTP "magic-cookie" represents a piece of state information
- * that the HTTP agent and the target server can exchange to maintain 
- * a session.
- * 
- * 
- * @version $Revision$
+ * Default implementation of {@link SetCookie}.
  *
  * @since 4.0
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BasicClientCookie2.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BasicClientCookie2.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BasicClientCookie2.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BasicClientCookie2.java Wed May 13 18:13:35 2009
@@ -38,10 +38,7 @@
 import org.apache.http.cookie.SetCookie2;
 
 /**
- * HTTP "magic-cookie" represents a piece of state information
- * that the HTTP agent and the target server can exchange to maintain 
- * a session as specified by RFC2965.
- * 
+ * Default implementation of {@link SetCookie2}.
  *
  * @since 4.0
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpec.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpec.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpec.java Wed May 13 18:13:35 2009
@@ -43,9 +43,8 @@
 import org.apache.http.cookie.SetCookie2;
 
 /**
- * 'Meta' cookie specification that selects a cookie policy depending
- * on the format of the cookie(s)
- * 
+ * 'Meta' cookie specification that picks up a cookie policy based on 
+ * the format of cookies sent with the HTTP response.
  *
  * @since 4.0
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpecFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpecFactory.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpecFactory.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpecFactory.java Wed May 13 18:13:35 2009
@@ -31,6 +31,8 @@
 
 package org.apache.http.impl.cookie;
 
+import java.util.Collection;
+
 import net.jcip.annotations.Immutable;
 
 import org.apache.http.cookie.CookieSpec;
@@ -39,7 +41,15 @@
 import org.apache.http.params.HttpParams;
 
 /**
- * 
+ * {@link CookieSpecFactory} implementation that creates and initializes
+ * {@link BestMatchSpec} instances.
+ * <p>
+ * The following parameters can be used to customize the behavior of this 
+ * class: 
+ * <ul>
+ *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
+ *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADER}</li>
+ * </ul>
  *
  * @since 4.0
  */
@@ -48,9 +58,18 @@
 
     public CookieSpec newInstance(final HttpParams params) {
         if (params != null) {
-            return new BestMatchSpec(
-                    (String []) params.getParameter(CookieSpecPNames.DATE_PATTERNS), 
-                    params.getBooleanParameter(CookieSpecPNames.SINGLE_COOKIE_HEADER, false));
+        	
+        	String[] patterns = null;
+        	Collection<?> param = (Collection<?>) params.getParameter(
+        			CookieSpecPNames.DATE_PATTERNS);
+        	if (param != null) {
+        		patterns = new String[param.size()];
+        		patterns = param.toArray(patterns);
+        	}
+        	boolean singleHeader = params.getBooleanParameter(
+        			CookieSpecPNames.SINGLE_COOKIE_HEADER, false);        	
+        	
+            return new BestMatchSpec(patterns, singleHeader);
         } else {
             return new BestMatchSpec();
         }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java Wed May 13 18:13:35 2009
@@ -31,6 +31,8 @@
 
 package org.apache.http.impl.cookie;
 
+import java.util.Collection;
+
 import net.jcip.annotations.Immutable;
 
 import org.apache.http.cookie.CookieSpec;
@@ -39,7 +41,14 @@
 import org.apache.http.params.HttpParams;
 
 /**
- * 
+ * {@link CookieSpecFactory} implementation that creates and initializes
+ * {@link BrowserCompatSpec} instances.
+ * <p>
+ * The following parameters can be used to customize the behavior of this 
+ * class: 
+ * <ul>
+ *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
+ * </ul>
  *
  * @since 4.0
  */
@@ -48,8 +57,15 @@
 
     public CookieSpec newInstance(final HttpParams params) {
         if (params != null) {
-            return new BrowserCompatSpec(
-                    (String []) params.getParameter(CookieSpecPNames.DATE_PATTERNS));
+        	
+        	String[] patterns = null;
+        	Collection<?> param = (Collection<?>) params.getParameter(
+        			CookieSpecPNames.DATE_PATTERNS);
+        	if (param != null) {
+        		patterns = new String[param.size()];
+        		patterns = param.toArray(patterns);
+        	}
+            return new BrowserCompatSpec(patterns);
         } else {
             return new BrowserCompatSpec();
         }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpec.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpec.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpec.java Wed May 13 18:13:35 2009
@@ -49,8 +49,9 @@
 import org.apache.http.util.CharArrayBuffer;
 
 /**
- * Netscape cookie draft compliant cookie policy
- *
+ * This {@link CookieSpec} implementation conforms to the original draft 
+ * specification published by Netscape Communications. It should be avoided 
+ * unless absolutely necessary for compatibility with legacy code.
  * 
  * @since 4.0 
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java Wed May 13 18:13:35 2009
@@ -31,6 +31,8 @@
 
 package org.apache.http.impl.cookie;
 
+import java.util.Collection;
+
 import net.jcip.annotations.Immutable;
 
 import org.apache.http.cookie.CookieSpec;
@@ -39,7 +41,14 @@
 import org.apache.http.params.HttpParams;
 
 /**
- * 
+ * {@link CookieSpecFactory} implementation that creates and initializes
+ * {@link NetscapeDraftSpec} instances.
+ * <p>
+ * The following parameters can be used to customize the behavior of this 
+ * class: 
+ * <ul>
+ *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
+ * </ul>
  *
  * @since 4.0
  */
@@ -48,8 +57,15 @@
 
     public CookieSpec newInstance(final HttpParams params) {
         if (params != null) {
-            return new NetscapeDraftSpec(
-                    (String []) params.getParameter(CookieSpecPNames.DATE_PATTERNS));
+        	
+        	String[] patterns = null;
+        	Collection<?> param = (Collection<?>) params.getParameter(
+        			CookieSpecPNames.DATE_PATTERNS);
+        	if (param != null) {
+        		patterns = new String[param.size()];
+        		patterns = param.toArray(patterns);
+        	}
+            return new NetscapeDraftSpec(patterns);
         } else {
             return new NetscapeDraftSpec();
         }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java Wed May 13 18:13:35 2009
@@ -43,14 +43,18 @@
 import org.apache.http.cookie.Cookie;
 import org.apache.http.cookie.CookieOrigin;
 import org.apache.http.cookie.CookiePathComparator;
+import org.apache.http.cookie.CookieSpec;
 import org.apache.http.cookie.MalformedCookieException;
 import org.apache.http.cookie.SM;
 import org.apache.http.message.BufferedHeader;
 import org.apache.http.util.CharArrayBuffer;
 
 /**
- * RFC 2109 compliant cookie policy
- *
+ * RFC 2109 compliant {@link CookieSpec} implementation. This is an older
+ * version of the official HTTP state management specification superseded
+ * by RFC 2965.
+ * 
+ * @see RFC2965Spec
  * 
  * @since 4.0 
  */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java Wed May 13 18:13:35 2009
@@ -31,6 +31,8 @@
 
 package org.apache.http.impl.cookie;
 
+import java.util.Collection;
+
 import net.jcip.annotations.Immutable;
 
 import org.apache.http.cookie.CookieSpec;
@@ -39,7 +41,15 @@
 import org.apache.http.params.HttpParams;
 
 /**
- * 
+ * {@link CookieSpecFactory} implementation that creates and initializes
+ * {@link RFC2109Spec} instances.
+ * <p>
+ * The following parameters can be used to customize the behavior of this 
+ * class: 
+ * <ul>
+ *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
+ *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADER}</li>
+ * </ul>
  *
  * @since 4.0
  */
@@ -48,9 +58,18 @@
 
     public CookieSpec newInstance(final HttpParams params) {
         if (params != null) {
-            return new RFC2109Spec(
-                    (String []) params.getParameter(CookieSpecPNames.DATE_PATTERNS), 
-                    params.getBooleanParameter(CookieSpecPNames.SINGLE_COOKIE_HEADER, false));
+        	
+        	String[] patterns = null;
+        	Collection<?> param = (Collection<?>) params.getParameter(
+        			CookieSpecPNames.DATE_PATTERNS);
+        	if (param != null) {
+        		patterns = new String[param.size()];
+        		patterns = param.toArray(patterns);
+        	}
+        	boolean singleHeader = params.getBooleanParameter(
+        			CookieSpecPNames.SINGLE_COOKIE_HEADER, false);        	
+        	
+            return new RFC2109Spec(patterns, singleHeader);
         } else {
             return new RFC2109Spec();
         }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java Wed May 13 18:13:35 2009
@@ -43,16 +43,16 @@
 import org.apache.http.cookie.Cookie;
 import org.apache.http.cookie.CookieAttributeHandler;
 import org.apache.http.cookie.CookieOrigin;
+import org.apache.http.cookie.CookieSpec;
 import org.apache.http.cookie.MalformedCookieException;
 import org.apache.http.cookie.SM;
 import org.apache.http.message.BufferedHeader;
 import org.apache.http.util.CharArrayBuffer;
 
 /**
- * <p>RFC 2965 specific cookie management functions.</p>
- * 
+ * RFC 2965 compliant {@link CookieSpec} implementation.
  *
- * @since 3.1
+ * @since 4.0
  */
 public class RFC2965Spec extends RFC2109Spec {
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965SpecFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965SpecFactory.java?rev=774460&r1=774459&r2=774460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965SpecFactory.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965SpecFactory.java Wed May 13 18:13:35 2009
@@ -31,6 +31,8 @@
 
 package org.apache.http.impl.cookie;
 
+import java.util.Collection;
+
 import net.jcip.annotations.Immutable;
 
 import org.apache.http.cookie.CookieSpec;
@@ -39,7 +41,15 @@
 import org.apache.http.params.HttpParams;
 
 /**
- * 
+ * {@link CookieSpecFactory} implementation that creates and initializes
+ * {@link RFC2965Spec} instances.
+ * <p>
+ * The following parameters can be used to customize the behavior of this 
+ * class: 
+ * <ul>
+ *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
+ *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADER}</li>
+ * </ul>
  *
  * @since 4.0
  */
@@ -48,9 +58,18 @@
 
     public CookieSpec newInstance(final HttpParams params) {
         if (params != null) {
-            return new RFC2965Spec(
-                    (String []) params.getParameter(CookieSpecPNames.DATE_PATTERNS), 
-                    params.getBooleanParameter(CookieSpecPNames.SINGLE_COOKIE_HEADER, false));
+        	
+        	String[] patterns = null;
+        	Collection<?> param = (Collection<?>) params.getParameter(
+        			CookieSpecPNames.DATE_PATTERNS);
+        	if (param != null) {
+        		patterns = new String[param.size()];
+        		patterns = param.toArray(patterns);
+        	}
+        	boolean singleHeader = params.getBooleanParameter(
+        			CookieSpecPNames.SINGLE_COOKIE_HEADER, false);        	
+        	
+            return new RFC2965Spec(patterns, singleHeader);
         } else {
             return new RFC2965Spec();
         }

Added: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/package.html
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/package.html?rev=774460&view=auto
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/package.html (added)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/package.html Wed May 13 18:13:35 2009
@@ -0,0 +1,40 @@
+<html>
+<head>
+<!--
+/*
+ * $HeadURL:$
+ * $Revision:$
+ * $Date:$
+ *
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+-->
+</head>
+<body>
+Default implementations for interfaces in
+{@link org.apache.http.cookie org.apache.http.cookie}.
+</body>
+</html>

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/package.html
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message