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 13:50:23 UTC

svn commit: r576077 - in /jakarta/httpcomponents/httpcore/trunk: module-main/src/main/java/org/apache/http/impl/io/ module-main/src/main/java/org/apache/http/params/ module-main/src/test/java/org/apache/http/impl/ module-main/src/test/java/org/apache/h...

Author: rolandw
Date: Sun Sep 16 04:50:22 2007
New Revision: 576077

URL: http://svn.apache.org/viewvc?rev=576077&view=rev
Log:
parameter names in interfaces, part 3

Added:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreConnectionPNames.java   (with props)
Modified:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreProtocolPNames.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/HttpConnectionParams.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/TestSessionBuffers.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpServer.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestHttpMessageParser.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java
    jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java
    jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java?rev=576077&r1=576076&r2=576077&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java Sun Sep 16 04:50:22 2007
@@ -43,7 +43,7 @@
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.message.LineParser;
 import org.apache.http.message.BasicLineParser;
-import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.HttpParams;
 import org.apache.http.util.CharArrayBuffer;
 
@@ -74,9 +74,9 @@
         }
         this.sessionBuffer = buffer;
         this.maxHeaderCount = params.getIntParameter(
-                HttpConnectionParams.MAX_HEADER_COUNT, -1);
+                CoreConnectionPNames.MAX_HEADER_COUNT, -1);
         this.maxLineLen = params.getIntParameter(
-                HttpConnectionParams.MAX_LINE_LENGTH, -1);
+                CoreConnectionPNames.MAX_LINE_LENGTH, -1);
         this.lineParser = (parser != null) ? parser : BasicLineParser.DEFAULT;
     }
 

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java?rev=576077&r1=576076&r2=576077&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java Sun Sep 16 04:50:22 2007
@@ -36,7 +36,7 @@
 
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.io.HttpTransportMetrics;
-import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpProtocolParams;
 import org.apache.http.protocol.HTTP;
@@ -83,7 +83,7 @@
         this.charset = HttpProtocolParams.getHttpElementCharset(params);
         this.ascii = this.charset.equalsIgnoreCase(HTTP.US_ASCII)
                      || this.charset.equalsIgnoreCase(HTTP.ASCII);
-        this.maxLineLen = params.getIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, -1);
+        this.maxLineLen = params.getIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, -1);
         this.metrics = new HttpTransportMetricsImpl();
     }
     

