Java Doc for HttpMethodParams.java in  » Net » Apache-common-HttpClient » org » apache » commons » httpclient » params » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Apache common HttpClient » org.apache.commons.httpclient.params 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.httpclient.params.DefaultHttpParams
      org.apache.commons.httpclient.params.HttpMethodParams

All known Subclasses:   org.apache.commons.httpclient.params.HttpClientParams,
HttpMethodParams
public class HttpMethodParams extends DefaultHttpParams (Code)
This class represents a collection of HTTP protocol parameters applicable to org.apache.commons.httpclient.HttpMethod HTTP methods . 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.
author:
   Oleg Kalnichevski
author:
   Christian Kohlschuetter
version:
   $Revision: 483949 $
since:
   3.0


Field Summary
final public static  StringBUFFER_WARN_TRIGGER_LIMIT
     Sets the maximum buffered response size (in bytes) that triggers no warning.
final public static  StringCOOKIE_POLICY
     Defines CookiePolicy cookie policy to be used for cookie management.
final public static  StringCREDENTIAL_CHARSET
     Defines the charset to be used when encoding org.apache.commons.httpclient.Credentials .
final public static  StringDATE_PATTERNS
     The key used to look up the date patterns used for parsing.
final public static  StringHEAD_BODY_CHECK_TIMEOUT
     Sets period of time in milliseconds to wait for a content body sent in response to org.apache.commons.httpclient.methods.HeadMethod HEAD method from a non-compliant server.
final public static  StringHTTP_CONTENT_CHARSET
     Defines the charset to be used for encoding content body.
final public static  StringHTTP_ELEMENT_CHARSET
     Defines the charset to be used for encoding HTTP protocol elements.
final public static  StringHTTP_URI_CHARSET
     Defines the charset to be used for parsing URIs.
final public static  StringMULTIPART_BOUNDARY
     Sets the value to use as the multipart boundary.
final public static  StringPROTOCOL_VERSION
     Defines the HttpVersion HTTP protocol version used by org.apache.commons.httpclient.HttpMethod HTTP methods per default.
final public static  StringREJECT_HEAD_BODY
     Defines whether the content body sent in response to org.apache.commons.httpclient.methods.HeadMethod should be rejected.
final public static  StringRETRY_HANDLER
     Sets the method retry handler parameter.
final public static  StringSINGLE_COOKIE_HEADER
     Defines whether org.apache.commons.httpclient.Cookie cookies should be put on a single org.apache.commons.httpclient.Header response header .
final public static  StringSO_TIMEOUT
     Sets the socket timeout (SO_TIMEOUT) in milliseconds to be used when executing the method.
final public static  StringSTATUS_LINE_GARBAGE_LIMIT
     Defines the maximum number of ignorable lines before we expect a HTTP response's status code.

With HTTP/1.1 persistent connections, the problem arises that broken scripts could return a wrong Content-Length (there are more bytes sent than specified).
Unfortunately, in some cases, this is not possible after the bad response, but only before the next one.

final public static  StringSTRICT_TRANSFER_ENCODING
     Defines whether responses with an invalid Transfer-Encoding header should be rejected.
final public static  StringUNAMBIGUOUS_STATUS_LINE
     Defines whether org.apache.commons.httpclient.HttpMethod HTTP methods should reject ambiguous org.apache.commons.httpclient.StatusLine HTTP status line .
final public static  StringUSER_AGENT
     Defines the content of the User-Agent header used by org.apache.commons.httpclient.HttpMethod HTTP methods .
final public static  StringUSE_EXPECT_CONTINUE
    

Activates 'Expect: 100-Continue' handshake for the org.apache.commons.httpclient.methods.ExpectContinueMethod entity enclosing methods .

final public static  StringVIRTUAL_HOST
     Defines the virtual host name.

This parameter expects a value of type java.lang.String .

final public static  StringWARN_EXTRA_INPUT
     Defines HttpClient's behavior when a response provides more bytes than expected (specified with Content-Length, for example).

Constructor Summary
public  HttpMethodParams()
     Creates a new collection of parameters with the collection returned by HttpMethodParams.getDefaultParams() as a parent.
public  HttpMethodParams(HttpParams defaults)
     Creates a new collection of parameters with the given parent.

Method Summary
public  StringgetContentCharset()
     Returns the default charset to be used for writing content body, when no charset explicitly specified.
public  StringgetCookiePolicy()
     Returns CookiePolicy cookie policy to be used by the org.apache.commons.httpclient.HttpMethod HTTP methods this collection of parameters applies to.
