|
||||||||||
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(WebRequest request)
Submits a request and retrieves a response. |
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(WebRequest request) throws IOException
getResponse
in interface WebConnection
request
- the request
IOException
- if an IO error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |