|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.httpclient.HttpMethodBase org.apache.commons.httpclient.methods.ExpectContinueMethod org.apache.commons.httpclient.methods.EntityEnclosingMethod org.apache.commons.httpclient.methods.PostMethod org.archive.httpclient.HttpRecorderPostMethod
public class HttpRecorderPostMethod
Override of PostMethod that marks the passed HttpRecorder w/ the transition
from HTTP head to body and that forces a close on the responseConnection.
This is a copy of HttpRecorderGetMethod
. Only difference is the
parent subclass.
Field Summary | |
---|---|
protected HttpRecorderMethod |
httpRecorderMethod
Instance of http recorder method. |
Fields inherited from class org.apache.commons.httpclient.methods.PostMethod |
---|
FORM_URL_ENCODED_CONTENT_TYPE |
Fields inherited from class org.apache.commons.httpclient.methods.EntityEnclosingMethod |
---|
CONTENT_LENGTH_AUTO, CONTENT_LENGTH_CHUNKED |
Constructor Summary | |
---|---|
HttpRecorderPostMethod(java.lang.String uri,
HttpRecorder recorder)
|
Method Summary | |
---|---|
protected void |
addProxyConnectionHeader(org.apache.commons.httpclient.HttpState state,
org.apache.commons.httpclient.HttpConnection conn)
Generates Proxy-Connection: Keep-Alive request header when communicating via a proxy server. |
int |
execute(org.apache.commons.httpclient.HttpState state,
org.apache.commons.httpclient.HttpConnection conn)
Executes this method using the specified HttpConnection and
HttpState . |
protected void |
readResponseBody(org.apache.commons.httpclient.HttpState state,
org.apache.commons.httpclient.HttpConnection connection)
Read the response body from the given HttpConnection . |
protected boolean |
shouldCloseConnection(org.apache.commons.httpclient.HttpConnection conn)
Tests if the connection should be closed after the method has been executed. |
Methods inherited from class org.apache.commons.httpclient.methods.PostMethod |
---|
addParameter, addParameter, addParameters, clearRequestBody, generateRequestEntity, getName, getParameter, getParameters, hasRequestContent, removeParameter, removeParameter, setParameter, setRequestBody |
Methods inherited from class org.apache.commons.httpclient.methods.EntityEnclosingMethod |
---|
addContentLengthRequestHeader, addRequestHeaders, generateRequestBody, getFollowRedirects, getRequestCharSet, getRequestContentLength, getRequestEntity, recycle, setContentChunked, setFollowRedirects, setRequestBody, setRequestBody, setRequestContentLength, setRequestContentLength, setRequestEntity, writeRequestBody |
Methods inherited from class org.apache.commons.httpclient.methods.ExpectContinueMethod |
---|
getUseExpectHeader, setUseExpectHeader |
Methods inherited from class org.apache.commons.httpclient.HttpMethodBase |
---|
abort, addCookieRequestHeader, addHostRequestHeader, addRequestHeader, addRequestHeader, addResponseFooter, addUserAgentRequestHeader, checkNotUsed, checkUsed, generateRequestLine, getAuthenticationRealm, getContentCharSet, getDoAuthentication, getEffectiveVersion, getHostAuthState, getHostConfiguration, getMethodRetryHandler, getParams, getPath, getProxyAuthenticationRealm, getProxyAuthState, getQueryString, getRecoverableExceptionCount, getRequestHeader, getRequestHeaderGroup, getRequestHeaders, getRequestHeaders, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseCharSet, getResponseContentLength, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaderGroup, getResponseHeaders, getResponseHeaders, getResponseStream, getResponseTrailerHeaderGroup, getStatusCode, getStatusLine, getStatusText, getURI, hasBeenUsed, isAborted, isConnectionCloseForced, isHttp11, isRequestSent, isStrictMode, processResponseBody, processResponseHeaders, processStatusLine, readResponse, readResponseHeaders, readStatusLine, releaseConnection, removeRequestHeader, removeRequestHeader, responseBodyConsumed, setConnectionCloseForced, setDoAuthentication, setHostConfiguration, setHttp11, setMethodRetryHandler, setParams, setPath, setQueryString, setQueryString, setRequestHeader, setRequestHeader, setResponseStream, setStrictMode, setURI, validate, writeRequest, writeRequestHeaders, writeRequestLine |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HttpRecorderMethod httpRecorderMethod
Constructor Detail |
---|
public HttpRecorderPostMethod(java.lang.String uri, HttpRecorder recorder)
Method Detail |
---|
protected void readResponseBody(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection connection) throws java.io.IOException, org.apache.commons.httpclient.HttpException
org.apache.commons.httpclient.HttpMethodBase
HttpConnection
.
The current implementation wraps the socket level stream with an appropriate stream for the type of response (chunked, content-length, or auto-close). If there is no response body, the connection associated with the request will be returned to the connection manager.
Subclasses may want to override this method to to customize the processing.
readResponseBody
in class org.apache.commons.httpclient.HttpMethodBase
state
- the state
information associated with this methodconnection
- the connection
used to execute
this HTTP method
java.io.IOException
- if an I/O (transport) error occurs. Some transport exceptions
can be recovered from.
HttpException
- if a protocol exception occurs. Usually protocol exceptions
cannot be recovered from.HttpMethodBase.readResponse(org.apache.commons.httpclient.HttpState, org.apache.commons.httpclient.HttpConnection)
,
HttpMethodBase.processResponseBody(org.apache.commons.httpclient.HttpState, org.apache.commons.httpclient.HttpConnection)
protected boolean shouldCloseConnection(org.apache.commons.httpclient.HttpConnection conn)
org.apache.commons.httpclient.HttpMethodBase
shouldCloseConnection
in class org.apache.commons.httpclient.HttpMethodBase
conn
- the connection in question
public int execute(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn) throws org.apache.commons.httpclient.HttpException, java.io.IOException
org.apache.commons.httpclient.HttpMethodBase
HttpConnection
and
HttpState
.
execute
in interface org.apache.commons.httpclient.HttpMethod
execute
in class org.apache.commons.httpclient.HttpMethodBase
state
- state
information to associate with this
request. Must be non-null.conn
- the connection
to used to execute
this HTTP method. Must be non-null.
HttpException
- if a protocol exception occurs.
java.io.IOException
- if an I/O (transport) error occursprotected void addProxyConnectionHeader(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn) throws java.io.IOException, org.apache.commons.httpclient.HttpException
org.apache.commons.httpclient.HttpMethodBase
addProxyConnectionHeader
in class org.apache.commons.httpclient.HttpMethodBase
state
- the state
information associated with this methodconn
- the connection
used to execute
this HTTP method
java.io.IOException
- if an I/O (transport) error occurs. Some transport exceptions
can be recovered from.
HttpException
- if a protocol exception occurs. Usually protocol exceptions
cannot be recovered from.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |