|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.util.WebConnectionWrapper
public class WebConnectionWrapper
Provides a convenient implementation of the WebConnection
interface that can be subclassed by developers
wishing to adapt a particular WebConnection.
This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped
web connection object.
Constructor Summary | |
---|---|
WebConnectionWrapper(WebClient webClient)
Constructs a WebConnection object wrapping the connection of the WebClient and places itself as connection of the WebClient. |
|
WebConnectionWrapper(WebConnection webConnection)
Constructs a WebConnection object wrapping provided WebConnection. |
Method Summary | |
---|---|
WebResponse |
getResponse(WebRequestSettings webRequestSettings)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. Submits a request and retrieves a response. The default behavior of this method is to return getResponse() on the wrapped connection object. |
HttpState |
getState()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. Return the HttpState that is being used.
The default behavior of this method is to return getState() on the wrapped connection object. |
WebClient |
getWebClient()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. Return the web client. The default behavior of this method is to return getWebClient() on the wrapped connection object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebConnectionWrapper(WebConnection webConnection) throws IllegalArgumentException
webConnection
- the webConnection that does the real work
IllegalArgumentException
- if the connection is null
public WebConnectionWrapper(WebClient webClient) throws IllegalArgumentException
webClient
- the WebClient which WebConnection should be wrapped
IllegalArgumentException
- if the WebClient is null
Method Detail |
---|
public WebResponse getResponse(WebRequestSettings webRequestSettings) throws IOException
getResponse
in interface WebConnection
webRequestSettings
- Settings to make the request with.
IOException
- If an IO error occurs.public HttpState getState()
HttpState
that is being used.
The default behavior of this method is to return getState() on the wrapped connection object.
getState
in interface WebConnection
public WebClient getWebClient()
getWebClient
in interface WebConnection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |