クラス HttpComponents5MessageSender
java.lang.ObjectSE
org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender
org.springframework.ws.transport.http.HttpComponents5MessageSender
- 実装されたすべてのインターフェース:
org.springframework.beans.factory.DisposableBean
、org.springframework.beans.factory.InitializingBean
、WebServiceMessageSender
public class HttpComponents5MessageSender
extends AbstractHttpWebServiceMessageSender
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Apache HttpClient を使用して POST リクエストを実行する
WebServiceMessageSender
実装。 事前構成された HttpClient インスタンスを、認証、HTTP 接続プーリングなどで使用できるようにします。認証は、Credentials
インスタンス(UsernamePasswordCredentials
など)を挿入することによって設定することもできます。
- 導入:
- 4.0.5
- 作成者:
- Alan Stewart, Barry Pitman, Arjen Poutsma, Greg Turnquist, Lars Uffmann
- 関連事項:
HttpClient
ネストされたクラスのサマリー
ネストされたクラス修飾子と型クラス説明static class
HttpClientContent-Length
およびTransfer-Encoding
ヘッダーをリクエストから削除するHttpRequestInterceptor
実装。フィールドのサマリー
クラス org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender から継承されたフィールド
logger
コンストラクターの概要
コンストラクターコンストラクター説明デフォルトのPoolingHttpClientConnectionManager
を使用するデフォルトのHttpClient
を使用して、HttpClientMessageSender
の新しいインスタンスを作成します。HttpComponents5MessageSender
(org.apache.hc.client5.http.classic.HttpClient httpClient) 指定されたHttpClient
インスタンスを使用してHttpComponents5MessageSender
の新しいインスタンスを作成します。メソッドのサマリー
修飾子と型メソッド説明void
createConnection
(URISE uri) 指定された URI に新しいWebServiceConnection
を作成します。protected org.apache.hc.core5.http.protocol.HttpContext
createContext
(URISE uri) 指定された URI のHttpContext
の作成を可能にするテンプレートメソッド。void
destroy()
org.apache.hc.client5.http.classic.HttpClient
このメッセージ送信者が使用するHttpClient
を返します。void
setAuthScope
(org.apache.hc.client5.http.auth.AuthScope authScope) void
setConnectionTimeout
(DurationSE timeout) void
setCredentials
(org.apache.hc.client5.http.auth.Credentials credentials) void
setHttpClient
(org.apache.hc.client5.http.classic.HttpClient httpClient) このメッセージ送信者が使用するHttpClient
を設定します。void
setMaxConnectionsPerHost
(MapSE<StringSE, StringSE> maxConnectionsPerHost) void
setMaxTotalConnections
(int maxTotalConnections) void
setReadTimeout
(DurationSE timeout) クラス org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender から継承されたメソッド
isAcceptGzipEncoding, setAcceptGzipEncoding, supports
コンストラクターの詳細
HttpComponents5MessageSender
public HttpComponents5MessageSender()デフォルトのPoolingHttpClientConnectionManager
を使用するデフォルトのHttpClient
を使用して、HttpClientMessageSender
の新しいインスタンスを作成します。HttpComponents5MessageSender
public HttpComponents5MessageSender(org.apache.hc.client5.http.classic.HttpClient httpClient) 指定されたHttpClient
インスタンスを使用してHttpComponents5MessageSender
の新しいインスタンスを作成します。このコンストラクターは、指定された
HttpClient
を変更しません。そのため、タイムアウトを設定したり、HttpComponents5MessageSender.RemoveSoapHeadersInterceptor
を追加したりすることはありません。- パラメーター:
httpClient
- この送信者に使用する HttpClient インスタンス
メソッドの詳細
setAuthScope
public void setAuthScope(org.apache.hc.client5.http.auth.AuthScope authScope) setCredentials
public void setCredentials(org.apache.hc.client5.http.auth.Credentials credentials) getHttpClient
public org.apache.hc.client5.http.classic.HttpClient getHttpClient()このメッセージ送信者が使用するHttpClient
を返します。setHttpClient
public void setHttpClient(org.apache.hc.client5.http.classic.HttpClient httpClient) このメッセージ送信者が使用するHttpClient
を設定します。setConnectionTimeout
setReadTimeout
setMaxTotalConnections
public void setMaxTotalConnections(int maxTotalConnections) setMaxConnectionsPerHost
afterPropertiesSet
- 次で指定:
- インターフェース
org.springframework.beans.factory.InitializingBean
のafterPropertiesSet
- 例外:
ExceptionSE
createConnection
インターフェースからコピーされた説明:WebServiceMessageSender
指定された URI に新しいWebServiceConnection
を作成します。- 次で指定:
- インターフェース
WebServiceMessageSender
のcreateConnection
- パラメーター:
uri
- 接続を開くための URI- 戻り値:
- 新しい接続
- 例外:
IOExceptionSE
- I/O エラーの場合
createContext
指定された URI のHttpContext
の作成を可能にするテンプレートメソッド。デフォルトの実装はnull
を返します。- パラメーター:
uri
- コンテキストを作成する URI- 戻り値:
- コンテキスト、または
null
destroy
- 次で指定:
- インターフェース
org.springframework.beans.factory.DisposableBean
のdestroy
- 例外:
ExceptionSE