|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.httpclient.params.DefaultHttpParams
com.microsoft.tfs.core.httpclient.params.HttpMethodParams
com.microsoft.tfs.core.httpclient.params.HttpClientParams
public class HttpClientParams
This class represents a collection of HTTP protocol parameters applicable to
instances of HttpClient
.
Protocol parameters may be linked together to form a hierarchy. If a
particular parameter value has not been explicitly defined in the collection
itself, its value will be drawn from the parent collection of parameters.
Field Summary | |
---|---|
static java.lang.String |
ALLOW_CIRCULAR_REDIRECTS
Defines whether circular redirects (redirects to the same location) should be allowed. |
static java.lang.String |
CONNECTION_MANAGER_CLASS
Defines the default HTTP
connection manager class. |
static java.lang.String |
CONNECTION_MANAGER_TIMEOUT
Sets the timeout in milliseconds used when retrieving an HTTP connection from
the HTTP
connection manager . |
static java.lang.String |
MAX_REDIRECTS
Defines the maximum number of redirects to be followed. |
static java.lang.String |
PREEMPTIVE_AUTHENTICATION_CREDENTIAL_TYPES
Defines whether authentication should be attempted preemptively, and the credential types that should be presented preemptively. |
static java.lang.String |
REJECT_RELATIVE_REDIRECT
Defines whether relative redirects should be rejected. |
Fields inherited from class com.microsoft.tfs.core.httpclient.params.HttpMethodParams |
---|
BUFFER_WARN_TRIGGER_LIMIT, COOKIE_POLICY, CREDENTIAL_CHARSET, DATE_PATTERNS, HEAD_BODY_CHECK_TIMEOUT, HTTP_CONTENT_CHARSET, HTTP_ELEMENT_CHARSET, HTTP_URI_CHARSET, MULTIPART_BOUNDARY, PROTOCOL_VERSION, REJECT_HEAD_BODY, RETRY_HANDLER, SINGLE_COOKIE_HEADER, SO_TIMEOUT, STATUS_LINE_GARBAGE_LIMIT, STRICT_TRANSFER_ENCODING, UNAMBIGUOUS_STATUS_LINE, USE_EXPECT_CONTINUE, USER_AGENT, VIRTUAL_HOST, WARN_EXTRA_INPUT |
Constructor Summary | |
---|---|
HttpClientParams()
Creates a new collection of parameters with the collection returned by DefaultHttpParams.getDefaultParams() as a parent. |
|
HttpClientParams(HttpParams defaults)
Creates a new collection of parameters with the given parent. |
Method Summary | |
---|---|
java.lang.Class |
getConnectionManagerClass()
Returns the default HTTP
connection manager class. |
long |
getConnectionManagerTimeout()
Returns the timeout in milliseconds used when retrieving an HTTP connection from
the HTTP
connection manager . |
java.lang.Class[] |
getPreemptiveAuthenticationTypes()
Returns true if authentication should be attempted preemptively, false otherwise. |
void |
makeLenient()
Makes the HTTP methods
attempt to mimic the exact behaviour of commonly used HTTP agents, which
many HTTP servers expect, even though such behaviour may violate the HTTP
protocol specification (RFC 2616 and other relevant RFCs). |
void |
makeStrict()
Makes the HTTP methods
strictly follow the HTTP protocol specification (RFC 2616 and other
relevant RFCs). |
void |
setConnectionManagerClass(java.lang.Class clazz)
Sets HTTP
connection manager class to be used der default. |
void |
setConnectionManagerTimeout(long timeout)
Sets the timeout in milliseconds used when retrieving an HTTP connection from
the HTTP
connection manager . |
void |
setPreemptiveAuthenticationTypes(java.lang.Class[] credentialClass)
Sets whether authentication should be attempted preemptively. |
Methods inherited from class com.microsoft.tfs.core.httpclient.params.HttpMethodParams |
---|
getContentCharset, getCookiePolicy, getCredentialCharset, getHttpElementCharset, getSoTimeout, getUriCharset, getVersion, getVirtualHost, setContentCharset, setCookiePolicy, setCredentialCharset, setHttpElementCharset, setSoTimeout, setUriCharset, setVersion, setVirtualHost |
Methods inherited from class com.microsoft.tfs.core.httpclient.params.DefaultHttpParams |
---|
clear, clone, getBooleanParameter, getDefaultParams, getDefaults, getDoubleParameter, getIntParameter, getLongParameter, getParameter, isParameterFalse, isParameterSet, isParameterSetLocally, isParameterTrue, setBooleanParameter, setDefaults, setDoubleParameter, setHttpParamsFactory, setIntParameter, setLongParameter, setParameter, setParameters |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONNECTION_MANAGER_TIMEOUT
HTTP connection
from
the HTTP
connection manager
.
This parameter expects a value of type Long
.
"http.connection-manager.timeout"
public static final java.lang.String CONNECTION_MANAGER_CLASS
HTTP
connection manager
class.
This parameter expects a value of type Class
.
"http.connection-manager.class"
public static final java.lang.String PREEMPTIVE_AUTHENTICATION_CREDENTIAL_TYPES
This parameter is an array of Class
es that represent the type of
credentials.
"http.authentication.preemptive_credential_types"
public static final java.lang.String REJECT_RELATIVE_REDIRECT
This parameter expects a value of type Boolean
.
"http.protocol.reject-relative-redirect"
public static final java.lang.String MAX_REDIRECTS
This parameter expects a value of type Integer
.
"http.protocol.max-redirects"
public static final java.lang.String ALLOW_CIRCULAR_REDIRECTS
This parameter expects a value of type Boolean
.
"http.protocol.allow-circular-redirects"
Constructor Detail |
---|
public HttpClientParams()
DefaultHttpParams.getDefaultParams()
as a parent. The collection will defer to its
parent for a default value if a particular parameter is not explicitly
set in the collection itself.
DefaultHttpParams.getDefaultParams()
public HttpClientParams(HttpParams defaults)
defaults
- the parent collection to defer to, if a parameter is not explictly
set in the collection itself.DefaultHttpParams.getDefaultParams()
Method Detail |
---|
public long getConnectionManagerTimeout()
HTTP connection
from
the HTTP
connection manager
.
public void setConnectionManagerTimeout(long timeout)
HTTP connection
from
the HTTP
connection manager
.
timeout
- the timeout in millisecondspublic java.lang.Class getConnectionManagerClass()
HTTP
connection manager
class.
HTTP
connection manager
factory class.public void setConnectionManagerClass(java.lang.Class clazz)
HTTP
connection manager
class to be used der default.
clazz
- HTTP
connection manager
factory class.public java.lang.Class[] getPreemptiveAuthenticationTypes()
public void setPreemptiveAuthenticationTypes(java.lang.Class[] credentialClass)
value
- true if authentication should be attempted preemptively,
false otherwise.public void makeStrict()
HttpMethodParams
HTTP methods
strictly follow the HTTP protocol specification (RFC 2616 and other
relevant RFCs). It must be noted that popular HTTP agents have different
degree of HTTP protocol compliance and some HTTP serves are programmed to
expect the behaviour that does not strictly adhere to the HTTP
specification.
makeStrict
in class HttpMethodParams
public void makeLenient()
HttpMethodParams
HTTP methods
attempt to mimic the exact behaviour of commonly used HTTP agents, which
many HTTP servers expect, even though such behaviour may violate the HTTP
protocol specification (RFC 2616 and other relevant RFCs).
makeLenient
in class HttpMethodParams
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |