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