public  StringgetCredentialCharset()
     Returns the charset to be used for org.apache.commons.httpclient.Credentials .
public  StringgetHttpElementCharset()
     Returns the charset to be used for writing HTTP headers.
public  intgetSoTimeout()
     Returns the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data.
public  StringgetUriCharset()
     Returns the charset to be used for parsing URIs.
public  HttpVersiongetVersion()
     Returns HttpVersion HTTP protocol version to be used by the org.apache.commons.httpclient.HttpMethod HTTP methods that this collection of parameters applies to.
public  StringgetVirtualHost()
     Returns the virtual host name.
public  voidmakeLenient()
     Makes the org.apache.commons.httpclient.HttpMethod 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).
public  voidmakeStrict()
     Makes the org.apache.commons.httpclient.HttpMethod 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.
public  voidsetContentCharset(String charset)
     Sets the default charset to be used for writing content body, when no charset explicitly specified.
public  voidsetCookiePolicy(String policy)
     Assigns the CookiePolicy cookie policy to be used by the org.apache.commons.httpclient.HttpMethod HTTP methods this collection of parameters applies to.
public  voidsetCredentialCharset(String charset)
     Sets the charset to be used for writing HTTP headers.
public  voidsetHttpElementCharset(String charset)
     Sets the charset to be used for writing HTTP headers.
public  voidsetSoTimeout(int timeout)
     Sets the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data.
public  voidsetUriCharset(String charset)
     Sets the charset to be used for parsing URIs.
public  voidsetVersion(HttpVersion version)
     Assigns the HttpVersion HTTP protocol version to be used by the org.apache.commons.httpclient.HttpMethod HTTP methods that this collection of parameters applies to.
public  voidsetVirtualHost(String hostname)
     Sets the virtual host name.

Field Detail
BUFFER_WARN_TRIGGER_LIMIT
final public static String BUFFER_WARN_TRIGGER_LIMIT(Code)
Sets the maximum buffered response size (in bytes) that triggers no warning. Buffered responses exceeding this size will trigger a warning in the log.

This parameter expects a value if type Integer .




COOKIE_POLICY
final public static String COOKIE_POLICY(Code)
Defines CookiePolicy cookie policy to be used for cookie management.

This parameter expects a value of type String .




CREDENTIAL_CHARSET
final public static String CREDENTIAL_CHARSET(Code)
Defines the charset to be used when encoding org.apache.commons.httpclient.Credentials . If not defined then the HttpMethodParams.HTTP_ELEMENT_CHARSET should be used.

This parameter expects a value of type String .




DATE_PATTERNS
final public static String DATE_PATTERNS(Code)
The key used to look up the date patterns used for parsing. The String patterns are stored in a java.util.Collection and must be compatible with java.text.SimpleDateFormat .

This parameter expects a value of type java.util.Collection .




HEAD_BODY_CHECK_TIMEOUT
final public static String HEAD_BODY_CHECK_TIMEOUT(Code)
Sets period of time in milliseconds to wait for a content body sent in response to org.apache.commons.httpclient.methods.HeadMethod HEAD method from a non-compliant server. If the parameter is not set or set to -1 non-compliant response body check is disabled.

This parameter expects a value of type Integer .




HTTP_CONTENT_CHARSET
final public static String HTTP_CONTENT_CHARSET(Code)
Defines the charset to be used for encoding content body.

This parameter expects a value of type String .




HTTP_ELEMENT_CHARSET
final public static String HTTP_ELEMENT_CHARSET(Code)
Defines the charset to be used for encoding HTTP protocol elements.

This parameter expects a value of type String .




HTTP_URI_CHARSET
final public static String HTTP_URI_CHARSET(Code)
Defines the charset to be used for parsing URIs.

This parameter expects a value of type String .




MULTIPART_BOUNDARY
final public static String MULTIPART_BOUNDARY(Code)
Sets the value to use as the multipart boundary.

This parameter expects a value if type String .


See Also:   org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity



PROTOCOL_VERSION
final public static String PROTOCOL_VERSION(Code)
Defines the HttpVersion HTTP protocol version used by org.apache.commons.httpclient.HttpMethod HTTP methods per default.

This parameter expects a value of type HttpVersion .




REJECT_HEAD_BODY
final public static String REJECT_HEAD_BODY(Code)
Defines whether the content body sent in response to org.apache.commons.httpclient.methods.HeadMethod should be rejected.

