M -public abstract class HttpApache3Method<M extends org.apache.commons.httpclient.HttpMethodBase> extends Object implements RIDCHttpMethod
| Modifier and Type | Field and Description |
|---|---|
protected M |
apacheMethod |
protected IdcRequestConfig |
requestConfig |
protected HttpApache3Client |
ridcClient |
protected ServiceLog |
serviceLog |
| Constructor and Description |
|---|
HttpApache3Method() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRequestHeader(String name, String value)
Add a request header
|
int |
execute()
Execute this method
|
M |
getDelegateObject()
Get the delegated object
|
InputStream |
getResponseBodyAsStream()
Get the response body as a stream
|
RIDCHttpHeader |
getResponseHeader(String headerName)
Get the response header
|
List<RIDCHttpHeader> |
getResponseHeaders()
Get the response headers
|
RIDCHttpClient |
getRidcClient()
Get the associated client with this method
|
int |
getStatusCode()
Get the status code
|
String |
getStatusLine()
Get the status line of the response
|
URI |
getURI()
Get the URI of this method
|
protected void |
logRequest(String logID, M method) |
protected void |
logResponse(String logID, M method) |
void |
releaseConnection()
Release the connection
|
void |
setCookiePolicy(String cookiePolicy)
Set the cookie policy
|
void |
setFollowRedirects(boolean followRedirects)
set if the client should follow redirects
|
void |
setParameter(String param, String value)
Set the request parameter
|
void |
setQueryString(List<NameValuePair> params)
Set the query string for the URL of this method
|
void |
setRequestConfig(IdcRequestConfig requestConfig)
Set the request-specific config for the request
|
void |
setRequestHeader(String headerName, String headerValue)
Set the request header
|
void |
setServiceLog(ServiceLog serviceLog)
Set the service log for the request
|
protected M extends org.apache.commons.httpclient.HttpMethodBase apacheMethod
protected HttpApache3Client ridcClient
protected ServiceLog serviceLog
protected IdcRequestConfig requestConfig
public void releaseConnection()
releaseConnection in interface RIDCHttpMethodpublic M getDelegateObject()
public int getStatusCode()
getStatusCode in interface RIDCHttpMethodpublic URI getURI() throws URISyntaxException
getURI in interface RIDCHttpMethodURISyntaxExceptionpublic InputStream getResponseBodyAsStream() throws IOException
getResponseBodyAsStream in interface RIDCHttpMethodIOExceptionpublic void setRequestHeader(String headerName, String headerValue)
setRequestHeader in interface RIDCHttpMethodheaderName - header nameheaderValue - header valuepublic RIDCHttpHeader getResponseHeader(String headerName)
getResponseHeader in interface RIDCHttpMethodheaderName - header namepublic void setQueryString(List<NameValuePair> params)
setQueryString in interface RIDCHttpMethodparams -public List<RIDCHttpHeader> getResponseHeaders()
getResponseHeaders in interface RIDCHttpMethodpublic String getStatusLine()
getStatusLine in interface RIDCHttpMethodpublic void setFollowRedirects(boolean followRedirects)
setFollowRedirects in interface RIDCHttpMethodfollowRedirects -public void addRequestHeader(String name, String value)
addRequestHeader in interface RIDCHttpMethodname - the header namevalue - the header valuepublic void setCookiePolicy(String cookiePolicy)
setCookiePolicy in interface RIDCHttpMethodcookiePolicy - policy namepublic void setParameter(String param, String value)
setParameter in interface RIDCHttpMethodparam - param namevalue - param valuepublic RIDCHttpClient getRidcClient()
getRidcClient in interface RIDCHttpMethod
public int execute()
throws IOException
execute in interface RIDCHttpMethodIOExceptionpublic void setServiceLog(ServiceLog serviceLog)
setServiceLog in interface RIDCHttpMethodserviceLog -public void setRequestConfig(IdcRequestConfig requestConfig)
RIDCHttpMethodsetRequestConfig in interface RIDCHttpMethod