Added constant names for parameter name strings

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1043489 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2010-12-08 16:18:20 +00:00
parent 179c717923
commit 90de30bf71
6 changed files with 55 additions and 54 deletions

View File

@ -165,7 +165,7 @@ httpclient.setUserTokenHandler(new UserTokenHandler() {
<itemizedlist>
<listitem>
<formalpara>
<title>'http.user-token':</title>
<title><constant>ClientContext.USER_TOKEN</constant>='http.user-token':</title>
<para>Object instance representing the actual user identity, usually
expected to be an instance of <interfacename>Principle</interfacename>
interface</para>

View File

@ -133,7 +133,7 @@ pwd
<itemizedlist>
<listitem>
<formalpara>
<title>'http.protocol.handle-authentication':</title>
<title><constant>ClientPNames.HANDLE_AUTHENTICATION</constant>='http.protocol.handle-authentication':</title>
<para>defines whether authentication should be handled automatically. This
parameter expects a value of type <classname>java.lang.Boolean</classname>.
If this parameter is not set, HttpClient will handle authentication
@ -142,7 +142,7 @@ pwd
</listitem>
<listitem>
<formalpara>
<title>'http.auth.credential-charset':</title>
<title><constant>AuthPNames.CREDENTIAL_CHARSET</constant>='http.auth.credential-charset':</title>
<para>defines the charset to be used when encoding user credentials. This
parameter expects a value of type <literal>java.lang.String</literal>. If
this parameter is not set, <literal>US-ASCII</literal> will be used.</para>
@ -150,7 +150,7 @@ pwd
</listitem>
<listitem>
<formalpara>
<title>'http.auth.target-scheme-pref':</title>
<title><constant>AuthPNames.TARGET_AUTH_PREF</constant>='http.auth.target-scheme-pref':</title>
<para>Defines the order of preference for supported
<interfacename>AuthScheme</interfacename>s when authenticating with the
target host. This parameter expects a value of type
@ -161,7 +161,7 @@ pwd
</listitem>
<listitem>
<formalpara>
<title>'http.auth.proxy-scheme-pref':</title>
<title><constant>AuthPNames.PROXY_AUTH_PREF</constant>='http.auth.proxy-scheme-pref':</title>
<para>Defines the order of preference for supported
<interfacename>AuthScheme</interfacename>s when authenticating with the
proxy host. This parameter expects a value of type
@ -190,25 +190,25 @@ httpclient.getParams().setParameter(AuthPNames.PROXY_AUTH_PREF, authpref);
<itemizedlist>
<listitem>
<formalpara>
<title>Basic:</title>
<title>AuthPolicy.BASIC:</title>
<para>Basic authentication</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>Digest:</title>
<title>AuthPolicy.DIGEST:</title>
<para>Digest authentication</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>NTLM:</title>
<title>AuthPolicy.NTLM:</title>
<para>NTLMv1, NTLMv2, and NTLM2 Session authentication</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>SPNEGO:</title>
<title>AuthPolicy.SPNEGO:</title>
<para>SPNEGO/Kerberos authentication</para>
</formalpara>
</listitem>
@ -277,7 +277,7 @@ null
<itemizedlist>
<listitem>
<formalpara>
<title>'http.authscheme-registry':</title>
<title><constant>ClientContext.AUTHSCHEME_REGISTRY</constant>='http.authscheme-registry':</title>
<para><classname>AuthSchemeRegistry</classname> instance representing the actual
authentication scheme registry. The value of this attribute set in the local
context takes precedence over the default one.</para>
@ -285,7 +285,7 @@ null
</listitem>
<listitem>
<formalpara>
<title>'http.auth.credentials-provider':</title>
<title><constant>ClientContext.CREDS_PROVIDER</constant>='http.auth.credentials-provider':</title>
<para><interfacename>CookieSpec</interfacename> instance representing the actual
credentials provider. The value of this attribute set in the local context
takes precedence over the default one.</para>
@ -293,7 +293,7 @@ null
</listitem>
<listitem>
<formalpara>
<title>'http.auth.target-scope':</title>
<title><constant>ClientContext.TARGET_AUTH_STATE</constant>='http.auth.target-scope':</title>
<para><classname>AuthState</classname> instance representing the actual target
authentication state. The value of this attribute set in the local context
takes precedence over the default one.</para>
@ -301,7 +301,7 @@ null
</listitem>
<listitem>
<formalpara>
<title>'http.auth.proxy-scope':</title>
<title><constant>ClientContext.PROXY_AUTH_STATE</constant>='http.auth.proxy-scope':</title>
<para><classname>AuthState</classname> instance representing the actual proxy
authentication state. The value of this attribute set in the local context
takes precedence over the default one.</para>
@ -309,7 +309,7 @@ null
</listitem>
<listitem>
<formalpara>
<title>'http.auth.auth-cache':</title>
<title><constant>ClientContext.AUTH_CACHE</constant>='http.auth.auth-cache':</title>
<para><interfacename>AuthCache</interfacename> instance representing the actual
authentication data cache. The value of this attribute set in the local
context takes precedence over the default one.</para>
@ -409,6 +409,7 @@ for (int i = 0; i < 3; i++) {
HTTP request against <literal>NTLM</literal> protected resources. For detailed
discussion on stateful HTTP connections please refer to
<link linkend="stateful_conn">this </link> section. </para>
<!-- Note: the stateful_conn anchor is in the file advanced.xml -->
<para>As <literal>NTLM</literal> connections are stateful it is generally recommended
to trigger <literal>NTLM</literal> authentication using a relatively cheap method,
such as <literal>GET</literal> or <literal>HEAD</literal>, and re-use the same

View File

@ -32,7 +32,7 @@
<itemizedlist>
<listitem>
<formalpara>
<title>'http.socket.timeout':</title>
<title><constant>CoreConnectionPNames.SO_TIMEOUT</constant>='http.socket.timeout':</title>
<para>defines the socket timeout (<literal>SO_TIMEOUT</literal>) in
milliseconds, which is the timeout for waiting for data or, put differently,
a maximum period inactivity between two consecutive data packets). A timeout
@ -43,7 +43,7 @@
</listitem>
<listitem>
<formalpara>
<title>'http.tcp.nodelay':</title>
<title><constant>CoreConnectionPNames.TCP_NODELAY</constant>='http.tcp.nodelay':</title>
<para>determines whether Nagle's algorithm is to be used. Nagle's algorithm
tries to conserve bandwidth by minimizing the number of segments that are
sent. When applications wish to decrease network latency and increase
@ -56,7 +56,7 @@
</listitem>
<listitem>
<formalpara>
<title>'http.socket.buffer-size':</title>
<title><constant>CoreConnectionPNames.SOCKET_BUFFER_SIZE</constant>='http.socket.buffer-size':</title>
<para>determines the size of the internal socket buffer used to buffer data
while receiving / transmitting HTTP messages. This parameter expects a value
of type <classname>java.lang.Integer</classname>. If this parameter is not
@ -65,7 +65,7 @@
</listitem>
<listitem>
<formalpara>
<title>'http.socket.linger':</title>
<title><constant>CoreConnectionPNames.SO_LINGER</constant>='http.socket.linger':</title>
<para>sets <literal>SO_LINGER</literal> with the specified linger time in
seconds. The maximum timeout value is platform specific. Value 0 implies
that the option is disabled. Value -1 implies that the JRE default is used.
@ -75,7 +75,7 @@
</listitem>
<listitem>
<formalpara>
<title>'http.connection.timeout':</title>
<title><constant>CoreConnectionPNames.CONNECTION_TIMEOUT</constant>='http.connection.timeout':</title>
<para>determines the timeout in milliseconds until a connection is established.
A timeout value of zero is interpreted as an infinite timeout. This
parameter expects a value of type <classname>java.lang.Integer</classname>.
@ -85,7 +85,7 @@
</listitem>
<listitem>
<formalpara>
<title>'http.connection.stalecheck':</title>
<title><constant>CoreConnectionPNames.STALE_CONNECTION_CHECK</constant>='http.connection.stalecheck':</title>
<para>determines whether stale connection check is to be used. Disabling stale
connection check may result in a noticeable performance improvement (the
check can cause up to 30 millisecond overhead per request) at the risk of
@ -98,7 +98,7 @@
</listitem>
<listitem>
<formalpara>
<title>'http.connection.max-line-length':</title>
<title><constant>CoreConnectionPNames.MAX_LINE_LENGTH</constant>='http.connection.max-line-length':</title>
<para>determines the maximum line length limit. If set to a positive value, any
HTTP line exceeding this limit will cause an
<exceptionname>java.io.IOException</exceptionname>. A negative or zero
@ -109,7 +109,7 @@
</listitem>
<listitem>
<formalpara>
<title>'http.connection.max-header-count':</title>
<title><constant>CoreConnectionPNames.MAX_HEADER_COUNT</constant>='http.connection.max-header-count':</title>
<para>determines the maximum HTTP header count allowed. If set to a positive
value, the number of HTTP headers received from the data stream exceeding
this limit will cause an <exceptionname>java.io.IOException</exceptionname>.
@ -120,7 +120,7 @@
</listitem>
<listitem>
<formalpara>
<title>'http.connection.max-status-line-garbage':</title>
<title><constant>ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE</constant>='http.connection.max-status-line-garbage':</title>
<para>defines the maximum number of ignorable lines before we expect a HTTP
response's status line. With HTTP/1.1 persistent connections, the problem
arises that broken scripts could return a wrong
@ -203,7 +203,7 @@
<itemizedlist>
<listitem>
<formalpara>
<title>'http.route.default-proxy':</title>
<title><constant>ConnRoutePNames.DEFAULT_PROXY</constant>='http.route.default-proxy':</title>
<para>defines a proxy host to be used by default route planners that do not make
use of JRE settings. This parameter expects a value of type
<classname>HttpHost</classname>. If this parameter is not set, direct
@ -212,7 +212,7 @@
</listitem>
<listitem>
<formalpara>
<title>'http.route.local-address':</title>
<title><constant>.ConnRoutePNames.LOCAL_ADDRESS</constant>='http.route.local-address':</title>
<para>defines a local address to be used by all default route planner. On
machines with multiple network interfaces, this parameter can be used to
select the network interface from which the connection originates. This
@ -223,7 +223,7 @@
</listitem>
<listitem>
<formalpara>
<title>'http.route.forced-route':</title>
<title><constant>ConnRoutePNames.FORCED_ROUTE</constant>='http.route.forced-route':</title>
<para>defines an forced route to be used by all default route planner. Instead
of computing a route, the given forced route will be returned, even if it
points to a completely different target host. This parameter expects a value

View File

@ -520,42 +520,42 @@ byte[] response = httpclient.execute(httpget, handler);
<itemizedlist>
<listitem>
<formalpara>
<title>'http.connection':</title>
<title><constant>ExecutionContext.HTTP_CONNECTION</constant>='http.connection':</title>
<para><interfacename>HttpConnection</interfacename> instance representing the
actual connection to the target server.</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>'http.target_host':</title>
<title><constant>ExecutionContext.HTTP_TARGET_HOST</constant>='http.target_host':</title>
<para><classname>HttpHost</classname> instance representing the connection
target.</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>'http.proxy_host':</title>
<title><constant>ExecutionContext.HTTP_PROXY_HOST</constant>='http.proxy_host':</title>
<para><classname>HttpHost</classname> instance representing the connection
proxy, if used</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>'http.request':</title>
<title><constant>ExecutionContext.HTTP_REQUEST</constant>='http.request':</title>
<para><interfacename>HttpRequest</interfacename> instance representing the
actual HTTP request.</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>'http.response':</title>
<title><constant>ExecutionContext.HTTP_RESPONSE</constant>='http.response':</title>
<para><interfacename>HttpResponse</interfacename> instance representing the
actual HTTP response.</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>'http.request_sent':</title>
<title><constant>ExecutionContext.HTTP_REQ_SENT</constant>='http.request_sent':</title>
<para><classname>java.lang.Boolean</classname> object representing the flag
indicating whether the actual request has been fully transmitted to the
connection target.</para>
@ -891,7 +891,7 @@ null
<itemizedlist>
<listitem>
<formalpara>
<title>'http.protocol.version':</title>
<title><constant>CoreProtocolPNames.PROTOCOL_VERSION</constant>='http.protocol.version':</title>
<para>defines HTTP protocol version used if not set explicitly on the request
object. This parameter expects a value of type
<interfacename>ProtocolVersion</interfacename>. If this parameter is not
@ -900,7 +900,7 @@ null
</listitem>
<listitem>
<formalpara>
<title>'http.protocol.element-charset':</title>
<title><constant>CoreProtocolPNames.HTTP_ELEMENT_CHARSET</constant>='http.protocol.element-charset':</title>
<para>defines the charset to be used for encoding HTTP protocol elements. This
parameter expects a value of type <classname>java.lang.String</classname>.
If this parameter is not set <literal>US-ASCII</literal> will be
@ -909,7 +909,7 @@ null
</listitem>
<listitem>
<formalpara>
<title>'http.protocol.content-charset':</title>
<title><constant>CoreProtocolPNames.HTTP_CONTENT_CHARSET</constant>='http.protocol.content-charset':</title>
<para>defines the charset to be used per default for content body coding. This
parameter expects a value of type <classname>java.lang.String</classname>.
If this parameter is not set <literal>ISO-8859-1</literal> will be
@ -918,7 +918,7 @@ null
</listitem>
<listitem>
<formalpara>
<title>'http.useragent':</title>
<title><constant>CoreProtocolPNames.USER_AGENT</constant>='http.useragent':</title>
<para>defines the content of the <literal>User-Agent</literal> header. This
parameter expects a value of type <classname>java.lang.String</classname>.
If this parameter is not set, HttpClient will automatically generate a value
@ -927,7 +927,7 @@ null
</listitem>
<listitem>
<formalpara>
<title>'http.protocol.strict-transfer-encoding':</title>
<title><constant>CoreProtocolPNames.STRICT_TRANSFER_ENCODING</constant>='http.protocol.strict-transfer-encoding':</title>
<para>defines whether responses with an invalid
<literal>Transfer-Encoding</literal> header should be rejected. This
parameter expects a value of type <classname>java.lang.Boolean</classname>.
@ -937,7 +937,7 @@ null
</listitem>
<listitem>
<formalpara>
<title>'http.protocol.expect-continue':</title>
<title><constant>CoreProtocolPNames.USE_EXPECT_CONTINUE</constant>='http.protocol.expect-continue':</title>
<para>activates the <literal>Expect: 100-Continue</literal> handshake for the entity
enclosing methods. The purpose of the <literal>Expect:
100-Continue</literal> handshake is to allow the client that is sending
@ -956,7 +956,7 @@ null
</listitem>
<listitem>
<formalpara>
<title>'http.protocol.wait-for-continue':</title>
<title><constant>CoreProtocolPNames.WAIT_FOR_CONTINUE</constant>='http.protocol.wait-for-continue':</title>
<para>defines the maximum period of time in milliseconds the client should spend
waiting for a <literal>100-continue</literal> response. This parameter
expects a value of type <classname>java.lang.Integer</classname>. If this

View File

@ -95,7 +95,7 @@ httpclient.getConnectionManager().shutdown();
<itemizedlist>
<listitem>
<formalpara>
<title>'http.protocol.handle-redirects':</title>
<title><constant>ClientPNames.HANDLE_REDIRECTS</constant>='http.protocol.handle-redirects':</title>
<para>defines whether redirects should be handled automatically. This parameter
expects a value of type <classname>java.lang.Boolean</classname>. If this
parameter is not set HttpClient will handle redirects automatically.</para>
@ -103,7 +103,7 @@ httpclient.getConnectionManager().shutdown();
</listitem>
<listitem>
<formalpara>
<title>'http.protocol.reject-relative-redirect':</title>
<title><constant>ClientPNames.REJECT_RELATIVE_REDIRECT</constant>='http.protocol.reject-relative-redirect':</title>
<para>defines whether relative redirects should be rejected. HTTP specification
requires the location value be an absolute URI. This parameter expects a
value of type <classname>java.lang.Boolean</classname>. If this parameter is
@ -112,7 +112,7 @@ httpclient.getConnectionManager().shutdown();
</listitem>
<listitem>
<formalpara>
<title>'http.protocol.max-redirects':</title>
<title><constant>ClientPNames.MAX_REDIRECTS</constant>='http.protocol.max-redirects':</title>
<para>defines the maximum number of redirects to be followed. The limit on
number of redirects is intended to prevent infinite loops caused by broken
server side scripts. This parameter expects a value of type
@ -122,7 +122,7 @@ httpclient.getConnectionManager().shutdown();
</listitem>
<listitem>
<formalpara>
<title>'http.protocol.allow-circular-redirects':</title>
<title><constant>ClientPNames.ALLOW_CIRCULAR_REDIRECTS</constant>='http.protocol.allow-circular-redirects':</title>
<para>defines whether circular redirects (redirects to the same location) should
be allowed. The HTTP spec is not sufficiently clear whether circular
redirects are permitted, therefore optionally they can be enabled. This
@ -132,7 +132,7 @@ httpclient.getConnectionManager().shutdown();
</listitem>
<listitem>
<formalpara>
<title>'http.connection-manager.factory-class-name':</title>
<title><constant>ClientPNames.CONNECTION_MANAGER_FACTORY_CLASS_NAME</constant>='http.connection-manager.factory-class-name':</title>
<para>defines the class name of the default
<interfacename>ClientConnectionManager</interfacename> implementation.
This parameter expects a value of type
@ -143,7 +143,7 @@ httpclient.getConnectionManager().shutdown();
</listitem>
<listitem>
<formalpara>
<title>'http.virtual-host':</title>
<title><constant>ClientPNames.VIRTUAL_HOST</constant>='http.virtual-host':</title>
<para>defines the virtual host name to be used in the <literal>Host</literal>
header instead of the physical host name. This parameter expects a value of
type <classname>HttpHost</classname>. If this parameter is not set name or
@ -152,7 +152,7 @@ httpclient.getConnectionManager().shutdown();
</listitem>
<listitem>
<formalpara>
<title>'http.default-headers':</title>
<title><constant>ClientPNames.DEFAULT_HEADERS</constant>='http.default-headers':</title>
<para>defines the request headers to be sent per default with each request. This
parameter expects a value of type
<interfacename>java.util.Collection</interfacename> containing
@ -161,7 +161,7 @@ httpclient.getConnectionManager().shutdown();
</listitem>
<listitem>
<formalpara>
<title>'http.default-host':</title>
<title><constant>ClientPNames.DEFAULT_HOST</constant>='http.default-host':</title>
<para>defines the default host. The default value will be used if the target
host is not explicitly specified in the request URI (relative URIs). This
parameter expects a value of type <classname>HttpHost</classname>.</para>

View File

@ -172,7 +172,7 @@ stdCookie.setAttribute(ClientCookie.PORT_ATTR, "80,8080");
<itemizedlist>
<listitem>
<formalpara>
<title>'http.protocol.cookie-datepatterns':</title>
<title><constant>CookieSpecPNames.DATE_PATTERNS</constant>='http.protocol.cookie-datepatterns':</title>
<para>defines valid date patterns to be used for parsing non-standard
<literal>expires</literal> attribute. Only required for compatibility
with non-compliant servers that still use <literal>expires</literal> defined
@ -187,7 +187,7 @@ stdCookie.setAttribute(ClientCookie.PORT_ATTR, "80,8080");
</listitem>
<listitem>
<formalpara>
<title>'http.protocol.single-cookie-header':</title>
<title><constant>CookieSpecPNames.SINGLE_COOKIE_HEADER</constant>='http.protocol.single-cookie-header':</title>
<para>defines whether cookies should be forced into a single
<literal>Cookie</literal> request header. Otherwise, each cookie is
formatted as a separate <literal>Cookie</literal> header. This parameter
@ -201,7 +201,7 @@ stdCookie.setAttribute(ClientCookie.PORT_ATTR, "80,8080");
</listitem>
<listitem>
<formalpara>
<title>'http.protocol.cookie-policy':</title>
<title><constant>ClientPNames.COOKIE_POLICY</constant>='http.protocol.cookie-policy':</title>
<para>defines the name of a cookie specification to be used for HTTP state
management. This parameter expects a value of type
<classname>java.lang.String</classname>. If this parameter is not set,
@ -323,7 +323,7 @@ httpclient.setCookieStore(cookieStore);
<itemizedlist>
<listitem>
<formalpara>
<title>'http.cookiespec-registry':</title>
<title><constant>ClientContext.COOKIESPEC_REGISTRY</constant>='http.cookiespec-registry':</title>
<para><classname>CookieSpecRegistry</classname> instance representing the actual
cookie specification registry. The value of this attribute set in the local
context takes precedence over the default one.</para>
@ -331,21 +331,21 @@ httpclient.setCookieStore(cookieStore);
</listitem>
<listitem>
<formalpara>
<title>'http.cookie-spec':</title>
<title><constant>ClientContext.COOKIE_SPEC</constant>='http.cookie-spec':</title>
<para><interfacename>CookieSpec</interfacename> instance representing the actual
cookie specification.</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>'http.cookie-origin':</title>
<title><constant>ClientContext.COOKIE_ORIGIN</constant>='http.cookie-origin':</title>
<para><classname>CookieOrigin</classname> instance representing the actual
details of the origin server.</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>'http.cookie-store':</title>
<title><constant>ClientContext.COOKIE_STORE</constant>='http.cookie-store':</title>
<para><interfacename>CookieStore</interfacename> instance representing the actual
cookie store. The value of this attribute set in the local context takes
precedence over the default one.</para>