クラス 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