|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gargoylesoftware.htmlunit.util.WebConnectionWrapper
com.gargoylesoftware.htmlunit.util.FalsifyingWebConnection
public abstract class FalsifyingWebConnection
Extension of WebConnectionWrapper providing facility methods to deliver something else than
what the wrapped connection would deliver.
| Constructor Summary | |
|---|---|
FalsifyingWebConnection(WebClient webClient)
Constructs an instance and places itself as connection of the WebClient. |
|
FalsifyingWebConnection(WebConnection webConnection)
Constructs a WebConnection object wrapping provided WebConnection. |
|
| Method Summary | |
|---|---|
protected WebResponse |
deliverFromAlternateUrl(WebRequestSettings webRequestSettings,
URL url)
Delivers the content for an alternate url as if it would come from the requested one |
protected WebResponse |
replaceContent(WebResponse webResponse,
String newContent)
Builds a WebResponse with a new content preserving the other informations |
| Methods inherited from class com.gargoylesoftware.htmlunit.util.WebConnectionWrapper |
|---|
getResponse, getState, getWebClient |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FalsifyingWebConnection(WebConnection webConnection)
throws IllegalArgumentException
webConnection - the webConnection that does the real work
IllegalArgumentException - if the connection is null
public FalsifyingWebConnection(WebClient webClient)
throws IllegalArgumentException
webClient - the WebClient which WebConnection should be wrapped
IllegalArgumentException - if the WebClient is null| Method Detail |
|---|
protected WebResponse deliverFromAlternateUrl(WebRequestSettings webRequestSettings,
URL url)
throws IOException
webRequestSettings - the original web request settingsurl - the url from which the content should be retrieved
IOException - if a problem occurred
protected WebResponse replaceContent(WebResponse webResponse,
String newContent)
throws IOException
webResponse - the web response to adaptnewContent - the new content to place in the response
IOException - if an encoding problem occurred
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||