001: /*
002: * $HeadURL: https://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.0-beta1/module-main/src/main/java/org/apache/http/params/CoreConnectionPNames.java $
003: * $Revision: 576077 $
004: * $Date: 2007-09-16 13:50:22 +0200 (Sun, 16 Sep 2007) $
005: *
006: * ====================================================================
007: * Licensed to the Apache Software Foundation (ASF) under one
008: * or more contributor license agreements. See the NOTICE file
009: * distributed with this work for additional information
010: * regarding copyright ownership. The ASF licenses this file
011: * to you under the Apache License, Version 2.0 (the
012: * "License"); you may not use this file except in compliance
013: * with the License. You may obtain a copy of the License at
014: *
015: * http://www.apache.org/licenses/LICENSE-2.0
016: *
017: * Unless required by applicable law or agreed to in writing,
018: * software distributed under the License is distributed on an
019: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
020: * KIND, either express or implied. See the License for the
021: * specific language governing permissions and limitations
022: * under the License.
023: * ====================================================================
024: *
025: * This software consists of voluntary contributions made by many
026: * individuals on behalf of the Apache Software Foundation. For more
027: * information on the Apache Software Foundation, please see
028: * <http://www.apache.org/>.
029: *
030: */
031:
032: package org.apache.http.params;
033:
034: /**
035: * Defines parameter names for connections in HttpCore.
036: *
037: * @version $Revision: 576077 $
038: *
039: * @since 4.0
040: */
041: public interface CoreConnectionPNames {
042:
043: /**
044: * Defines the default socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the
045: * timeout for waiting for data. A timeout value of zero is interpreted as an infinite
046: * timeout. This value is used when no socket timeout is set in the
047: * method parameters.
048: * <p>
049: * This parameter expects a value of type {@link Integer}.
050: * </p>
051: * @see java.net.SocketOptions#SO_TIMEOUT
052: */
053: public static final String SO_TIMEOUT = "http.socket.timeout";
054:
055: /**
056: * Determines whether Nagle's algorithm is to be used. The Nagle's algorithm
057: * tries to conserve bandwidth by minimizing the number of segments that are
058: * sent. When applications wish to decrease network latency and increase
059: * performance, they can disable Nagle's algorithm (that is enable TCP_NODELAY).
060: * Data will be sent earlier, at the cost of an increase in bandwidth consumption.
061: * <p>
062: * This parameter expects a value of type {@link Boolean}.
063: * </p>
064: * @see java.net.SocketOptions#TCP_NODELAY
065: */
066: public static final String TCP_NODELAY = "http.tcp.nodelay";
067:
068: /**
069: * Determines the size of the internal socket buffer used to buffer data
070: * while receiving / transmitting HTTP messages.
071: * <p>
072: * This parameter expects a value of type {@link Integer}.
073: * </p>
074: */
075: public static final String SOCKET_BUFFER_SIZE = "http.socket.buffer-size";
076:
077: /**
078: * Sets SO_LINGER with the specified linger time in seconds. The maximum timeout
079: * value is platform specific. Value <tt>0</tt> implies that the option is disabled.
080: * Value <tt>-1</tt> implies that the JRE default is used. The setting only affects
081: * socket close.
082: * <p>
083: * This parameter expects a value of type {@link Integer}.
084: * </p>
085: * @see java.net.SocketOptions#SO_LINGER
086: */
087: public static final String SO_LINGER = "http.socket.linger";
088:
089: /**
090: * Determines the timeout until a connection is etablished. A value of zero
091: * means the timeout is not used. The default value is zero.
092: * <p>
093: * This parameter expects a value of type {@link Integer}.
094: * </p>
095: */
096: public static final String CONNECTION_TIMEOUT = "http.connection.timeout";
097:
098: /**
099: * Determines whether stale connection check is to be used. Disabling
100: * stale connection check may result in slight performance improvement
101: * at the risk of getting an I/O error when executing a request over a
102: * connection that has been closed at the server side.
103: * <p>
104: * This parameter expects a value of type {@link Boolean}.
105: * </p>
106: */
107: public static final String STALE_CONNECTION_CHECK = "http.connection.stalecheck";
108:
109: /**
110: * Determines the maximum line length limit. If set to a positive value, any HTTP
111: * line exceeding this limit will cause an IOException. A negative or zero value
112: * will effectively disable the check.
113: * <p>
114: * This parameter expects a value of type {@link Integer}.
115: * </p>
116: */
117: public static final String MAX_LINE_LENGTH = "http.connection.max-line-length";
118:
119: /**
120: * Determines the maximum HTTP header count allowed. If set to a positive value,
121: * the number of HTTP headers received from the data stream exceeding this limit
122: * will cause an IOException. A negative or zero value will effectively disable
123: * the check.
124: * <p>
125: * This parameter expects a value of type {@link Integer}.
126: * </p>
127: */
128: public static final String MAX_HEADER_COUNT = "http.connection.max-header-count";
129:
130: }
|