|
Esri Geoportal Server 1.0
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.gpt.framework.http.HttpClientRequest
public class HttpClientRequest
Provides an interface for the execution of outbound HTTP requests.
This class delegates underlying HTTP related functonality the the Apache HttpClient. If a forward proxy is in place, the following system properties must be configured at the Java web server level (e.g. Tomcat - catalina.properties)
Nested Class Summary | |
---|---|
static class |
HttpClientRequest.MethodName
The enumeration of upported HTTP method names. |
Constructor Summary | |
---|---|
HttpClientRequest()
Default constructor. |
Method Summary | |
---|---|
void |
execute()
Executes the HTTP request. |
int |
getConnectionTimeOutMs()
Gets the connection time out in milliseconds. |
ContentHandler |
getContentHandler()
Gets the handler for the content of the HTTP response body. |
ContentProvider |
getContentProvider()
Gets the provider for the content of the HTTP request body. |
CredentialProvider |
getCredentialProvider()
Gets the provider for HTTP authorization credentials. |
StringBuffer |
getExecutionLog()
Gets a buffer representing the loggable content of an executed HTTP request. |
HttpClientRequest.MethodName |
getMethodName()
Gets the HTTP method name. |
ResponseInfo |
getResponseInfo()
Gets information associated with an HTTP response. |
int |
getResponseTimeOutMs()
Gets the response time out in milliseconds |
int |
getRetries()
Gets the retries. |
String |
getUrl()
Gets the URL for the request. |
static HttpClientRequest |
newRequest()
Instantiates a new HTTP client request. |
static HttpClientRequest |
newRequest(HttpClientRequest.MethodName name,
String url)
Instantiates a new HTTP client request. |
String |
readResponseAsCharacters()
Exceutes the HPPR request and returns the response as a string. |
void |
setConnectionTimeMs(int connectionTimeOut)
Sets the connection time out in milliseconds. |
void |
setContentHandler(ContentHandler handler)
Sets the handler for the content of the HTTP response body. |
void |
setContentProvider(ContentProvider provider)
Sets the provider for the content of the HTTP request body. |
void |
setCredentialProvider(CredentialProvider provider)
Sets the provider for HTTP authorization credentials. |
void |
setMethodName(HttpClientRequest.MethodName name)
Sets the HTTP method name. |
void |
setRequestHeader(String name,
String value)
Sets an HTTP request header value. |
protected void |
setResponseInfo(ResponseInfo info)
Sets information associated with an HTTP response. |
void |
setResponseTimeOutMs(int responseTimeOut)
Sets the response time out in milliseconds. |
void |
setRetries(int retries)
Sets the retries. |
void |
setUrl(String url)
Sets the URL for the request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpClientRequest()
Method Detail |
---|
public int getConnectionTimeOutMs()
public void setConnectionTimeMs(int connectionTimeOut)
connectionTimeOut
- the new connection time outpublic int getResponseTimeOutMs()
public void setResponseTimeOutMs(int responseTimeOut)
responseTimeOut
- the new response time outpublic CredentialProvider getCredentialProvider()
public void setCredentialProvider(CredentialProvider provider)
provider
- the credential providerpublic ContentHandler getContentHandler()
public void setContentHandler(ContentHandler handler)
handler
- the response content handlerpublic ContentProvider getContentProvider()
public void setContentProvider(ContentProvider provider)
provider
- the request content providerpublic StringBuffer getExecutionLog()
public HttpClientRequest.MethodName getMethodName()
public void setMethodName(HttpClientRequest.MethodName name)
name
- the method namepublic void setRequestHeader(String name, String value)
name
- the header paramater namevalue
- the header paramater valuepublic ResponseInfo getResponseInfo()
protected void setResponseInfo(ResponseInfo info)
info
- the HTTP response informationpublic String getUrl()
public void setUrl(String url)
url
- the request URLpublic int getRetries()
public void setRetries(int retries)
retries
- the new retriespublic void execute() throws IOException
IOException
- if an Exception occurspublic static HttpClientRequest newRequest()
public static HttpClientRequest newRequest(HttpClientRequest.MethodName name, String url)
name
- the HTTP method nameurl
- the target URL
public String readResponseAsCharacters() throws IOException
IOException
- if an i/o exception occurs
|
Esri Geoportal Server 1.0
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |