|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.WebConnectionImpl
com.gargoylesoftware.htmlunit.HttpWebConnection
public class HttpWebConnection
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
An object that handles the actual communication portion of page
retrieval/submission
Constructor Summary | |
---|---|
HttpWebConnection(WebClient webClient)
Create a new HTTP web connection instance. |
Method Summary | |
---|---|
protected HttpClient |
createHttpClient()
Creates the httpClient that will be used by this WebConnection. |
protected HttpClient |
getHttpClient()
Lazily initialize the httpClient |
protected Log |
getLog()
Return the log object for this class |
WebResponse |
getResponse(WebRequestSettings webRequestSettings)
Submit a request and retrieve a response |
HttpState |
getState()
Return the HttpState that is being used. |
protected int |
getTimeout()
Return the timeout to use for socket and connection timeouts for HttpConnectionManager. |
String |
getVirtualHost()
Get the virtual host |
protected WebResponseData |
newWebResponseDataInstance(String statusMessage,
List headers,
int statusCode,
HttpMethodBase method)
Construct an appropriate WebResponseData. |
protected WebResponse |
newWebResponseInstance(String charset,
WebResponseData responseData,
long loadTime,
SubmitMethod requestMethod,
URL originatingURL)
Construct an appropriate WebResponse. |
protected void |
onResponseGenerated(HttpMethodBase httpMethod)
Called when the response has been generated. |
void |
setVirtualHost(String virtualHost)
set the virtual host |
Methods inherited from class com.gargoylesoftware.htmlunit.WebConnectionImpl |
---|
getWebClient |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpWebConnection(WebClient webClient)
webClient
- The WebClient that is using this connectionMethod Detail |
---|
public WebResponse getResponse(WebRequestSettings webRequestSettings) throws IOException
getResponse
in interface WebConnection
getResponse
in class WebConnectionImpl
webRequestSettings
- Settings to make the request with
IOException
- If an IO error occursprotected void onResponseGenerated(HttpMethodBase httpMethod)
httpMethod
- the httpMethod used.protected HttpClient getHttpClient()
protected int getTimeout()
protected HttpClient createHttpClient()
HttpConnectionManager
to perform some tracking
(see feature request 1438216).
protected final Log getLog()
public void setVirtualHost(String virtualHost)
virtualHost
- The virtualHost to set.public String getVirtualHost()
public HttpState getState()
HttpState
that is being used.
getState
in interface WebConnection
getState
in class WebConnectionImpl
protected WebResponseData newWebResponseDataInstance(String statusMessage, List headers, int statusCode, HttpMethodBase method) throws IOException
statusMessage
- StatusMessage from the responseheaders
- response headersstatusCode
- response status codemethod
- request method
IOException
- if there is a problem reading the response body.protected WebResponse newWebResponseInstance(String charset, WebResponseData responseData, long loadTime, SubmitMethod requestMethod, URL originatingURL)
responseData
- Data that was send backcharset
- Charset used if not returned in the response.originatingURL
- Where this response came fromrequestMethod
- The method used to get this responseloadTime
- How long the response took to be sent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |