クラス 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 classHttpClientContent-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の新しいインスタンスを作成します。方法の概要
修飾子と型メソッド説明voidcreateConnection(URISE uri) 指定された URI に新しいWebServiceConnectionを作成します。protected org.apache.hc.core5.http.protocol.HttpContextcreateContext(URISE uri) 指定された URI のHttpContextの作成を可能にするテンプレートメソッド。voiddestroy()org.apache.hc.client5.http.classic.HttpClientこのメッセージ送信者が使用するHttpClientを返します。voidsetAuthScope(org.apache.hc.client5.http.auth.AuthScope authScope) voidsetConnectionTimeout(DurationSE timeout) voidsetCredentials(org.apache.hc.client5.http.auth.Credentials credentials) voidsetHttpClient(org.apache.hc.client5.http.classic.HttpClient httpClient) このメッセージ送信者が使用するHttpClientを設定します。voidsetMaxConnectionsPerHost(MapSE<StringSE, StringSE> maxConnectionsPerHost) voidsetMaxTotalConnections(int maxTotalConnections) voidsetReadTimeout(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