1/*
2 * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreConnectionPNames.java $
3 * $Revision: 576077 $
4 * $Date: 2007-09-16 04:50:22 -0700 (Sun, 16 Sep 2007) $
5 *
6 * ====================================================================
7 * Licensed to the Apache Software Foundation (ASF) under one
8 * or more contributor license agreements.  See the NOTICE file
9 * distributed with this work for additional information
10 * regarding copyright ownership.  The ASF licenses this file
11 * to you under the Apache License, Version 2.0 (the
12 * "License"); you may not use this file except in compliance
13 * with the License.  You may obtain a copy of the License at
14 *
15 *   http://www.apache.org/licenses/LICENSE-2.0
16 *
17 * Unless required by applicable law or agreed to in writing,
18 * software distributed under the License is distributed on an
19 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 * KIND, either express or implied.  See the License for the
21 * specific language governing permissions and limitations
22 * under the License.
23 * ====================================================================
24 *
25 * This software consists of voluntary contributions made by many
26 * individuals on behalf of the Apache Software Foundation.  For more
27 * information on the Apache Software Foundation, please see
28 * <http://www.apache.org/>.
29 *
30 */
31
32package org.apache.http.params;
33
34
35/**
36 * Defines parameter names for connections in HttpCore.
37 *
38 * @version $Revision: 576077 $
39 *
40 * @since 4.0
41 *
42 * @deprecated Please use {@link java.net.URL#openConnection} instead.
43 *     Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a>
44 *     for further details.
45 */
46@Deprecated
47public interface CoreConnectionPNames {
48
49    /**
50     * Defines the default socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the
51     * timeout for waiting for data. A timeout value of zero is interpreted as an infinite
52     * timeout. This value is used when no socket timeout is set in the
53     * method parameters.
54     * <p>
55     * This parameter expects a value of type {@link Integer}.
56     * </p>
57     * @see java.net.SocketOptions#SO_TIMEOUT
58     */
59    public static final String SO_TIMEOUT = "http.socket.timeout";
60
61    /**
62     * Determines whether Nagle's algorithm is to be used. The Nagle's algorithm
63     * tries to conserve bandwidth by minimizing the number of segments that are
64     * sent. When applications wish to decrease network latency and increase
65     * performance, they can disable Nagle's algorithm (that is enable TCP_NODELAY).
66     * Data will be sent earlier, at the cost of an increase in bandwidth consumption.
67     * <p>
68     * This parameter expects a value of type {@link Boolean}.
69     * </p>
70     * @see java.net.SocketOptions#TCP_NODELAY
71     */
72    public static final String TCP_NODELAY = "http.tcp.nodelay";
73
74    /**
75     * Determines the size of the internal socket buffer used to buffer data
76     * while receiving / transmitting HTTP messages.
77     * <p>
78     * This parameter expects a value of type {@link Integer}.
79     * </p>
80     */
81    public static final String SOCKET_BUFFER_SIZE = "http.socket.buffer-size";
82
83    /**
84     * Sets SO_LINGER with the specified linger time in seconds. The maximum timeout
85     * value is platform specific. Value <tt>0</tt> implies that the option is disabled.
86     * Value <tt>-1</tt> implies that the JRE default is used. The setting only affects
87     * socket close.
88     * <p>
89     * This parameter expects a value of type {@link Integer}.
90     * </p>
91     * @see java.net.SocketOptions#SO_LINGER
92     */
93    public static final String SO_LINGER = "http.socket.linger";
94
95    /**
96     * Determines the timeout until a connection is etablished. A value of zero
97     * means the timeout is not used. The default value is zero.
98     * <p>
99     * This parameter expects a value of type {@link Integer}.
100     * </p>
101     */
102    public static final String CONNECTION_TIMEOUT = "http.connection.timeout";
103
104    /**
105     * Determines whether stale connection check is to be used. Disabling
106     * stale connection check may result in slight performance improvement
107     * at the risk of getting an I/O error when executing a request over a
108     * connection that has been closed at the server side.
109     * <p>
110     * This parameter expects a value of type {@link Boolean}.
111     * </p>
112     */
113    public static final String STALE_CONNECTION_CHECK = "http.connection.stalecheck";
114
115    /**
116     * Determines the maximum line length limit. If set to a positive value, any HTTP
117     * line exceeding this limit will cause an IOException. A negative or zero value
118     * will effectively disable the check.
119     * <p>
120     * This parameter expects a value of type {@link Integer}.
121     * </p>
122     */
123    public static final String MAX_LINE_LENGTH = "http.connection.max-line-length";
124
125    /**
126     * Determines the maximum HTTP header count allowed. If set to a positive value,
127     * the number of HTTP headers received from the data stream exceeding this limit
128     * will cause an IOException. A negative or zero value will effectively disable
129     * the check.
130     * <p>
131     * This parameter expects a value of type {@link Integer}.
132     * </p>
133     */
134    public static final String MAX_HEADER_COUNT = "http.connection.max-header-count";
135
136}
137