This parameter expects a value of type Boolean .




RETRY_HANDLER
final public static String RETRY_HANDLER(Code)
Sets the method retry handler parameter.

This parameter expects a value of type org.apache.commons.httpclient.HttpMethodRetryHandler .




SINGLE_COOKIE_HEADER
final public static String SINGLE_COOKIE_HEADER(Code)
Defines whether org.apache.commons.httpclient.Cookie cookies should be put on a single org.apache.commons.httpclient.Header response header .

This parameter expects a value of type Boolean .




SO_TIMEOUT
final public static String SO_TIMEOUT(Code)
Sets the socket timeout (SO_TIMEOUT) in milliseconds to be used when executing the method. A timeout value of zero is interpreted as an infinite timeout.

This parameter expects a value of type Integer .


See Also:   java.net.SocketOptions.SO_TIMEOUT



STATUS_LINE_GARBAGE_LIMIT
final public static String STATUS_LINE_GARBAGE_LIMIT(Code)
Defines the maximum number of ignorable lines before we expect a HTTP response's status code.

With HTTP/1.1 persistent connections, the problem arises that broken scripts could return a wrong Content-Length (there are more bytes sent than specified).
Unfortunately, in some cases, this is not possible after the bad response, but only before the next one.
So, HttpClient must be able to skip those surplus lines this way.

Set this to 0 to disallow any garbage/empty lines before the status line.
To specify no limit, use java.lang.Integer.MAX_VALUE (default in lenient mode).

This parameter expects a value of type Integer .



STRICT_TRANSFER_ENCODING
final public static String STRICT_TRANSFER_ENCODING(Code)
Defines whether responses with an invalid Transfer-Encoding header should be rejected.

This parameter expects a value of type Boolean .




UNAMBIGUOUS_STATUS_LINE
final public static String UNAMBIGUOUS_STATUS_LINE(Code)
Defines whether org.apache.commons.httpclient.HttpMethod HTTP methods should reject ambiguous org.apache.commons.httpclient.StatusLine HTTP status line .

This parameter expects a value of type Boolean .




USER_AGENT
final public static String USER_AGENT(Code)
Defines the content of the User-Agent header used by org.apache.commons.httpclient.HttpMethod HTTP methods .

This parameter expects a value of type String .




USE_EXPECT_CONTINUE
final public static String USE_EXPECT_CONTINUE(Code)

Activates 'Expect: 100-Continue' handshake for the org.apache.commons.httpclient.methods.ExpectContinueMethod entity enclosing methods . The purpose of the 'Expect: 100-Continue' handshake to allow a client that is sending a request message with a request body to determine if the origin server is willing to accept the request (based on the request headers) before the client sends the request body.

The use of the 'Expect: 100-continue' handshake can result in noticable peformance improvement for entity enclosing requests (such as POST and PUT) that require the target server's authentication.

'Expect: 100-continue' handshake should be used with caution, as it may cause problems with HTTP servers and proxies that do not support HTTP/1.1 protocol.

This parameter expects a value of type Boolean .



VIRTUAL_HOST
final public static String VIRTUAL_HOST(Code)
Defines the virtual host name.

This parameter expects a value of type java.lang.String .




WARN_EXTRA_INPUT
final public static String WARN_EXTRA_INPUT(Code)
Defines HttpClient's behavior when a response provides more bytes than expected (specified with Content-Length, for example).

Such surplus data makes the HTTP connection unreliable for keep-alive requests, as malicious response data (faked headers etc.) can lead to undesired results on the next request using that connection.

If this parameter is set to true, any detection of extra input data will generate a warning in the log.

This parameter expects a value of type Boolean .





Constructor Detail
HttpMethodParams
public HttpMethodParams()(Code)
Creates a new collection of parameters with the collection returned by HttpMethodParams.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.
See Also:   HttpMethodParams.getDefaultParams()



HttpMethodParams
public HttpMethodParams(HttpParams defaults)(Code)
Creates a new collection of parameters with the given parent. The collection will defer to its parent for a default value if a particular parameter is not explicitly set in the collection itself.
Parameters:
  defaults - the parent collection to defer to, if a parameteris not explictly set in the collection itself.
See Also:   HttpMethodParams.getDefaultParams()




Method Detail
getContentCharset
public String getContentCharset()(Code)
Returns the default charset to be used for writing content body, when no charset explicitly specified. The charset