Added: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreConnectionPNames.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreConnectionPNames.java?rev=576077&view=auto
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreConnectionPNames.java (added)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreConnectionPNames.java Sun Sep 16 04:50:22 2007
@@ -0,0 +1,131 @@
+/*
+ * $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.params;
+
+
+/**
+ * Defines parameter names for connections in HttpCore.
+ * 
+ * @version $Revision$
+ * 
+ * @since 4.0
+ */
+public interface CoreConnectionPNames {
+
+    /**
+     * Defines the default socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the 
+     * timeout for waiting for data. A timeout value of zero is interpreted as an infinite 
+     * timeout. This value is used when no socket timeout is set in the 
+     * method parameters. 
+     * <p>
+     * This parameter expects a value of type {@link Integer}.
+     * </p>
+     * @see java.net.SocketOptions#SO_TIMEOUT
+     */
+    public static final String SO_TIMEOUT = "http.socket.timeout"; 
+
+    /**
+     * Determines whether Nagle's algorithm is to be used. The Nagle's algorithm 
+     * tries to conserve bandwidth by minimizing the number of segments that are 
+     * sent. When applications wish to decrease network latency and increase 
+     * performance, they can disable Nagle's algorithm (that is enable TCP_NODELAY). 
+     * Data will be sent earlier, at the cost of an increase in bandwidth consumption. 
+     * <p>
+     * This parameter expects a value of type {@link Boolean}.
+     * </p>
+     * @see java.net.SocketOptions#TCP_NODELAY
+     */
+    public static final String TCP_NODELAY = "http.tcp.nodelay"; 
+
+    /**
+     * Determines the size of the internal socket buffer used to buffer data
+     * while receiving / transmitting HTTP messages.
+     * <p>
+     * This parameter expects a value of type {@link Integer}.
+     * </p>
+     */
+    public static final String SOCKET_BUFFER_SIZE = "http.socket.buffer-size"; 
+
+    /**
+     * Sets SO_LINGER with the specified linger time in seconds. The maximum timeout 
+     * value is platform specific. Value <tt>0</tt> implies that the option is disabled.
+     * Value <tt>-1</tt> implies that the JRE default is used. The setting only affects 
+     * socket close.  
+     * <p>
+     * This parameter expects a value of type {@link Integer}.
+     * </p>
+     * @see java.net.SocketOptions#SO_LINGER
+     */
+    public static final String SO_LINGER = "http.socket.linger"; 
+
+    /**
+     * Determines the timeout until a connection is etablished. A value of zero 
+     * means the timeout is not used. The default value is zero.
+     * <p>
+     * This parameter expects a value of type {@link Integer}.
+     * </p>
+     */
+    public static final String CONNECTION_TIMEOUT = "http.connection.timeout"; 
+
+    /**
+     * Determines whether stale connection check is to be used. Disabling 
+     * stale connection check may result in slight performance improvement 
+     * at the risk of getting an I/O error when executing a request over a
+     * connection that has been closed at the server side. 
+     * <p>
+     * This parameter expects a value of type {@link Boolean}.
+     * </p>
+     */
+    public static final String STALE_CONNECTION_CHECK = "http.connection.stalecheck"; 
+
+    /**
+     * Determines the maximum line length limit. If set to a positive value, any HTTP 
+     * line exceeding this limit will cause an IOException. A negative or zero value
+     * will effectively disable the check.
+     * <p>
+     * This parameter expects a value of type {@link Integer}.
+     * </p>
+     */
+    public static final String MAX_LINE_LENGTH = "http.connection.max-line-length";
+    
+    /**
+     * Determines the maximum HTTP header count allowed. If set to a positive value, 
+     * the number of HTTP headers received from the data stream exceeding this limit 
+     * will cause an IOException. A negative or zero value will effectively disable 
+     * the check. 
+     * <p>
+     * This parameter expects a value of type {@link Integer}.
+     * </p>
+     */
+    public static final String MAX_HEADER_COUNT = "http.connection.max-header-count";
+
+}

