クラス DelegatingWebConnection
java.lang.ObjectSE
org.springframework.test.web.servlet.htmlunit.DelegatingWebConnection
- 実装されているすべてのインターフェース:
AutoCloseableSE,org.htmlunit.WebConnection
さまざまな
WebConnection 実装への委譲を可能にする WebConnection の実装。 例: ドメイン code.jquery.com で JavaScript をホストしている場合、以下を使用できます。
WebClient webClient = new WebClient();
MockMvc mockMvc = ...
MockMvcWebConnection mockConnection = new MockMvcWebConnection(mockMvc, webClient);
WebRequestMatcher cdnMatcher = new UrlRegexRequestMatcher(".*?//code.jquery.com/.*");
WebConnection httpConnection = new HttpWebConnection(webClient);
WebConnection webConnection = new DelegatingWebConnection(mockConnection, new DelegateWebConnection(cdnMatcher, httpConnection));
webClient.setWebConnection(webConnection);
WebClient webClient = new WebClient();
webClient.setWebConnection(webConnection);
- 導入:
- 4.2
- 作成者:
- Rob Winch, Sam Brannen
ネストされたクラスの要約
ネストされたクラスコンストラクターの概要
コンストラクターコンストラクター説明DelegatingWebConnection(org.htmlunit.WebConnection defaultConnection, ListSE<DelegatingWebConnection.DelegateWebConnection> connections) DelegatingWebConnection(org.htmlunit.WebConnection defaultConnection, DelegatingWebConnection.DelegateWebConnection... connections) メソッドのサマリー
コンストラクターの詳細
DelegatingWebConnection
public DelegatingWebConnection(org.htmlunit.WebConnection defaultConnection, ListSE<DelegatingWebConnection.DelegateWebConnection> connections) DelegatingWebConnection
public DelegatingWebConnection(org.htmlunit.WebConnection defaultConnection, DelegatingWebConnection.DelegateWebConnection... connections)
メソッドの詳細
getResponse
- 次で指定:
- インターフェース
org.htmlunit.WebConnectionのgetResponse - 例外:
IOExceptionSE
close
public void close()- 次で指定:
- インターフェース
AutoCloseableSEのclose - 次で指定:
- インターフェース
org.htmlunit.WebConnectionのclose