Java Doc for ExpectContinueMethod.java in  » Net » Apache-common-HttpClient » org » apache » commons » httpclient » methods » 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.methods 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.httpclient.HttpMethodBase
      org.apache.commons.httpclient.methods.ExpectContinueMethod

All known Subclasses:   org.apache.commons.httpclient.methods.MultipartPostMethod,  org.apache.commons.httpclient.methods.EntityEnclosingMethod,
ExpectContinueMethod
abstract public class ExpectContinueMethod extends HttpMethodBase (Code)

This abstract class serves as a foundation for all HTTP methods that support 'Expect: 100-continue' handshake.

The purpose of the 100 (Continue) status (refer to section 10.1.1 of the RFC 2616 for more details) is 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. In some cases, it might either be inappropriate or highly inefficient for the client to send the body if the server will reject the message without looking at the body.

'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.


author:
   Oleg Kalnichevski
since:
   2.0beta1



Constructor Summary
public  ExpectContinueMethod()
     No-arg constructor.
public  ExpectContinueMethod(String uri)
     Constructor specifying a URI.

Method Summary
protected  voidaddRequestHeaders(HttpState state, HttpConnection conn)
     Sets the Expect header if it has not already been set, in addition to the "standard" set of headers.
Parameters:
  state - the HttpState state information associated with this method
Parameters:
  conn - the HttpConnection connection used to executethis HTTP method
throws:
  IOException - if an I/O (transport) error occurs.
public  booleangetUseExpectHeader()
    

Returns true if the 'Expect: 100-Continue' handshake is activated.

abstract protected  booleanhasRequestContent()
     Returns true if there is a request body to be sent.
public  voidsetUseExpectHeader(boolean value)
    

Activates 'Expect: 100-Continue' handshake.



Constructor Detail
ExpectContinueMethod
public ExpectContinueMethod()(Code)
No-arg constructor.
since:
   2.0



ExpectContinueMethod
public ExpectContinueMethod(String uri)(Code)
Constructor specifying a URI.
Parameters:
  uri - either an absolute or relative URI
since:
   2.0




Method Detail
addRequestHeaders
protected void addRequestHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException(Code)
Sets the Expect header if it has not already been set, in addition to the "standard" set of headers.
Parameters:
  state - the HttpState state information associated with this method
Parameters:
  conn - the HttpConnection connection used to executethis HTTP method
throws:
  IOException - if an I/O (transport) error occurs. Some transport exceptionscan be recovered from.
throws:
  HttpException - if a protocol exception occurs. Usually protocol exceptions cannot be recovered from.



getUseExpectHeader
public boolean getUseExpectHeader()(Code)

Returns true if the 'Expect: 100-Continue' handshake is activated. 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.

true if 'Expect: 100-Continue' handshake is tobe used, false otherwise.
since:
   2.0beta1HttpMethodParams
See Also:   ExpectContinueMethod.getParams()
See Also:   HttpMethodParams
See Also:   HttpMethodParams.USE_EXPECT_CONTINUE



hasRequestContent
abstract protected boolean hasRequestContent()(Code)
Returns true if there is a request body to be sent. 'Expect: 100-continue' handshake may not be used if request body is not present boolean
since:
   2.0beta1



setUseExpectHeader
public void setUseExpectHeader(boolean value)(Code)

Activates 'Expect: 100-Continue' handshake. 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.


Parameters:
  value - boolean value
since:
   2.0beta1HttpMethodParams
See Also:   ExpectContinueMethod.getParams()
See Also:   HttpMethodParams
See Also:   HttpMethodParams.USE_EXPECT_CONTINUE



Fields inherited from org.apache.commons.httpclient.HttpMethodBase
protected HttpVersion effectiveVersion(Code)(Java Doc)
protected StatusLine statusLine(Code)(Java Doc)

