View Javadoc

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  import org.apache.http.client.config.RequestConfig;
30  
31  /**
32   * Parameter names for HTTP client parameters.
33   *
34   * @since 4.0
35   *
36   * @deprecated (4.3) use {@link RequestConfig}
37   */
38  @Deprecated
39  public interface ClientPNames {
40  
41      public static final String CONNECTION_MANAGER_FACTORY_CLASS_NAME = "http.connection-manager.factory-class-name";
42  
43      /**
44       * Defines whether redirects should be handled automatically
45       * <p>
46       * This parameter expects a value of type {@link Boolean}.
47       * </p>
48       */
49      public static final String HANDLE_REDIRECTS = "http.protocol.handle-redirects";
50  
51      /**
52       * Defines whether relative redirects should be rejected. HTTP specification
53       * requires the location value be an absolute URI.
54       * <p>
55       * This parameter expects a value of type {@link Boolean}.
56       * </p>
57       */
58      public static final String REJECT_RELATIVE_REDIRECT = "http.protocol.reject-relative-redirect";
59  
60      /**
61       * Defines the maximum number of redirects to be followed.
62       * The limit on number of redirects is intended to prevent infinite loops.
63       * <p>
64       * This parameter expects a value of type {@link Integer}.
65       * </p>
66       */
67      public static final String MAX_REDIRECTS = "http.protocol.max-redirects";
68  
69      /**
70       * Defines whether circular redirects (redirects to the same location) should be allowed.
71       * The HTTP spec is not sufficiently clear whether circular redirects are permitted,
72       * therefore optionally they can be enabled
73       * <p>
74       * This parameter expects a value of type {@link Boolean}.
75       * </p>
76       */
77      public static final String ALLOW_CIRCULAR_REDIRECTS = "http.protocol.allow-circular-redirects";
78  
79      /**
80       * Defines whether authentication should be handled automatically.
81       * <p>
82       * This parameter expects a value of type {@link Boolean}.
83       * </p>
84       */
85      public static final String HANDLE_AUTHENTICATION = "http.protocol.handle-authentication";
86  
87      /**
88       * Defines the name of the cookie specification to be used for HTTP state management.
89       * <p>
90       * This parameter expects a value of type {@link String}.
91       * </p>
92       */
93      public static final String COOKIE_POLICY = "http.protocol.cookie-policy";
94  
95      /**
96       * Defines the virtual host to be used in the <code>Host</code>
97       * request header instead of the physical host.
98       * <p>
99       * This parameter expects a value of type {@link org.apache.http.HttpHost}.
100      * </p>
101      * If a port is not provided, it will be derived from the request URL.
102      */
103     public static final String VIRTUAL_HOST = "http.virtual-host";
104 
105     /**
106      * Defines the request headers to be sent per default with each request.
107      * <p>
108      * This parameter expects a value of type {@link java.util.Collection}. The
109      * collection is expected to contain {@link org.apache.http.Header}s.
110      * </p>
111      */
112     public static final String DEFAULT_HEADERS = "http.default-headers";
113 
114     /**
115      * Defines the default host. The default value will be used if the target host is
116      * not explicitly specified in the request URI.
117      * <p>
118      * This parameter expects a value of type {@link org.apache.http.HttpHost}.
119      * </p>
120      */
121     public static final String DEFAULT_HOST = "http.default-host";
122 
123     /**
124      * Defines the timeout in milliseconds used when retrieving an instance of
125      * {@link org.apache.http.conn.ManagedClientConnection} from the
126      * {@link org.apache.http.conn.ClientConnectionManager}.
127      * <p>
128      * This parameter expects a value of type {@link Long}.
129      * <p>
130      * @since 4.2
131      */
132     public static final String CONN_MANAGER_TIMEOUT = "http.conn-manager.timeout";
133 
134 }
135