public class WebConnectionWrapper extends Object implements WebConnection
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 and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
WebResponse |
getResponse(WebRequestSettings webRequestSettings)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Submits a request and retrieves a response. |
org.apache.commons.httpclient.HttpState |
getState()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Return the HttpState that is being used. |
WebClient |
getWebClient()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Return the web client. |
public WebConnectionWrapper(WebConnection webConnection) throws IllegalArgumentException
webConnection - the webConnection that does the real workIllegalArgumentException - if the connection is nullpublic WebConnectionWrapper(WebClient webClient) throws IllegalArgumentException
webClient - the WebClient which WebConnection should be wrappedIllegalArgumentException - if the WebClient is nullpublic WebResponse getResponse(WebRequestSettings webRequestSettings) throws IOException
getResponse in interface WebConnectionwebRequestSettings - Settings to make the request with.IOException - If an IO error occurs.public org.apache.commons.httpclient.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 WebConnectionpublic WebClient getWebClient()
getWebClient in interface WebConnectionCopyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.