Methods inherited from org.apache.commons.httpclient.HttpMethodBase
public void abort()(Code)(Java Doc)
protected void addCookieRequestHeader(HttpState state, HttpConnection conn) throws IOException, HttpException(Code)(Java Doc)
protected void addHostRequestHeader(HttpState state, HttpConnection conn) throws IOException, HttpException(Code)(Java Doc)
protected void addProxyConnectionHeader(HttpState state, HttpConnection conn) throws IOException, HttpException(Code)(Java Doc)
public void addRequestHeader(Header header)(Code)(Java Doc)
public void addRequestHeader(String headerName, String headerValue)(Code)(Java Doc)
protected void addRequestHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException(Code)(Java Doc)
public void addResponseFooter(Header footer)(Code)(Java Doc)
protected void addUserAgentRequestHeader(HttpState state, HttpConnection conn) throws IOException, HttpException(Code)(Java Doc)
protected void checkNotUsed() throws IllegalStateException(Code)(Java Doc)
protected void checkUsed() throws IllegalStateException(Code)(Java Doc)
public int execute(HttpState state, HttpConnection conn) throws HttpException, IOException(Code)(Java Doc)
protected static String generateRequestLine(HttpConnection connection, String name, String requestPath, String query, String version)(Code)(Java Doc)
public String getAuthenticationRealm()(Code)(Java Doc)
protected String getContentCharSet(Header contentheader)(Code)(Java Doc)
public boolean getDoAuthentication()(Code)(Java Doc)
public HttpVersion getEffectiveVersion()(Code)(Java Doc)
public boolean getFollowRedirects()(Code)(Java Doc)
public AuthState getHostAuthState()(Code)(Java Doc)
public HostConfiguration getHostConfiguration()(Code)(Java Doc)
public MethodRetryHandler getMethodRetryHandler()(Code)(Java Doc)
abstract public String getName()(Code)(Java Doc)
public HttpMethodParams getParams()(Code)(Java Doc)
public String getPath()(Code)(Java Doc)
public AuthState getProxyAuthState()(Code)(Java Doc)
public String getProxyAuthenticationRealm()(Code)(Java Doc)
public String getQueryString()(Code)(Java Doc)
public int getRecoverableExceptionCount()(Code)(Java Doc)
public String getRequestCharSet()(Code)(Java Doc)
public Header getRequestHeader(String headerName)(Code)(Java Doc)
protected HeaderGroup getRequestHeaderGroup()(Code)(Java Doc)
public Header[] getRequestHeaders()(Code)(Java Doc)
public Header[] getRequestHeaders(String headerName)(Code)(Java Doc)
public byte[] getResponseBody() throws IOException(Code)(Java Doc)
public byte[] getResponseBody(int maxlen) throws IOException(Code)(Java Doc)
public InputStream getResponseBodyAsStream() throws IOException(Code)(Java Doc)
public String getResponseBodyAsString() throws IOException(Code)(Java Doc)
public String getResponseBodyAsString(int maxlen) throws IOException(Code)(Java Doc)
public String getResponseCharSet()(Code)(Java Doc)
public long getResponseContentLength()(Code)(Java Doc)
public Header getResponseFooter(String footerName)(Code)(Java Doc)
public Header[] getResponseFooters()(Code)(Java Doc)
public Header getResponseHeader(String headerName)(Code)(Java Doc)
protected HeaderGroup getResponseHeaderGroup()(Code)(Java Doc)
public Header[] getResponseHeaders(String headerName)(Code)(Java Doc)
public Header[] getResponseHeaders()(Code)(Java Doc)
protected InputStream getResponseStream()(Code)(Java Doc)
protected HeaderGroup getResponseTrailerHeaderGroup()(Code)(Java Doc)
public int getStatusCode()(Code)(Java Doc)
public StatusLine getStatusLine()(Code)(Java Doc)
public String getStatusText()(Code)(Java Doc)
public URI getURI() throws URIException(Code)(Java Doc)
public boolean hasBeenUsed()(Code)(Java Doc)
public boolean isAborted()(Code)(Java Doc)
protected boolean isConnectionCloseForced()(Code)(Java Doc)
public boolean isHttp11()(Code)(Java Doc)
public boolean isRequestSent()(Code)(Java Doc)
public boolean isStrictMode()(Code)(Java Doc)
protected void processCookieHeaders(CookieSpec parser, Header[] headers, HttpState state, HttpConnection conn)(Code)(Java Doc)
protected void processResponseBody(HttpState state, HttpConnection conn)(Code)(Java Doc)
protected void processResponseHeaders(HttpState state, HttpConnection conn)(Code)(Java Doc)
protected void processStatusLine(HttpState state, HttpConnection conn)(Code)(Java Doc)
protected void readResponse(HttpState state, HttpConnection conn) throws IOException, HttpException(Code)(Java Doc)
protected void readResponseBody(HttpState state, HttpConnection conn) throws IOException, HttpException(Code)(Java Doc)
protected void readResponseHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException(Code)(Java Doc)
protected void readStatusLine(HttpState state, HttpConnection conn) throws IOException, HttpException(Code)(Java Doc)
public void recycle()(Code)(Java Doc)
public void releaseConnection()(Code)(Java Doc)
public void removeRequestHeader(String headerName)(Code)(Java Doc)
public void removeRequestHeader(Header header)(Code)(Java Doc)
protected void responseBodyConsumed()(Code)(Java Doc)
protected void setConnectionCloseForced(boolean b)(Code)(Java Doc)
public void setDoAuthentication(boolean doAuthentication)(Code)(Java Doc)
public void setFollowRedirects(boolean followRedirects)(Code)(Java Doc)
public void setHostConfiguration(HostConfiguration hostconfig)(Code)(Java Doc)
public void setHttp11(boolean http11)(Code)(Java Doc)
public void setMethodRetryHandler(MethodRetryHandler handler)(Code)(Java Doc)
public void setParams(HttpMethodParams params)(Code)(Java Doc)
public void setPath(String path)(Code)(Java Doc)
public void setQueryString(String queryString)(Code)(Java Doc)
public void setQueryString(NameValuePair[] params)(Code)(Java Doc)
public void setRequestHeader(String headerName, String headerValue)(Code)(Java Doc)
public void setRequestHeader(Header header)(Code)(Java Doc)
protected void setResponseStream(InputStream responseStream)(Code)(Java Doc)
public void setStrictMode(boolean strictMode)(Code)(Java Doc)
public void setURI(URI uri) throws URIException(Code)(Java Doc)
protected boolean shouldCloseConnection(HttpConnection conn)(Code)(Java Doc)
public boolean validate()(Code)(Java Doc)
protected void writeRequest(HttpState state, HttpConnection conn) throws IOException, HttpException(Code)(Java Doc)
protected boolean writeRequestBody(HttpState state, HttpConnection conn) throws IOException, HttpException(Code)(Java Doc)
protected void writeRequestHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException(Code)(Java Doc)
protected void writeRequestLine(HttpState state, HttpConnection conn) throws IOException, HttpException(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.