クラス DelegatingWebConnection
java.lang.ObjectSE
org.springframework.test.web.servlet.htmlunit.DelegatingWebConnection
- 実装されたすべてのインターフェース:
com.gargoylesoftware.htmlunit.WebConnection
,AutoCloseableSE
public final class DelegatingWebConnection
extends ObjectSE
implements com.gargoylesoftware.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
(com.gargoylesoftware.htmlunit.WebConnection defaultConnection, ListSE<DelegatingWebConnection.DelegateWebConnection> connections) DelegatingWebConnection
(com.gargoylesoftware.htmlunit.WebConnection defaultConnection, DelegatingWebConnection.DelegateWebConnection... connections) メソッドのサマリー
修飾子と型メソッド説明void
close()
com.gargoylesoftware.htmlunit.WebResponse
getResponse
(com.gargoylesoftware.htmlunit.WebRequest request)
コンストラクターの詳細
DelegatingWebConnection
public DelegatingWebConnection(com.gargoylesoftware.htmlunit.WebConnection defaultConnection, ListSE<DelegatingWebConnection.DelegateWebConnection> connections) DelegatingWebConnection
public DelegatingWebConnection(com.gargoylesoftware.htmlunit.WebConnection defaultConnection, DelegatingWebConnection.DelegateWebConnection... connections)
メソッドの詳細
getResponse
public com.gargoylesoftware.htmlunit.WebResponse getResponse(com.gargoylesoftware.htmlunit.WebRequest request) throws IOExceptionSE - 次で指定:
- インターフェース
com.gargoylesoftware.htmlunit.WebConnection
のgetResponse
- 例外:
IOExceptionSE
close
public void close()- 次で指定:
- インターフェース
AutoCloseableSE
のclose
- 次で指定:
- インターフェース
com.gargoylesoftware.htmlunit.WebConnection
のclose