You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ro...@apache.org on 2007/09/16 12:25:05 UTC
svn commit: r576068 - in
/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http:
auth/params/ client/params/ conn/params/ cookie/params/ impl/auth/
impl/client/ impl/conn/ impl/cookie/
Author: rolandw
Date: Sun Sep 16 03:25:01 2007
New Revision: 576068
URL: http://svn.apache.org/viewvc?rev=576068&view=rev
Log:
parameter names in interfaces, part 1
Added:
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/auth/params/AuthPNames.java (with props)
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/AllClientPNames.java (with props)
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/ClientPNames.java (with props)
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java (with props)
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java (with props)
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java (with props)
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java
- copied, changed from r576064, jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/params/CookieSpecParams.java
Removed:
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/params/CookieSpecParams.java
Modified:
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/auth/params/AuthParams.java
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/HttpClientParams.java
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/HttpConnectionManagerParams.java
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/auth/DigestScheme.java
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultAuthenticationHandler.java
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultRedirectHandler.java
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultResponseParser.java
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java
Added: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/auth/params/AuthPNames.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/auth/params/AuthPNames.java?rev=576068&view=auto
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/auth/params/AuthPNames.java (added)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/auth/params/AuthPNames.java Sun Sep 16 03:25:01 2007
@@ -0,0 +1,60 @@
+/*
+ * $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/>.
+ *
+ */
+
+package org.apache.http.auth.params;
+
+import org.apache.http.params.HttpParams;
+import org.apache.http.protocol.HTTP;
+
+
+/**
+ * Parameter names for HttpAuth.
+ *
+ * @version $Revision$
+ *
+ * @since 4.0
+ */
+public interface AuthPNames {
+
+ /**
+ * Defines the charset to be used when encoding
+ * {@link org.apache.http.auth.Credentials}.
+ * <p>
+ * This parameter expects a value of type {@link String}.
+ * If not defined, then
+ * {@link org.apache.http.params.HttpProtocolParams#HTTP_ELEMENT_CHARSET
+ * HttpProtocolParams.HTTP_ELEMENT_CHARSET}
+ * should be used.
+ * </p>
+ */
+ public static final String CREDENTIAL_CHARSET = "http.auth.credential-charset";
+
+}
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/auth/params/AuthPNames.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/auth/params/AuthPNames.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/auth/params/AuthPNames.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/auth/params/AuthParams.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/auth/params/AuthParams.java?rev=576068&r1=576067&r2=576068&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/auth/params/AuthParams.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/auth/params/AuthParams.java Sun Sep 16 03:25:01 2007
@@ -43,49 +43,44 @@
* @version $Revision$
*
* @since 4.0
+ *
+ * @see AuthPNames
*/
public final class AuthParams {
- /**
- * Defines the charset to be used when encoding
- * {@link org.apache.http.auth.Credentials}.
- * If not defined then the
- * {@link org.apache.http.params.HttpProtocolParams#HTTP_ELEMENT_CHARSET
- * HttpProtocolParams.HTTP_ELEMENT_CHARSET}
- * should be used.
- * <p>
- * This parameter expects a value of type {@link String}.
- * </p>
- */
- public static final String CREDENTIAL_CHARSET = "http.protocol.credential-charset";
-
-
private AuthParams() {
super();
}
/**
- * Defines the charset to be used when encoding
+ * Obtains the charset for encoding
* {@link org.apache.http.auth.Credentials}.
* If not configured,
* {@link HTTP#DEFAULT_PROTOCOL_CHARSET HTTP.DEFAULT_PROTOCOL_CHARSET}
* is used instead.
*
* @return The charset
+ *
+ * @see AuthPNames#CREDENTIAL_CHARSET
*/
public static String getCredentialCharset(final HttpParams params) {
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
- String charset = (String) params.getParameter(CREDENTIAL_CHARSET);
+ String charset = (String) params.getParameter
+ (AuthPNames.CREDENTIAL_CHARSET);
+ //@@@ TODO: inconsistent with JavaDoc in AuthPNames,
+ //@@@ TODO: check HTTP_ELEMENT_CHARSET first, or fix JavaDocs
if (charset == null) {
charset = HTTP.DEFAULT_PROTOCOL_CHARSET;
}
return charset;
}
-
+
+
/**
- * Sets the charset to be used when encoding {@link org.apache.http.auth.Credentials}.
+ * Sets the charset to be used when encoding
+ * {@link org.apache.http.auth.Credentials}.
*
* @param charset The charset
*/
@@ -93,7 +88,7 @@
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
- params.setParameter(CREDENTIAL_CHARSET, charset);
+ params.setParameter(AuthPNames.CREDENTIAL_CHARSET, charset);
}
}
Added: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/AllClientPNames.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/AllClientPNames.java?rev=576068&view=auto
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/AllClientPNames.java (added)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/AllClientPNames.java Sun Sep 16 03:25:01 2007
@@ -0,0 +1,62 @@
+/*
+ * $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/>.
+ *
+ */
+
+package org.apache.http.client.params;
+
+
+import org.apache.http.auth.params.AuthPNames;
+import org.apache.http.cookie.params.CookieSpecPNames;
+import org.apache.http.conn.params.ConnManagerPNames;
+import org.apache.http.conn.params.ConnConnectionPNames;
+import org.apache.http.conn.params.ConnRoutePNames;
+
+
+/**
+ * Collected parameter names for the HttpClient module.
+ * This interface combines the parameter definitions of the HttpClient
+ * module and all dependency modules or informational units.
+ * It does not define additional parameter names, but references
+ * other interfaces defining parameter names.
+ * <br/>
+ * This interface is meant as a navigation aid for developers.
+ * When referring to parameter names, you should use the interfaces
+ * in which the respective constants are actually defined.
+ *
+ * @version $Revision$
+ *
+ * @since 4.0
+ */
+public interface AllClientPNames extends
+ ClientPNames, AuthPNames, CookieSpecPNames,
+ ConnConnectionPNames, ConnManagerPNames, ConnRoutePNames {
+
+ // no additional definitions
+}
+
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/AllClientPNames.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/AllClientPNames.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/AllClientPNames.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/ClientPNames.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/ClientPNames.java?rev=576068&view=auto
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/ClientPNames.java (added)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/ClientPNames.java Sun Sep 16 03:25:01 2007
@@ -0,0 +1,167 @@
+/*
+ * $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/>.
+ *
+ */
+
+package org.apache.http.client.params;
+
+
+/**
+ * Parameter names for the HttpClient module.
+ * This does not include parameters for informational units
+ * HttpAuth, HttpCookie, or HttpConn.
+ *
+ * @version $Revision$
+ *
+ * @since 4.0
+ */
+public interface ClientPNames {
+
+ /**
+ * Defines the timeout in milliseconds used when retrieving an instance of
+ * {@link org.apache.http.conn.ManagedClientConnection} from the
+ * {@link org.apache.http.conn.ClientConnectionManager}.
+ * <p>
+ * This parameter expects a value of type {@link Long}.
+ * </p>
+ */
+ public static final String CONNECTION_MANAGER_TIMEOUT = "http.connection-manager.timeout";
+
+ /**
+ * Defines the class name of the default {@link org.apache.http.conn.ClientConnectionManager}
+ * <p>
+ * This parameter expects a value of type {@link String}.
+ * </p>
+ */
+ public static final String CONNECTION_MANAGER_FACTORY = "http.connection-manager.factory";
+
+ /**
+ * Defines whether redirects should be handled automatically
+ * <p>
+ * This parameter expects a value of type {@link Boolean}.
+ * </p>
+ */
+ public static final String HANDLE_REDIRECTS = "http.protocol.handle-redirects";
+
+ /**
+ * Defines whether relative redirects should be rejected.
+ * <p>
+ * This parameter expects a value of type {@link Boolean}.
+ * </p>
+ */
+ public static final String REJECT_RELATIVE_REDIRECT = "http.protocol.reject-relative-redirect";
+
+ /**
+ * Defines the maximum number of redirects to be followed.
+ * The limit on number of redirects is intended to prevent infinite loops.
+ * <p>
+ * This parameter expects a value of type {@link Integer}.
+ * </p>
+ */
+ public static final String MAX_REDIRECTS = "http.protocol.max-redirects";
+
+ /**
+ * Defines whether circular redirects (redirects to the same location) should be allowed.
+ * The HTTP spec is not sufficiently clear whether circular redirects are permitted,
+ * therefore optionally they can be enabled
+ * <p>
+ * This parameter expects a value of type {@link Boolean}.
+ * </p>
+ */
+ public static final String ALLOW_CIRCULAR_REDIRECTS = "http.protocol.allow-circular-redirects";
+
+ /**
+ * Defines whether authentication should be handled automatically.
+ * <p>
+ * This parameter expects a value of type {@link Boolean}.
+ * </p>
+ */
+ public static final String HANDLE_AUTHENTICATION = "http.protocol.handle-authentication";
+
+ /**
+ * Defines whether authentication should be attempted preemptively.
+ * <p>
+ * This parameter expects a value of type {@link Boolean}.
+ * </p>
+ */
+ public static final String PREEMPTIVE_AUTHENTICATION = "http.protocol.authentication-preemptive";
+
+ /**
+ * The key used to look up the list of IDs of supported
+ * {@link AuthPolicy authentication schemes} in their order of preference.
+ * The scheme IDs are stored in a {@link java.util.Collection} as
+ * instances of {@link java.lang.String}.
+ *
+ * <p>
+ * If several schemes are returned in the <tt>WWW-Authenticate</tt>
+ * or <tt>Proxy-Authenticate</tt> header, this parameter defines which
+ * {@link AuthPolicy authentication schemes} takes precedence over others.
+ * The first item in the collection represents the most preferred
+ * {@link AuthPolicy authentication scheme}, the last item represents
+ * the ID of the least preferred one.
+ * </p>
+ */
+ public static final String AUTH_SCHEME_PRIORITY = "http.protocol-auth-scheme-priority";
+
+ /**
+ * Defines the name of the cookie specification to be used for HTTP state management.
+ * <p>
+ * This parameter expects a value of type {@link String}.
+ * </p>
+ */
+ public static final String COOKIE_POLICY = "http.protocol.cookie-policy";
+
+ /**
+ * Defines the virtual host name.
+ * <p>
+ * This parameter expects a value of type {@link org.apache.http.HttpHost}.
+ * </p>
+ */
+ public static final String VIRTUAL_HOST = "http.virtual-host";
+
+ /**
+ * Defines the request headers to be sent per default with each request.
+ * <p>
+ * This parameter expects a value of type {@link java.util.Collection}. The
+ * collection is expected to contain {@link org.apache.http.Header}s.
+ * </p>
+ */
+ public static final String DEFAULT_HEADERS = "http.default-headers";
+
+ /**
+ * Defines the default host. The default value will be used if the target host is
+ * not explicitly specified in the request URI.
+ * <p>
+ * This parameter expects a value of type {@link org.apache.http.HttpHost}.
+ * </p>
+ */
+ public static final String DEFAULT_HOST = "http.default-host";
+
+
+}
+
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/ClientPNames.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/ClientPNames.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/ClientPNames.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/HttpClientParams.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/HttpClientParams.java?rev=576068&r1=576067&r2=576068&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/HttpClientParams.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/params/HttpClientParams.java Sun Sep 16 03:25:01 2007
@@ -51,7 +51,7 @@
* This parameter expects a value of type {@link Long}.
* </p>
*/
- public static final String CONNECTION_MANAGER_TIMEOUT = "http.connection-manager.timeout";
+ public static final String xxxCONNECTION_MANAGER_TIMEOUT = "http.connection-manager.timeout";
/**
* Defines the class name of the default {@link org.apache.http.conn.ClientConnectionManager}
@@ -59,7 +59,7 @@
* This parameter expects a value of type {@link String}.
* </p>
*/
- public static final String CONNECTION_MANAGER_FACTORY = "http.connection-manager.factory";
+ public static final String xxxCONNECTION_MANAGER_FACTORY = "http.connection-manager.factory";
/**
* Defines whether redirects should be handled automatically
@@ -67,7 +67,7 @@
* This parameter expects a value of type {@link Boolean}.
* </p>
*/
- public static final String HANDLE_REDIRECTS = "http.protocol.handle-redirects";
+ public static final String xxxHANDLE_REDIRECTS = "http.protocol.handle-redirects";
/**
* Defines whether relative redirects should be rejected.
@@ -75,7 +75,7 @@
* This parameter expects a value of type {@link Boolean}.
* </p>
*/
- public static final String REJECT_RELATIVE_REDIRECT = "http.protocol.reject-relative-redirect";
+ public static final String xxxREJECT_RELATIVE_REDIRECT = "http.protocol.reject-relative-redirect";
/**
* Defines the maximum number of redirects to be followed.
@@ -84,7 +84,7 @@
* This parameter expects a value of type {@link Integer}.
* </p>
*/
- public static final String MAX_REDIRECTS = "http.protocol.max-redirects";
+ public static final String xxxMAX_REDIRECTS = "http.protocol.max-redirects";
/**
* Defines whether circular redirects (redirects to the same location) should be allowed.
@@ -94,7 +94,7 @@
* This parameter expects a value of type {@link Boolean}.
* </p>
*/
- public static final String ALLOW_CIRCULAR_REDIRECTS = "http.protocol.allow-circular-redirects";
+ public static final String xxxALLOW_CIRCULAR_REDIRECTS = "http.protocol.allow-circular-redirects";
/**
* Defines whether authentication should be handled automatically.
@@ -102,7 +102,7 @@
* This parameter expects a value of type {@link Boolean}.
* </p>
*/
- public static final String HANDLE_AUTHENTICATION = "http.protocol.handle-authentication";
+ public static final String xxxHANDLE_AUTHENTICATION = "http.protocol.handle-authentication";
/**
* Defines whether authentication should be attempted preemptively.
@@ -110,7 +110,7 @@
* This parameter expects a value of type {@link Boolean}.
* </p>
*/
- public static final String PREEMPTIVE_AUTHENTICATION = "http.protocol.authentication-preemptive";
+ public static final String xxxPREEMPTIVE_AUTHENTICATION = "http.protocol.authentication-preemptive";
/**
* The key used to look up the list of IDs of supported
@@ -127,7 +127,7 @@
* the ID of the least preferred one.
* </p>
*/
- public static final String AUTH_SCHEME_PRIORITY = "http.protocol-auth-scheme-priority";
+ public static final String xxxAUTH_SCHEME_PRIORITY = "http.protocol-auth-scheme-priority";
/**
* Defines the name of the cookie specification to be used for HTTP state management.
@@ -135,7 +135,7 @@
* This parameter expects a value of type {@link String}.
* </p>
*/
- public static final String COOKIE_POLICY = "http.protocol.cookie-policy";
+ public static final String xxxCOOKIE_POLICY = "http.protocol.cookie-policy";
/**
* Defines the virtual host name.
@@ -143,7 +143,7 @@
* This parameter expects a value of type {@link org.apache.http.HttpHost}.
* </p>
*/
- public static final String VIRTUAL_HOST = "http.virtual-host";
+ public static final String xxxVIRTUAL_HOST = "http.virtual-host";
/**
* Defines the request headers to be sent per default with each request.
@@ -152,7 +152,7 @@
* collection is expected to contain {@link org.apache.http.Header}s.
* </p>
*/
- public static final String DEFAULT_HEADERS = "http.default-headers";
+ public static final String xxxDEFAULT_HEADERS = "http.default-headers";
/**
* Defines the default host. The default value will be used if the target host is
@@ -161,7 +161,7 @@
* This parameter expects a value of type {@link org.apache.http.HttpHost}.
* </p>
*/
- public static final String DEFAULT_HOST = "http.default-host";
+ public static final String xxxDEFAULT_HOST = "http.default-host";
private HttpClientParams() {
super();
@@ -178,7 +178,8 @@
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
- return params.getLongParameter(CONNECTION_MANAGER_TIMEOUT, 0);
+ return params.getLongParameter
+ (ClientPNames.CONNECTION_MANAGER_TIMEOUT, 0);
}
/**
@@ -192,35 +193,40 @@
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
- params.setLongParameter(CONNECTION_MANAGER_TIMEOUT, timeout);
+ params.setLongParameter
+ (ClientPNames.CONNECTION_MANAGER_TIMEOUT, timeout);
}
public static boolean isRedirecting(final HttpParams params) {
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
- return params.getBooleanParameter(HANDLE_REDIRECTS, true);
+ return params.getBooleanParameter
+ (ClientPNames.HANDLE_REDIRECTS, true);
}
public static void setRedirecting(final HttpParams params, boolean value) {
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
- params.setBooleanParameter(HANDLE_REDIRECTS, value);
+ params.setBooleanParameter
+ (ClientPNames.HANDLE_REDIRECTS, value);
}
public static boolean isAuthenticating(final HttpParams params) {
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
- return params.getBooleanParameter(HANDLE_AUTHENTICATION, true);
+ return params.getBooleanParameter
+ (ClientPNames.HANDLE_AUTHENTICATION, true);
}
public static void setAuthenticating(final HttpParams params, boolean value) {
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
- params.setBooleanParameter(HANDLE_AUTHENTICATION, value);
+ params.setBooleanParameter
+ (ClientPNames.HANDLE_AUTHENTICATION, value);
}
/**
@@ -234,7 +240,8 @@
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
- return params.getBooleanParameter(PREEMPTIVE_AUTHENTICATION, false);
+ return params.getBooleanParameter
+ (ClientPNames.PREEMPTIVE_AUTHENTICATION, false);
}
/**
@@ -247,14 +254,16 @@
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
- params.setBooleanParameter(PREEMPTIVE_AUTHENTICATION, value);
+ params.setBooleanParameter
+ (ClientPNames.PREEMPTIVE_AUTHENTICATION, value);
}
public static String getCookiePolicy(final HttpParams params) {
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
- String cookiePolicy = (String) params.getParameter(COOKIE_POLICY);
+ String cookiePolicy = (String)
+ params.getParameter(ClientPNames.COOKIE_POLICY);
if (cookiePolicy == null) {
return CookiePolicy.BROWSER_COMPATIBILITY;
}
@@ -265,7 +274,7 @@
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
- params.setParameter(COOKIE_POLICY, cookiePolicy);
+ params.setParameter(ClientPNames.COOKIE_POLICY, cookiePolicy);
}
}
Added: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java?rev=576068&view=auto
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java (added)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java Sun Sep 16 03:25:01 2007
@@ -0,0 +1,65 @@
+/*
+ * $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/>.
+ *
+ */
+
+package org.apache.http.conn.params;
+
+
+/**
+ * Parameter names for connections in HttpConn.
+ *
+ * @version $Revision$
+ *
+ * @since 4.0
+ */
+public interface ConnConnectionPNames {
+
+
+ /**
+ * Defines the maximum number of ignorable lines before we expect
+ * a HTTP response's status line.
+ * <p>
+ * With HTTP/1.1 persistent connections, the problem arises that
+ * broken scripts could return a wrong Content-Length
+ * (there are more bytes sent than specified).
+ * Unfortunately, in some cases, this cannot be detected after the
+ * bad response, but only before the next one.
+ * So HttpClient must be able to skip those surplus lines this way.
+ * </p>
+ * <p>
+ * This parameter expects a value of type {@link Integer}.
+ * 0 disallows all garbage/empty lines before the status line.
+ * Use {@link java.lang.Integer#MAX_VALUE} for unlimited
+ * (default in lenient mode).
+ * </p>
+ */
+ public static final String MAX_STATUS_LINE_GARBAGE = "http.connection.max-status-line-garbage";
+
+
+}
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java?rev=576068&view=auto
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java (added)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java Sun Sep 16 03:25:01 2007
@@ -0,0 +1,68 @@
+/*
+ * $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/>.
+ *
+ */
+
+package org.apache.http.conn.params;
+
+
+/**
+ * Parameter names for connection managers in HttpConn.
+ *
+ * @version $Revision$
+ *
+ * @since 4.0
+ */
+public interface ConnManagerPNames {
+
+
+
+ /**
+ * Defines the maximum number of connections to a host.
+ * This limit is interpreted by client connection managers
+ * and applies to individual manager instances.
+ * <p>
+ * This parameter expects a value of type {@link java.util.Map}.
+ * The value should map instances of {@link org.apache.http.conn.HttpRoute}
+ * to {@link Integer integers}.
+ * The default value is mapped to a special, private key.
+ * </p>
+ */
+ public static final String MAX_HOST_CONNECTIONS = "http.connection-manager.max-per-host";
+
+ /**
+ * Defines the maximum number of connections in total.
+ * This limit is interpreted by client connection managers
+ * and applies to individual manager instances.
+ * <p>
+ * This parameter expects a value of type {@link Integer}.
+ * </p>
+ */
+ public static final String MAX_TOTAL_CONNECTIONS = "http.connection-manager.max-total";
+
+}
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java?rev=576068&view=auto
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java (added)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java Sun Sep 16 03:25:01 2007
@@ -0,0 +1,56 @@
+/*
+ * $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/>.
+ *
+ */
+
+package org.apache.http.conn.params;
+
+import org.apache.http.params.HttpParams;
+
+/**
+ * Parameter names for routing in HttpConn.
+ *
+ * @version $Revision$
+ *
+ * @since 4.0
+ */
+public interface ConnRoutePNames {
+
+ /**
+ * Parameter for the default proxy.
+ * The default value will be used by some
+ * {@link org.apache.http.conn.HttpRoutePlanner HttpRoutePlanner}
+ * implementations, in particular the default implementation.
+ * <p>
+ * This parameter expects a value of type {@link org.apache.http.HttpHost}.
+ * </p>
+ */
+ public static final String DEFAULT_PROXY = "http.default-proxy";
+
+}
+
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/HttpConnectionManagerParams.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/HttpConnectionManagerParams.java?rev=576068&r1=576067&r2=576068&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/HttpConnectionManagerParams.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/HttpConnectionManagerParams.java Sun Sep 16 03:25:01 2007
@@ -47,6 +47,8 @@
* @version $Revision$
*
* @since 4.0
+ *
+ * @see ConnManagerPNames
*/
public final class HttpConnectionManagerParams {
@@ -60,54 +62,13 @@
private static final String ROUTE_DEFAULT = "*Route*Default*";
- /**
- * Defines the maximum number of connections allowed per host configuration.
- * These values only apply to the number of connections from a particular instance
- * of HttpConnectionManager.
- * <p>
- * This parameter expects a value of type {@link java.util.Map}. The value
- * should map instances of {@link HttpRoute}
- * to {@link Integer integers}.
- * The default value is mapped to a special, private key.
- * </p>
- */
- public static final String MAX_HOST_CONNECTIONS = "http.connection-manager.max-per-host";
-
- /**
- * Defines the maximum number of connections allowed overall. This value only applies
- * to the number of connections from a particular instance of HttpConnectionManager.
- * <p>
- * This parameter expects a value of type {@link Integer}.
- * </p>
- */
- public static final String MAX_TOTAL_CONNECTIONS = "http.connection-manager.max-total";
-
- /**
- * Defines the maximum number of ignorable lines before we expect
- * a HTTP response's status code.
- * <p>
- * With HTTP/1.1 persistent connections, the problem arises that
- * broken scripts could return a wrong Content-Length
- * (there are more bytes sent than specified).<br />
- * Unfortunately, in some cases, this is not possible after the bad response,
- * but only before the next one. <br />
- * So, HttpClient must be able to skip those surplus lines this way.
- * </p>
- * <p>
- * Set this to 0 to disallow any garbage/empty lines before the status line.<br />
- * To specify no limit, use {@link java.lang.Integer#MAX_VALUE} (default in lenient mode).
- * </p>
- *
- * This parameter expects a value of type {@link Integer}.
- */
- public static final String MAX_STATUS_LINE_GARBAGE = "http.connection.max-status-line-garbage";
/**
* Sets the default maximum number of connections allowed for routes.
*
* @param max The default maximum.
*
- * @see #MAX_HOST_CONNECTIONS
+ * @see ConnManagerPNames#MAX_HOST_CONNECTIONS
*/
public static void setDefaultMaxConnectionsPerHost(final HttpParams params,
final int max) {
@@ -121,7 +82,7 @@
* @param max the maximum number of connections,
* must be greater than 0
*
- * @see #MAX_HOST_CONNECTIONS
+ * @see ConnManagerPNames#MAX_HOST_CONNECTIONS
*/
public static void setMaxConnectionsPerHost(final HttpParams params,
final HttpRoute route,
@@ -153,7 +114,8 @@
("The maximum must be greater than 0.");
}
- Map currentValues = (Map) params.getParameter(MAX_HOST_CONNECTIONS);
+ Map currentValues = (Map) params.getParameter
+ (ConnManagerPNames.MAX_HOST_CONNECTIONS);
// param values are meant to be immutable so we'll make a copy
// to modify
Map newValues = null;
@@ -163,7 +125,7 @@
newValues = new HashMap(currentValues);
}
newValues.put(key, new Integer(max));
- params.setParameter(MAX_HOST_CONNECTIONS, newValues);
+ params.setParameter(ConnManagerPNames.MAX_HOST_CONNECTIONS, newValues);
}
@@ -173,7 +135,7 @@
*
* @return The default maximum.
*
- * @see #MAX_HOST_CONNECTIONS
+ * @see ConnManagerPNames#MAX_HOST_CONNECTIONS
*/
public static int getDefaultMaxConnectionsPerHost(
final HttpParams params) {
@@ -189,7 +151,7 @@
*
* @return The maximum number of connections allowed for the given route.
*
- * @see #MAX_HOST_CONNECTIONS
+ * @see ConnManagerPNames#MAX_HOST_CONNECTIONS
*/
public static int getMaxConnectionsPerHost(final HttpParams params,
final HttpRoute route) {
@@ -221,7 +183,8 @@
// if neither a specific nor a default maximum is configured...
int result = DEFAULT_MAX_HOST_CONNECTIONS;
- Map m = (Map) params.getParameter(MAX_HOST_CONNECTIONS);
+ Map m = (Map) params.getParameter
+ (ConnManagerPNames.MAX_HOST_CONNECTIONS);
if (m != null) {
Integer max = (Integer) m.get(key);
if ((max == null) && (key != ROUTE_DEFAULT)) {
@@ -242,7 +205,7 @@
*
* @param maxTotalConnections The maximum number of connections allowed.
*
- * @see #MAX_TOTAL_CONNECTIONS
+ * @see ConnManagerPNames#MAX_TOTAL_CONNECTIONS
*/
public static void setMaxTotalConnections(
final HttpParams params,
@@ -252,7 +215,7 @@
("HTTP parameters must not be null.");
}
params.setIntParameter(
- HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS,
+ ConnManagerPNames.MAX_TOTAL_CONNECTIONS,
maxTotalConnections);
}
@@ -261,7 +224,7 @@
*
* @return The maximum number of connections allowed.
*
- * @see #MAX_TOTAL_CONNECTIONS
+ * @see ConnManagerPNames#MAX_TOTAL_CONNECTIONS
*/
public static int getMaxTotalConnections(
final HttpParams params) {
@@ -270,7 +233,7 @@
("HTTP parameters must not be null.");
}
return params.getIntParameter(
- HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS,
+ ConnManagerPNames.MAX_TOTAL_CONNECTIONS,
DEFAULT_MAX_TOTAL_CONNECTIONS);
}
Copied: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java (from r576064, jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/params/CookieSpecParams.java)
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java?p2=jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java&p1=jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/params/CookieSpecParams.java&r1=576064&r2=576068&rev=576068&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/params/CookieSpecParams.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java Sun Sep 16 03:25:01 2007
@@ -33,9 +33,9 @@
import org.apache.http.params.HttpParams;
+
/**
- * This class implements an adaptor around the {@link HttpParams} interface
- * to simplify manipulation of cookie management specific parameters.
+ * Parameter names for cookie specifications in HttpCookie.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
@@ -43,21 +43,25 @@
*
* @since 4.0
*/
-public final class CookieSpecParams {
+public interface CookieSpecPNames {
/**
- * The key used to look up the date patterns used for parsing. The String patterns are stored
- * in a {@link java.util.Collection} and must be compatible with
- * {@link java.text.SimpleDateFormat}.
+ * Parameter for the date patterns used for parsing.
* <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}.
* </p>
*/
public static final String DATE_PATTERNS = "http.protocol.cookie-datepatterns";
/**
- * Defines whether {@link org.apache.http.cookie.Cookie cookies} should be put on
+ * 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.
* <p>
* This parameter expects a value of type {@link Boolean}.
* </p>
Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/auth/DigestScheme.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/auth/DigestScheme.java?rev=576068&r1=576067&r2=576068&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/auth/DigestScheme.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/auth/DigestScheme.java Sun Sep 16 03:25:01 2007
@@ -58,7 +58,8 @@
* </p>
* <p>
* Credential charset is configured via the
- * {@link AuthParams#CREDENTIAL_CHARSET credential charset} parameter.
+ * {@link org.apache.http.auth.params.AuthPNames#CREDENTIAL_CHARSET
+ * credential charset} parameter.
* Since the digest username is included as clear text in the generated
* Authentication header, the charset of the username must be compatible
* with the
Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultAuthenticationHandler.java?rev=576068&r1=576067&r2=576068&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultAuthenticationHandler.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultAuthenticationHandler.java Sun Sep 16 03:25:01 2007
@@ -50,7 +50,7 @@
import org.apache.http.auth.AuthenticationException;
import org.apache.http.auth.MalformedChallengeException;
import org.apache.http.client.AuthenticationHandler;
-import org.apache.http.client.params.HttpClientParams;
+import org.apache.http.client.params.ClientPNames;
import org.apache.http.client.protocol.ClientContext;
import org.apache.http.params.HttpParams;
import org.apache.http.protocol.HTTP;
@@ -160,7 +160,7 @@
HttpParams params = response.getParams();
Collection authPrefs = (Collection) params.getParameter(
- HttpClientParams.AUTH_SCHEME_PRIORITY);
+ ClientPNames.AUTH_SCHEME_PRIORITY);
if (authPrefs == null || authPrefs.isEmpty()) {
authPrefs = DEFAULT_SCHEME_PRIORITY;
}
Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java?rev=576068&r1=576067&r2=576068&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java Sun Sep 16 03:25:01 2007
@@ -66,6 +66,7 @@
import org.apache.http.client.RoutedRequest;
import org.apache.http.client.methods.AbortableHttpRequest;
import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.params.ClientPNames;
import org.apache.http.client.params.HttpClientParams;
import org.apache.http.client.protocol.ClientContext;
import org.apache.http.conn.BasicManagedEntity;
@@ -184,7 +185,7 @@
this.managedConn = null;
this.redirectCount = 0;
- this.maxRedirects = this.params.getIntParameter(HttpClientParams.MAX_REDIRECTS, 100);
+ this.maxRedirects = this.params.getIntParameter(ClientPNames.MAX_REDIRECTS, 100);
this.targetAuthState = new AuthState();
this.proxyAuthState = new AuthState();
} // constructor
@@ -260,7 +261,7 @@
// Add default headers
Collection defHeaders = (Collection) orig.getParams().getParameter(
- HttpClientParams.DEFAULT_HEADERS);
+ ClientPNames.DEFAULT_HEADERS);
if (defHeaders != null) {
for (Iterator it = defHeaders.iterator(); it.hasNext(); ) {
orig.addHeader((Header) it.next());
@@ -315,7 +316,7 @@
// Use virtual host if set
HttpHost target = (HttpHost) request.getParams().getParameter(
- HttpClientParams.VIRTUAL_HOST);
+ ClientPNames.VIRTUAL_HOST);
if (target == null) {
target = route.getTargetHost();
Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java?rev=576068&r1=576067&r2=576068&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java Sun Sep 16 03:25:01 2007
@@ -45,7 +45,7 @@
import org.apache.http.client.RoutedRequest;
import org.apache.http.client.params.AuthPolicy;
import org.apache.http.client.params.CookiePolicy;
-import org.apache.http.client.params.HttpClientParams;
+import org.apache.http.client.params.ClientPNames;
import org.apache.http.client.protocol.ClientContext;
import org.apache.http.client.protocol.RequestAddCookies;
import org.apache.http.client.protocol.RequestProxyAuthentication;
@@ -155,7 +155,7 @@
HttpParams params = getParams();
String className = (String) params.getParameter(
- HttpClientParams.CONNECTION_MANAGER_FACTORY);
+ ClientPNames.CONNECTION_MANAGER_FACTORY);
if (className != null) {
try {
@@ -282,7 +282,7 @@
if (target == null) {
target = (HttpHost) request.getParams().getParameter(
- HttpClientParams.DEFAULT_HOST);
+ ClientPNames.DEFAULT_HOST);
}
if (target == null) {
throw new IllegalStateException
Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultRedirectHandler.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultRedirectHandler.java?rev=576068&r1=576067&r2=576068&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultRedirectHandler.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultRedirectHandler.java Sun Sep 16 03:25:01 2007
@@ -45,16 +45,18 @@
import org.apache.http.ProtocolException;
import org.apache.http.client.CircularRedirectException;
import org.apache.http.client.RedirectHandler;
-import org.apache.http.client.params.HttpClientParams;
+import org.apache.http.client.params.ClientPNames;
import org.apache.http.params.HttpParams;
import org.apache.http.protocol.HttpContext;
import org.apache.http.protocol.ExecutionContext;
+
/**
* Default implementation of a redirect handler.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
+ *
* <!-- empty lines to avoid svn diff problems -->
* @version $Revision$
*
@@ -118,7 +120,7 @@
// rfc2616 demands the location value be a complete URI
// Location = "Location" ":" absoluteURI
if (!uri.isAbsolute()) {
- if (params.isParameterTrue(HttpClientParams.REJECT_RELATIVE_REDIRECT)) {
+ if (params.isParameterTrue(ClientPNames.REJECT_RELATIVE_REDIRECT)) {
throw new ProtocolException("Relative redirect location '"
+ uri + "' not allowed");
}
@@ -143,7 +145,7 @@
}
}
- if (params.isParameterFalse(HttpClientParams.ALLOW_CIRCULAR_REDIRECTS)) {
+ if (params.isParameterFalse(ClientPNames.ALLOW_CIRCULAR_REDIRECTS)) {
Set redirectLocations = (Set) context.getAttribute(REDIRECT_LOCATIONS);
Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultResponseParser.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultResponseParser.java?rev=576068&r1=576067&r2=576068&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultResponseParser.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultResponseParser.java Sun Sep 16 03:25:01 2007
@@ -39,7 +39,7 @@
import org.apache.http.NoHttpResponseException;
import org.apache.http.ProtocolException;
import org.apache.http.StatusLine;
-import org.apache.http.conn.params.HttpConnectionManagerParams;
+import org.apache.http.conn.params.ConnConnectionPNames;
import org.apache.http.impl.io.AbstractMessageParser;
import org.apache.http.io.SessionInputBuffer;
import org.apache.http.message.LineParser;
@@ -65,7 +65,7 @@
this.responseFactory = responseFactory;
this.lineBuf = new CharArrayBuffer(128);
this.maxGarbageLines = params.getIntParameter(
- HttpConnectionManagerParams.MAX_STATUS_LINE_GARBAGE, Integer.MAX_VALUE);
+ ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE, Integer.MAX_VALUE);
}
Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java?rev=576068&r1=576067&r2=576068&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java Sun Sep 16 03:25:01 2007
@@ -33,7 +33,7 @@
import org.apache.http.cookie.CookieSpec;
import org.apache.http.cookie.CookieSpecFactory;
-import org.apache.http.cookie.params.CookieSpecParams;
+import org.apache.http.cookie.params.CookieSpecPNames;
import org.apache.http.params.HttpParams;
/**
@@ -47,7 +47,7 @@
public CookieSpec newInstance(final HttpParams params) {
if (params != null) {
return new BrowserCompatSpec(
- (String []) params.getParameter(CookieSpecParams.DATE_PATTERNS));
+ (String []) params.getParameter(CookieSpecPNames.DATE_PATTERNS));
} else {
return new BrowserCompatSpec();
}
Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java?rev=576068&r1=576067&r2=576068&view=diff
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java Sun Sep 16 03:25:01 2007
@@ -33,7 +33,7 @@
import org.apache.http.cookie.CookieSpec;
import org.apache.http.cookie.CookieSpecFactory;
-import org.apache.http.cookie.params.CookieSpecParams;
+import org.apache.http.cookie.params.CookieSpecPNames;
import org.apache.http.params.HttpParams;
/**
@@ -47,8 +47,8 @@
public CookieSpec newInstance(final HttpParams params) {
if (params != null) {
return new RFC2109Spec(
- (String []) params.getParameter(CookieSpecParams.DATE_PATTERNS),
- params.getBooleanParameter(CookieSpecParams.SINGLE_COOKIE_HEADER, false));
+ (String []) params.getParameter(CookieSpecPNames.DATE_PATTERNS),
+ params.getBooleanParameter(CookieSpecPNames.SINGLE_COOKIE_HEADER, false));
} else {
return new RFC2109Spec();
}