getCookiePolicy
public String getCookiePolicy()(Code)
Returns CookiePolicy cookie policy to be used by the org.apache.commons.httpclient.HttpMethod HTTP methods this collection of parameters applies to. CookiePolicy cookie policy



getCredentialCharset
public String getCredentialCharset()(Code)
Returns the charset to be used for org.apache.commons.httpclient.Credentials . If not configured the HttpMethodParams.HTTP_ELEMENT_CHARSET HTTP element charset is used. The charset



getHttpElementCharset
public String getHttpElementCharset()(Code)
Returns the charset to be used for writing HTTP headers. The charset



getSoTimeout
public int getSoTimeout()(Code)
Returns the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. A timeout value of zero is interpreted as an infinite timeout. timeout in milliseconds



getUriCharset
public String getUriCharset()(Code)
Returns the charset to be used for parsing URIs. The charset



getVersion
public HttpVersion getVersion()(Code)
Returns HttpVersion HTTP protocol version to be used by the org.apache.commons.httpclient.HttpMethod HTTP methods that this collection of parameters applies to. HttpVersion HTTP protocol version



getVirtualHost
public String getVirtualHost()(Code)
Returns the virtual host name. The virtual host name



makeLenient
public void makeLenient()(Code)
Makes the org.apache.commons.httpclient.HttpMethod 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).



makeStrict
public void makeStrict()(Code)
Makes the org.apache.commons.httpclient.HttpMethod 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.



setContentCharset
public void setContentCharset(String charset)(Code)
Sets the default charset to be used for writing content body, when no charset explicitly specified.
Parameters:
  charset - The charset



setCookiePolicy
public void setCookiePolicy(String policy)(Code)
Assigns the CookiePolicy cookie policy to be used by the org.apache.commons.httpclient.HttpMethod HTTP methods this collection of parameters applies to.
Parameters:
  policy - the CookiePolicy cookie policy



setCredentialCharset
public void setCredentialCharset(String charset)(Code)
Sets the charset to be used for writing HTTP headers.
Parameters:
  charset - The charset



setHttpElementCharset
public void setHttpElementCharset(String charset)(Code)
Sets the charset to be used for writing HTTP headers.
Parameters:
  charset - The charset



setSoTimeout
public void setSoTimeout(int timeout)(Code)
Sets the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. A timeout value of zero is interpreted as an infinite timeout.
Parameters:
  timeout - Timeout in milliseconds



setUriCharset
public void setUriCharset(String charset)(Code)
Sets the charset to be used for parsing URIs.
Parameters:
  charset - The charset



setVersion
public void setVersion(HttpVersion version)(Code)
Assigns the HttpVersion HTTP protocol version to be used by the org.apache.commons.httpclient.HttpMethod HTTP methods that this collection of parameters applies to.
Parameters:
  version - the HttpVersion HTTP protocol version



setVirtualHost
public void setVirtualHost(String hostname)(Code)
Sets the virtual host name.
Parameters:
  hostname - The host name



Methods inherited from org.apache.commons.httpclient.params.DefaultHttpParams
public void clear()(Code)(Java Doc)
public Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean getBooleanParameter(String name, boolean defaultValue)(Code)(Java Doc)
public static HttpParams getDefaultParams()(Code)(Java Doc)
public synchronized HttpParams getDefaults()(Code)(Java Doc)
public double getDoubleParameter(String name, double defaultValue)(Code)(Java Doc)
public int getIntParameter(String name, int defaultValue)(Code)(Java Doc)
public long getLongParameter(String name, long defaultValue)(Code)(Java Doc)
public synchronized Object getParameter(String name)(Code)(Java Doc)
public boolean isParameterFalse(String name)(Code)(Java Doc)
public boolean isParameterSet(String name)(Code)(Java Doc)
public boolean isParameterSetLocally(String name)(Code)(Java Doc)
public boolean isParameterTrue(String name)(Code)(Java Doc)
public void setBooleanParameter(String name, boolean value)(Code)(Java Doc)
public synchronized void setDefaults(HttpParams params)(Code)(Java Doc)
public void setDoubleParameter(String name, double value)(Code)(Java Doc)
public static void setHttpParamsFactory(HttpParamsFactory httpParamsFactory)(Code)(Java Doc)
public void setIntParameter(String name, int value)(Code)(Java Doc)
public void setLongParameter(String name, long value)(Code)(Java Doc)
public synchronized void setParameter(String name, Object value)(Code)(Java Doc)
public synchronized void setParameters(String[] names, Object value)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.