You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2005/03/24 22:23:39 UTC
svn commit: r158948 - in
jakarta/httpclient/trunk/http-common/src/java/org/apache/http:
impl/DefaultHttpParams.java params/HttpParams.java
Author: olegk
Date: Thu Mar 24 13:23:38 2005
New Revision: 158948
URL: http://svn.apache.org/viewcvs?view=rev&rev=158948
Log:
Copied from Jakarta Commons HttpClient
Added:
jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpParams.java
- copied, changed from r158946, jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/params/DefaultHttpParams.java
jakarta/httpclient/trunk/http-common/src/java/org/apache/http/params/HttpParams.java
- copied, changed from r158945, jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/params/HttpParams.java
Copied: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpParams.java (from r158946, jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/params/DefaultHttpParams.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpParams.java?view=diff&rev=158948&p1=jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/params/DefaultHttpParams.java&r1=158946&p2=jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpParams.java&r2=158948
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/params/DefaultHttpParams.java (original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpParams.java Thu Mar 24 13:23:38 2005
@@ -1,5 +1,5 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/params/DefaultHttpParams.java,v 1.9 2004/12/21 23:15:21 olegk Exp $
+ * $HeadURL$
* $Revision$
* $Date$
*
@@ -27,13 +27,12 @@
*
*/
-package org.apache.commons.httpclient.params;
+package org.apache.http.impl;
import java.io.Serializable;
import java.util.HashMap;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.http.params.HttpParams;
/**
* This class represents a collection of HTTP protocol parameters. Protocol parameters
@@ -41,7 +40,7 @@
* explicitly defined in the collection itself, its value will be drawn from the parent
* collection of parameters.
*
- * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*
@@ -49,37 +48,6 @@
*/
public class DefaultHttpParams implements HttpParams, Serializable, Cloneable {
- /** Log object for this class. */
- private static final Log LOG = LogFactory.getLog(DefaultHttpParams.class);
-
- /** HttpParams class factory. */
- private static HttpParamsFactory httpParamsFactory = new DefaultHttpParamsFactory();
-
- /**
- * Gets the default HttpParams to be used.
- *
- * @return the value returned from <code>HttpParamsFactory#getDefaultParams()</code>
- *
- * @see HttpParamsFactory#getDefaultParams()
- */
- public static HttpParams getDefaultParams() {
- return httpParamsFactory.getDefaultParams();
- }
-
- /**
- * Sets the factory that will provide the default HttpParams.
- *
- * @param httpParamsFactory an instance of HttpParamsFactory
- *
- * @see #getDefaultParams()
- */
- public static void setHttpParamsFactory(HttpParamsFactory httpParamsFactory) {
- if (httpParamsFactory == null) {
- throw new IllegalArgumentException("httpParamsFactory may not be null");
- }
- DefaultHttpParams.httpParamsFactory = httpParamsFactory;
- }
-
/** The set of default values to defer to */
private HttpParams defaults = null;
@@ -100,18 +68,6 @@
this.defaults = defaults;
}
- /**
- * Creates a new collection of parameters with the collection returned
- * by {@link #getDefaultParams()} as a parent. The collection will defer
- * to its parent for a default value if a particular parameter is not
- * explicitly set in the collection itself.
- *
- * @see #getDefaultParams()
- */
- public DefaultHttpParams() {
- this(getDefaultParams());
- }
-
public synchronized HttpParams getDefaults() {
return this.defaults;
}
@@ -146,9 +102,6 @@
this.parameters = new HashMap();
}
this.parameters.put(name, value);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Set parameter " + name + " = " + value);
- }
}
/**
Copied: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/params/HttpParams.java (from r158945, jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/params/HttpParams.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/params/HttpParams.java?view=diff&rev=158948&p1=jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/params/HttpParams.java&r1=158945&p2=jakarta/httpclient/trunk/http-common/src/java/org/apache/http/params/HttpParams.java&r2=158948
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/params/HttpParams.java (original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/params/HttpParams.java Thu Mar 24 13:23:38 2005
@@ -1,5 +1,5 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/params/HttpParams.java,v 1.6 2004/05/13 04:01:22 mbecke Exp $
+ * $HeadURL$
* $Revision$
* $Date$
*
@@ -27,7 +27,7 @@
*
*/
-package org.apache.commons.httpclient.params;
+package org.apache.http.params;
/**
* This interface represents a collection of HTTP protocol parameters. Protocol parameters
@@ -35,7 +35,7 @@
* explicitly defined in the collection itself, its value will be drawn from the parent
* collection of parameters.
*
- * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*
@@ -53,7 +53,7 @@
*
* @see #setDefaults(HttpParams)
*/
- public HttpParams getDefaults();
+ HttpParams getDefaults();
/**
* Assigns the parent collection that this collection will defer to
@@ -65,7 +65,7 @@
*
* @see #getDefaults()
*/
- public void setDefaults(final HttpParams params);
+ void setDefaults(HttpParams params);
/**
* Returns a parameter value with the given name. If the parameter is
@@ -80,7 +80,7 @@
*
* @see #setParameter(String, Object)
*/
- public Object getParameter(final String name);
+ Object getParameter(String name);
/**
* Assigns the value to the parameter with the given name
@@ -88,7 +88,7 @@
* @param name parameter name
* @param value parameter value
*/
- public void setParameter(final String name, final Object value);
+ void setParameter(String name, Object value);
/**
* Returns a {@link Long} parameter value with the given name.
@@ -104,7 +104,7 @@
*
* @see #setLongParameter(String, long)
*/
- public long getLongParameter(final String name, long defaultValue);
+ long getLongParameter(String name, long defaultValue);
/**
* Assigns a {@link Long} to the parameter with the given name
@@ -112,7 +112,7 @@
* @param name parameter name
* @param value parameter value
*/
- public void setLongParameter(final String name, long value);
+ void setLongParameter(String name, long value);
/**
* Returns an {@link Integer} parameter value with the given name.
@@ -128,7 +128,7 @@
*
* @see #setIntParameter(String, int)
*/
- public int getIntParameter(final String name, int defaultValue);
+ int getIntParameter(String name, int defaultValue);
/**
* Assigns an {@link Integer} to the parameter with the given name
@@ -136,7 +136,7 @@
* @param name parameter name
* @param value parameter value
*/
- public void setIntParameter(final String name, int value);
+ void setIntParameter(String name, int value);
/**
* Returns a {@link Double} parameter value with the given name.
@@ -152,7 +152,7 @@
*
* @see #setDoubleParameter(String, double)
*/
- public double getDoubleParameter(final String name, double defaultValue);
+ double getDoubleParameter(String name, double defaultValue);
/**
* Assigns a {@link Double} to the parameter with the given name
@@ -160,7 +160,7 @@
* @param name parameter name
* @param value parameter value
*/
- public void setDoubleParameter(final String name, double value);
+ void setDoubleParameter(String name, double value);
/**
* Returns a {@link Boolean} parameter value with the given name.
@@ -176,7 +176,7 @@
*
* @see #setBooleanParameter(String, boolean)
*/
- public boolean getBooleanParameter(final String name, boolean defaultValue);
+ boolean getBooleanParameter(String name, boolean defaultValue);
/**
* Assigns a {@link Boolean} to the parameter with the given name
@@ -184,7 +184,7 @@
* @param name parameter name
* @param value parameter value
*/
- public void setBooleanParameter(final String name, boolean value);
+ void setBooleanParameter(String name, boolean value);
/**
* Returns <tt>true</tt> if the parameter is set at any level, <tt>false</tt> otherwise.
@@ -194,7 +194,7 @@
* @return <tt>true</tt> if the parameter is set at any level, <tt>false</tt>
* otherwise.
*/
- public boolean isParameterSet(final String name);
+ boolean isParameterSet(String name);
/**
* Returns <tt>true</tt> if the parameter is set locally, <tt>false</tt> otherwise.
@@ -204,7 +204,7 @@
* @return <tt>true</tt> if the parameter is set locally, <tt>false</tt>
* otherwise.
*/
- public boolean isParameterSetLocally(final String name);
+ boolean isParameterSetLocally(String name);
/**
* Returns <tt>true</tt> if the parameter is set and is <tt>true</tt>, <tt>false</tt>
@@ -215,7 +215,7 @@
* @return <tt>true</tt> if the parameter is set and is <tt>true</tt>, <tt>false</tt>
* otherwise.
*/
- public boolean isParameterTrue(final String name);
+ boolean isParameterTrue(String name);
/**
* Returns <tt>true</tt> if the parameter is either not set or is <tt>false</tt>,
@@ -226,6 +226,6 @@
* @return <tt>true</tt> if the parameter is either not set or is <tt>false</tt>,
* <tt>false</tt> otherwise.
*/
- public boolean isParameterFalse(final String name);
+ boolean isParameterFalse(String name);
}