Propchange: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreConnectionPNames.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreConnectionPNames.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreConnectionPNames.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreProtocolPNames.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreProtocolPNames.java?rev=576077&r1=576076&r2=576077&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreProtocolPNames.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreProtocolPNames.java Sun Sep 16 04:50:22 2007
@@ -42,9 +42,11 @@
 public interface CoreProtocolPNames {
 
     /**
-     * Defines the {@link ProtocolVersion protocol version} used per default.
+     * Defines the {@link org.apache.http.ProtocolVersion protocol version}
+     * used per default.
      * <p>
-     * This parameter expects a value of type {@link ProtocolVersion}.
+     * This parameter expects a value of type
+     * {@link org.apache.http.ProtocolVersion}.
      * </p>
      */
     public static final String PROTOCOL_VERSION = "http.protocol.version"; 

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/HttpConnectionParams.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/HttpConnectionParams.java?rev=576077&r1=576076&r2=576077&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/HttpConnectionParams.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/HttpConnectionParams.java Sun Sep 16 04:50:22 2007
@@ -43,93 +43,6 @@
 public final class HttpConnectionParams {
 
     /**
-     * Defines the default socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the 
-     * timeout for waiting for data. A timeout value of zero is interpreted as an infinite 
-     * timeout. This value is used when no socket timeout is set in the 
-     * method parameters. 
-     * <p>
-     * This parameter expects a value of type {@link Integer}.
-     * </p>
-     * @see java.net.SocketOptions#SO_TIMEOUT
-     */
-    public static final String SO_TIMEOUT = "http.socket.timeout"; 
-
-    /**
-     * Determines whether Nagle's algorithm is to be used. The Nagle's algorithm 
-     * tries to conserve bandwidth by minimizing the number of segments that are 
-     * sent. When applications wish to decrease network latency and increase 
-     * performance, they can disable Nagle's algorithm (that is enable TCP_NODELAY). 
-     * Data will be sent earlier, at the cost of an increase in bandwidth consumption. 
-     * <p>
-     * This parameter expects a value of type {@link Boolean}.
-     * </p>
-     * @see java.net.SocketOptions#TCP_NODELAY
-     */
-    public static final String TCP_NODELAY = "http.tcp.nodelay"; 
-
-    /**
-     * Determines the size of the internal socket buffer used to buffer data
-     * while receiving / transmitting HTTP messages.
-     * <p>
-     * This parameter expects a value of type {@link Integer}.
-     * </p>
-     */
-    public static final String SOCKET_BUFFER_SIZE = "http.socket.buffer-size"; 
-
-    /**
-     * Sets SO_LINGER with the specified linger time in seconds. The maximum timeout 
-     * value is platform specific. Value <tt>0</tt> implies that the option is disabled.
-     * Value <tt>-1</tt> implies that the JRE default is used. The setting only affects 
-     * socket close.  
-     * <p>
-     * This parameter expects a value of type {@link Integer}.
-     * </p>
-     * @see java.net.SocketOptions#SO_LINGER
-     */
-    public static final String SO_LINGER = "http.socket.linger"; 
-
-    /**
-     * Determines the timeout until a connection is etablished. A value of zero 
-     * means the timeout is not used. The default value is zero.
-     * <p>
-     * This parameter expects a value of type {@link Integer}.
-     * </p>
-     */
-    public static final String CONNECTION_TIMEOUT = "http.connection.timeout"; 
-
-    /**
-     * Determines whether stale connection check is to be used. Disabling 
-     * stale connection check may result in slight performance improvement 
-     * at the risk of getting an I/O error when executing a request over a
-     * connection that has been closed at the server side. 
-     * <p>
-     * This parameter expects a value of type {@link Boolean}.
-     * </p>
-     */
-    public static final String STALE_CONNECTION_CHECK = "http.connection.stalecheck"; 
-
-    /**
-     * Determines the maximum line length limit. If set to a positive value, any HTTP 
-     * line exceeding this limit will cause an IOException. A negative or zero value
-     * will effectively disable the check.
-     * <p>
-     * This parameter expects a value of type {@link Integer}.
-     * </p>
-     */
-    public static final String MAX_LINE_LENGTH = "http.connection.max-line-length";
-    
-    /**
-     * Determines the maximum HTTP header count allowed. If set to a positive value, 
-     * the number of HTTP headers received from the data stream exceeding this limit 
-     * will cause an IOException. A negative or zero value will effectively disable 
-     * the check. 
-     * <p>
-     * This parameter expects a value of type {@link Integer}.
-     * </p>
-     */
-    public static final String MAX_HEADER_COUNT = "http.connection.max-header-count";
-    
-    /**
      */
     private HttpConnectionParams() {
         super();
@@ -147,7 +60,7 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        return params.getIntParameter(SO_TIMEOUT, 0);
+        return params.getIntParameter(CoreConnectionPNames.SO_TIMEOUT, 0);
     }
 
     /**
@@ -162,7 +75,7 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        params.setIntParameter(SO_TIMEOUT, timeout);
+        params.setIntParameter(CoreConnectionPNames.SO_TIMEOUT, timeout);
         
     }
 
@@ -176,7 +89,8 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        return params.getBooleanParameter(TCP_NODELAY, true);
+        return params.getBooleanParameter
+            (CoreConnectionPNames.TCP_NODELAY, true);
     }
 
     /**
@@ -193,21 +107,22 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        params.setBooleanParameter(TCP_NODELAY, value);
+        params.setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, value);
     }
 
     public static int getSocketBufferSize(final HttpParams params) {
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        return params.getIntParameter(SOCKET_BUFFER_SIZE, -1);
+        return params.getIntParameter
+            (CoreConnectionPNames.SOCKET_BUFFER_SIZE, -1);
     }
     
     public static void setSocketBufferSize(final HttpParams params, int size) {
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        params.setIntParameter(SOCKET_BUFFER_SIZE, size);
+        params.setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, size);
     }
 
     /**
@@ -220,7 +135,7 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        return params.getIntParameter(SO_LINGER, -1);
+        return params.getIntParameter(CoreConnectionPNames.SO_LINGER, -1);
     }
 
     /**
@@ -237,7 +152,7 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        params.setIntParameter(SO_LINGER, value);
+        params.setIntParameter(CoreConnectionPNames.SO_LINGER, value);
     }
 
     /**
@@ -250,7 +165,8 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        return params.getIntParameter(CONNECTION_TIMEOUT, 0);
+        return params.getIntParameter
+            (CoreConnectionPNames.CONNECTION_TIMEOUT, 0);
     }
 
     /**
@@ -263,7 +179,8 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        params.setIntParameter(CONNECTION_TIMEOUT, timeout);
+        params.setIntParameter
+            (CoreConnectionPNames.CONNECTION_TIMEOUT, timeout);
     }
     
     /**
@@ -279,7 +196,8 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        return params.getBooleanParameter(STALE_CONNECTION_CHECK, true);
+        return params.getBooleanParameter
+            (CoreConnectionPNames.STALE_CONNECTION_CHECK, true);
     }
 
     /**
@@ -295,7 +213,8 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        params.setBooleanParameter(STALE_CONNECTION_CHECK, value);
+        params.setBooleanParameter
+            (CoreConnectionPNames.STALE_CONNECTION_CHECK, value);
     }
     
 }

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/TestSessionBuffers.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/TestSessionBuffers.java?rev=576077&r1=576076&r2=576077&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/TestSessionBuffers.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/TestSessionBuffers.java Sun Sep 16 04:50:22 2007
@@ -43,7 +43,7 @@
 import org.apache.http.params.BasicHttpParams;
 import org.apache.http.mockup.SessionInputBufferMockup;
 import org.apache.http.mockup.SessionOutputBufferMockup;
-import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpProtocolParams;
 import org.apache.http.protocol.HTTP;
@@ -362,14 +362,14 @@
         String s = "a very looooooooooooooooooooooooooooooooooooooong line\r\n     ";
         byte[] tmp = s.getBytes("US-ASCII"); 
         // no limit
-        params.setIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, 0);
+        params.setIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, 0);
         SessionInputBufferMockup inbuffer1 = new SessionInputBufferMockup(tmp, 5, params);
         assertNotNull(inbuffer1.readLine());
         long readedBytes = inbuffer1.getMetrics().getBytesTransferred();
         assertEquals(60, readedBytes);
         
         // 15 char limit
-        params.setIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, 15);
+        params.setIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, 15);
         SessionInputBufferMockup inbuffer2 = new SessionInputBufferMockup(tmp, 5, params);
         try {
             inbuffer2.readLine();

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java?rev=576077&r1=576076&r2=576077&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java Sun Sep 16 04:50:22 2007
@@ -42,7 +42,7 @@
 import org.apache.http.HttpVersion;
 import org.apache.http.impl.DefaultConnectionReuseStrategy;
 import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpParamsLinker;
 import org.apache.http.params.CoreProtocolPNames;
@@ -69,8 +69,8 @@
         super();
         this.params = new BasicHttpParams(null);
         this.params
-            .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000)
-            .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
+            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000)
+            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
             .setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1)
             .setParameter(CoreProtocolPNames.USER_AGENT, "TEST-CLIENT/1.1");
 

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpServer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpServer.java?rev=576077&r1=576076&r2=576077&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpServer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpServer.java Sun Sep 16 04:50:22 2007
@@ -46,7 +46,7 @@
 import org.apache.http.impl.DefaultHttpResponseFactory;
 import org.apache.http.impl.DefaultHttpServerConnection;
 import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.BasicHttpProcessor;
@@ -79,10 +79,10 @@
         super();
         this.params = new BasicHttpParams();
         this.params
-            .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000)
-            .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
-            .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
-            .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
+            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000)
+            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
+            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
+            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
         this.httpproc = new BasicHttpProcessor();
         this.httpproc.addInterceptor(new ResponseDate());

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java?rev=576077&r1=576076&r2=576077&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java Sun Sep 16 04:50:22 2007
@@ -44,7 +44,7 @@
 import org.apache.http.message.BasicLineParser;
 import org.apache.http.nio.NHttpMessageParser;
 import org.apache.http.nio.reactor.SessionInputBuffer;
-import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.HttpParams;
 import org.apache.http.util.CharArrayBuffer;
 
@@ -80,9 +80,9 @@
         this.endOfStream = false;
         this.headerBufs = new ArrayList();        
         this.maxLineLen = params.getIntParameter(
-                HttpConnectionParams.MAX_LINE_LENGTH, -1);
+                CoreConnectionPNames.MAX_LINE_LENGTH, -1);
         this.maxHeaderCount = params.getIntParameter(
-                HttpConnectionParams.MAX_HEADER_COUNT, -1);
+                CoreConnectionPNames.MAX_HEADER_COUNT, -1);
         this.lineParser = (parser != null) ? parser : BasicLineParser.DEFAULT;
     }
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java?rev=576077&r1=576076&r2=576077&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java Sun Sep 16 04:50:22 2007
@@ -44,7 +44,7 @@
 import org.apache.http.nio.protocol.EventListener;
 import org.apache.http.nio.protocol.HttpRequestExecutionHandler;
 import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.BasicHttpProcessor;
@@ -77,21 +77,21 @@
     protected void setUp() throws Exception {
         HttpParams serverParams = new BasicHttpParams();
         serverParams
-            .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000)
-            .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
-            .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
-            .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
+            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000)
+            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
+            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
+            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
         
         this.server = new TestHttpServer(serverParams);
         
         HttpParams clientParams = new BasicHttpParams();
         clientParams
-            .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000)
-            .setIntParameter(HttpConnectionParams.CONNECTION_TIMEOUT, 2000)
-            .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
-            .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
-            .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
+            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000)
+            .setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 2000)
+            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
+            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
+            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.USER_AGENT, "TEST-CLIENT/1.1");
         
         this.client = new TestHttpClient(clientParams);

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestHttpMessageParser.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestHttpMessageParser.java?rev=576077&r1=576076&r2=576077&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestHttpMessageParser.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestHttpMessageParser.java Sun Sep 16 04:50:22 2007
@@ -50,7 +50,7 @@
 import org.apache.http.impl.nio.reactor.SessionInputBufferImpl;
 import org.apache.http.nio.reactor.SessionInputBuffer;
 import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.HttpParams;
 
 /**
@@ -343,13 +343,13 @@
         SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
 
-        params.setIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, 0);
+        params.setIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, 0);
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, null, requestFactory, params);
         requestParser.fillBuffer(newChannel("GET /whatever HTTP/1.0\r\nHeader: one\r\n\r\n"));
         requestParser.parse();
         requestParser.reset();
 
-        params.setIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, 15);
+        params.setIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, 15);
         requestParser = new HttpRequestParser(inbuf, null, requestFactory, params);
         try {
             requestParser.fillBuffer(newChannel("GET /loooooooooooooooong HTTP/1.0\r\nHeader: one\r\n\r\n"));
@@ -364,13 +364,13 @@
         SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
 
-        params.setIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, 0);
+        params.setIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, 0);
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, null, requestFactory, params);
         requestParser.fillBuffer(newChannel("GET /whatever HTTP/1.0\r\nHeader: one\r\n\r\n"));
         requestParser.parse();
         requestParser.reset();
 
-        params.setIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, 15);
+        params.setIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, 15);
         requestParser = new HttpRequestParser(inbuf, null, requestFactory, params);
         requestParser.fillBuffer(newChannel("GET / HTTP/1.0\r\nHeader: 9012345\r\n\r\n"));
         requestParser.parse();
@@ -388,8 +388,8 @@
         SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
 
-        params.setIntParameter(HttpConnectionParams.MAX_HEADER_COUNT, 2);
-        params.setIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, 15);        
+        params.setIntParameter(CoreConnectionPNames.MAX_HEADER_COUNT, 2);
+        params.setIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, 15);        
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, null, requestFactory, params);
         try {
             requestParser.fillBuffer(newChannel("GET / HTTP/1.0\r\nHeader: 9012345\r\n 23456789012345\r\n 23456789012345\r\n 23456789012345\r\n\r\n"));
@@ -404,7 +404,7 @@
         SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
 
-        params.setIntParameter(HttpConnectionParams.MAX_HEADER_COUNT, 2);
+        params.setIntParameter(CoreConnectionPNames.MAX_HEADER_COUNT, 2);
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, null, requestFactory, params);
         requestParser.fillBuffer(newChannel("GET /whatever HTTP/1.0\r\nHeader: one\r\nHeader: two\r\n\r\n"));
         requestParser.parse();
@@ -423,7 +423,7 @@
         SessionInputBuffer inbuf = new SessionInputBufferImpl(2, 128, params); 
         HttpRequestFactory requestFactory = new DefaultHttpRequestFactory();
 
-        params.setIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, 2);
+        params.setIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, 2);
         HttpRequestParser requestParser = new HttpRequestParser(inbuf, null, requestFactory, params);
         ReadableByteChannel channel = newChannel("GET / HTTP/1.0\r\nHeader: one\r\n\r\n");
         assertEquals(2, requestParser.fillBuffer(channel));

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java?rev=576077&r1=576076&r2=576077&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java Sun Sep 16 04:50:22 2007
@@ -68,7 +68,7 @@
 import org.apache.http.nio.NHttpConnection;
 import org.apache.http.nio.NHttpServiceHandler;
 import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.BasicHttpProcessor;
@@ -180,21 +180,21 @@
     protected void setUp() throws Exception {
         HttpParams serverParams = new BasicHttpParams();
         serverParams
-            .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000)
-            .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
-            .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
-            .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
+            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000)
+            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
+            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
+            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
         
         this.server = new TestHttpServer(serverParams);
         
         HttpParams clientParams = new BasicHttpParams();
         clientParams
-            .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000)
-            .setIntParameter(HttpConnectionParams.CONNECTION_TIMEOUT, 2000)
-            .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
-            .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
-            .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
+            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000)
+            .setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 2000)
+            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
+            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
+            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.USER_AGENT, "TEST-CLIENT/1.1");
         
         this.client = new TestHttpClient(clientParams);

Modified: jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java?rev=576077&r1=576076&r2=576077&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java Sun Sep 16 04:50:22 2007
@@ -15,7 +15,7 @@
 import org.apache.http.nio.protocol.EventListener;
 import org.apache.http.nio.protocol.HttpRequestExecutionHandler;
 import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.BasicHttpProcessor;
@@ -48,21 +48,21 @@
     protected void setUp() throws Exception {
         HttpParams serverParams = new BasicHttpParams();
         serverParams
-            .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000)
-            .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
-            .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
-            .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
+            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000)
+            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
+            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
+            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
         
         this.server = new TestHttpSSLServer(serverParams);
         
         HttpParams clientParams = new BasicHttpParams();
         clientParams
-            .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000)
-            .setIntParameter(HttpConnectionParams.CONNECTION_TIMEOUT, 2000)
-            .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
-            .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
-            .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
+            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000)
+            .setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 2000)
+            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
+            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
+            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.USER_AGENT, "TEST-CLIENT/1.1");
         
         this.client = new TestHttpSSLClient(clientParams);

Modified: jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java?rev=576077&r1=576076&r2=576077&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java Sun Sep 16 04:50:22 2007
@@ -55,7 +55,7 @@
 import org.apache.http.nio.protocol.BufferingHttpServiceHandler;
 import org.apache.http.nio.protocol.EventListener;
 import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.BasicHttpProcessor;
@@ -74,10 +74,10 @@
     protected void setUp() throws Exception {
         HttpParams serverParams = new BasicHttpParams();
         serverParams
-            .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000)
-            .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 10)
-            .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
-            .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
+            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000)
+            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 10)
+            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
+            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
         
         this.server = new TestHttpSSLServer(serverParams);