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 32 package 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 public interface CoreConnectionPNames { 43 44 /** 45 * Defines the default socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the 46 * timeout for waiting for data. A timeout value of zero is interpreted as an infinite 47 * timeout. This value is used when no socket timeout is set in the 48 * method parameters. 49 * <p> 50 * This parameter expects a value of type {@link Integer}. 51 * </p> 52 * @see java.net.SocketOptions#SO_TIMEOUT 53 */ 54 public static final String SO_TIMEOUT = "http.socket.timeout"; 55 56 /** 57 * Determines whether Nagle's algorithm is to be used. The Nagle's algorithm 58 * tries to conserve bandwidth by minimizing the number of segments that are 59 * sent. When applications wish to decrease network latency and increase 60 * performance, they can disable Nagle's algorithm (that is enable TCP_NODELAY). 61 * Data will be sent earlier, at the cost of an increase in bandwidth consumption. 62 * <p> 63 * This parameter expects a value of type {@link Boolean}. 64 * </p> 65 * @see java.net.SocketOptions#TCP_NODELAY 66 */ 67 public static final String TCP_NODELAY = "http.tcp.nodelay"; 68 69 /** 70 * Determines the size of the internal socket buffer used to buffer data 71 * while receiving / transmitting HTTP messages. 72 * <p> 73 * This parameter expects a value of type {@link Integer}. 74 * </p> 75 */ 76 public static final String SOCKET_BUFFER_SIZE = "http.socket.buffer-size"; 77 78 /** 79 * Sets SO_LINGER with the specified linger time in seconds. The maximum timeout 80 * value is platform specific. Value <tt>0</tt> implies that the option is disabled. 81 * Value <tt>-1</tt> implies that the JRE default is used. The setting only affects 82 * socket close. 83 * <p> 84 * This parameter expects a value of type {@link Integer}. 85 * </p> 86 * @see java.net.SocketOptions#SO_LINGER 87 */ 88 public static final String SO_LINGER = "http.socket.linger"; 89 90 /** 91 * Determines the timeout until a connection is etablished. A value of zero 92 * means the timeout is not used. The default value is zero. 93 * <p> 94 * This parameter expects a value of type {@link Integer}. 95 * </p> 96 */ 97 public static final String CONNECTION_TIMEOUT = "http.connection.timeout"; 98 99 /** 100 * Determines whether stale connection check is to be used. Disabling 101 * stale connection check may result in slight performance improvement 102 * at the risk of getting an I/O error when executing a request over a 103 * connection that has been closed at the server side. 104 * <p> 105 * This parameter expects a value of type {@link Boolean}. 106 * </p> 107 */ 108 public static final String STALE_CONNECTION_CHECK = "http.connection.stalecheck"; 109 110 /** 111 * Determines the maximum line length limit. If set to a positive value, any HTTP 112 * line exceeding this limit will cause an IOException. A negative or zero value 113 * will effectively disable the check. 114 * <p> 115 * This parameter expects a value of type {@link Integer}. 116 * </p> 117 */ 118 public static final String MAX_LINE_LENGTH = "http.connection.max-line-length"; 119 120 /** 121 * Determines the maximum HTTP header count allowed. If set to a positive value, 122 * the number of HTTP headers received from the data stream exceeding this limit 123 * will cause an IOException. A negative or zero value will effectively disable 124 * the check. 125 * <p> 126 * This parameter expects a value of type {@link Integer}. 127 * </p> 128 */ 129 public static final String MAX_HEADER_COUNT = "http.connection.max-header-count"; 130 131 } 132