1 /* 2 * ==================================================================== 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * ==================================================================== 20 * 21 * This software consists of voluntary contributions made by many 22 * individuals on behalf of the Apache Software Foundation. For more 23 * information on the Apache Software Foundation, please see 24 * <http://www.apache.org/>. 25 * 26 */ 27 package org.apache.http.client.params; 28 29 /** 30 * Parameter names for HTTP client parameters. 31 * 32 * @since 4.0 33 * 34 * @deprecated (4.3) use {@link org.apache.http.client.config.RequestConfig}. 35 */ 36 @Deprecated 37 public interface ClientPNames { 38 39 public static final String CONNECTION_MANAGER_FACTORY_CLASS_NAME = "http.connection-manager.factory-class-name"; 40 41 /** 42 * Defines whether redirects should be handled automatically 43 * <p> 44 * This parameter expects a value of type {@link Boolean}. 45 * </p> 46 */ 47 public static final String HANDLE_REDIRECTS = "http.protocol.handle-redirects"; 48 49 /** 50 * Defines whether relative redirects should be rejected. HTTP specification 51 * requires the location value be an absolute URI. 52 * <p> 53 * This parameter expects a value of type {@link Boolean}. 54 * </p> 55 */ 56 public static final String REJECT_RELATIVE_REDIRECT = "http.protocol.reject-relative-redirect"; 57 58 /** 59 * Defines the maximum number of redirects to be followed. 60 * The limit on number of redirects is intended to prevent infinite loops. 61 * <p> 62 * This parameter expects a value of type {@link Integer}. 63 * </p> 64 */ 65 public static final String MAX_REDIRECTS = "http.protocol.max-redirects"; 66 67 /** 68 * Defines whether circular redirects (redirects to the same location) should be allowed. 69 * The HTTP spec is not sufficiently clear whether circular redirects are permitted, 70 * therefore optionally they can be enabled 71 * <p> 72 * This parameter expects a value of type {@link Boolean}. 73 * </p> 74 */ 75 public static final String ALLOW_CIRCULAR_REDIRECTS = "http.protocol.allow-circular-redirects"; 76 77 /** 78 * Defines whether authentication should be handled automatically. 79 * <p> 80 * This parameter expects a value of type {@link Boolean}. 81 * </p> 82 */ 83 public static final String HANDLE_AUTHENTICATION = "http.protocol.handle-authentication"; 84 85 /** 86 * Defines the name of the cookie specification to be used for HTTP state management. 87 * <p> 88 * This parameter expects a value of type {@link String}. 89 * </p> 90 */ 91 public static final String COOKIE_POLICY = "http.protocol.cookie-policy"; 92 93 /** 94 * Defines the virtual host to be used in the {@code Host} 95 * request header instead of the physical host. 96 * <p> 97 * This parameter expects a value of type {@link org.apache.http.HttpHost}. 98 * </p> 99 * If a port is not provided, it will be derived from the request URL. 100 */ 101 public static final String VIRTUAL_HOST = "http.virtual-host"; 102 103 /** 104 * Defines the request headers to be sent per default with each request. 105 * <p> 106 * This parameter expects a value of type {@link java.util.Collection}. The 107 * collection is expected to contain {@link org.apache.http.Header}s. 108 * </p> 109 */ 110 public static final String DEFAULT_HEADERS = "http.default-headers"; 111 112 /** 113 * Defines the default host. The default value will be used if the target host is 114 * not explicitly specified in the request URI. 115 * <p> 116 * This parameter expects a value of type {@link org.apache.http.HttpHost}. 117 * </p> 118 */ 119 public static final String DEFAULT_HOST = "http.default-host"; 120 121 /** 122 * Defines the timeout in milliseconds used when retrieving an instance of 123 * {@link org.apache.http.conn.ManagedClientConnection} from the 124 * {@link org.apache.http.conn.ClientConnectionManager}. 125 * <p> 126 * This parameter expects a value of type {@link Long}. 127 * <p> 128 * @since 4.2 129 */ 130 public static final String CONN_MANAGER_TIMEOUT = "http.conn-manager.timeout"; 131 132 } 133