クラス DefaultHttpHeaderMapper
java.lang.ObjectSE
org.springframework.integration.http.support.DefaultHttpHeaderMapper
- 実装されているすべてのインターフェース:
Aware、BeanFactoryAware、InitializingBean、HeaderMapper<HttpHeaders>
public class DefaultHttpHeaderMapper
extends ObjectSE
implements HeaderMapper<HttpHeaders>, BeanFactoryAware, InitializingBean
HTTP のデフォルトの
HeaderMapper 実装。- 導入:
- 2.0
- 作成者:
- Mark Fisher, Jeremy Grelle, Oleg Zhurakousky, Gunnar Hillert, Gary Russell, Artem Bilan
フィールドのサマリー
フィールド修飾子と型フィールド説明static final StringSEprotected static final DateTimeFormatterSE[]static final StringSEstatic final StringSEprotected final org.apache.commons.logging.Logstatic final StringSEコンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明voidprotected static booleancontainsElementIgnoreCase(StringSE[] headerNames, StringSE name) protected @Nullable StringSEconvertToString(ObjectSE value) voidfromHeaders(MessageHeaders headers, HttpHeaders target) 統合 MessageHeaders から HttpHeaders インスタンスにマップします。protected BeanFactoryprotected static longgetFirstDate(StringSE headerValue, StringSE headerName) protected @Nullable ObjectSEgetHttpHeader(HttpHeaders source, StringSE name) static DefaultHttpHeaderMapper基本的な受信マッパーインスタンスを作成するためのファクトリメソッド。static DefaultHttpHeaderMapper基本的な送信マッパーインスタンスを作成するためのファクトリメソッド。voidsetBeanFactory(BeanFactory beanFactory) voidsetExcludedInboundStandardResponseHeaderNames(StringSE... excludedInboundStandardResponseHeaderNames) 受信エンドポイントのレスポンスヘッダーをマッピングするときに非表示にする必要がある標準ヘッダーのリストからヘッダー名を指定します。voidsetExcludedOutboundStandardRequestHeaderNames(StringSE... excludedOutboundStandardRequestHeaderNames) 送信エンドポイントリクエストヘッダーをマッピングするときに非表示にする必要がある標準ヘッダーのリストからヘッダー名を指定します。voidsetInboundHeaderNames(StringSE @Nullable... inboundHeaderNamesArg) HTTP リクエスト(受信アダプターの場合)または HTTP レスポンス(送信アダプターの場合)から Spring Integration メッセージのヘッダーにマップする必要があるヘッダー名を指定します。voidsetOutboundHeaderNames(StringSE @Nullable... outboundHeaderNames) Spring Integration メッセージのヘッダーからの HTTP リクエスト(送信アダプターの場合)または HTTP レスポンス(受信アダプターの場合)にマップする必要があるヘッダー名を指定します。protected static voidサブクラスは、静的 inboundMapper() メソッドからこれを呼び出して、受信マッパーの標準ヘッダーマッピングを設定できます。protected static voidサブクラスはこれを静的 outboundMapper() メソッドから呼び出して、送信マッパーの標準ヘッダーマッピングを設定できます。voidsetUserDefinedHeaderPrefix(@Nullable StringSE userDefinedHeaderPrefix) ユーザー定義(非標準)ヘッダーで使用するプレフィックスを設定します。protected final booleanshouldMapInboundHeader(StringSE headerName) toHeaders(HttpHeaders source) HttpHeaders インスタンスから統合 MessageHeaders へのマップ。
フィールドの詳細
logger
protected final org.apache.commons.logging.Log loggerCONTENT_MD5
- 関連事項:
REFRESH
- 関連事項:
HTTP_REQUEST_HEADER_NAME_PATTERN
- 関連事項:
HTTP_RESPONSE_HEADER_NAME_PATTERN
- 関連事項:
DATE_FORMATS
コンストラクターの詳細
DefaultHttpHeaderMapper
public DefaultHttpHeaderMapper()
メソッドの詳細
setBeanFactory
- 次で指定:
- インターフェース
BeanFactoryAwareのsetBeanFactory - 例外:
BeansException
getBeanFactory
setOutboundHeaderNames
Spring Integration メッセージのヘッダーからの HTTP リクエスト(送信アダプターの場合)または HTTP レスポンス(受信アダプターの場合)にマップする必要があるヘッダー名を指定します。値には、照合する単純なワイルドカードパターン( "foo *" や "* foo" など)を含めることもできます。非標準ヘッダーには、
setUserDefinedHeaderPrefix(String)で指定された値がプレフィックスとして付加されます。デフォルトは "X-" です。- パラメーター:
outboundHeaderNames- 発信ヘッダー名。
setInboundHeaderNames
HTTP リクエスト(受信アダプターの場合)または HTTP レスポンス(送信アダプターの場合)から Spring Integration メッセージのヘッダーにマップする必要があるヘッダー名を指定します。値には、照合する単純なワイルドカードパターン( "foo *" や "* foo" など)を含めることもできます。これは、ヘッダー名と直接一致します。または、非標準の HTTP ヘッダーの場合は、
setUserDefinedHeaderPrefix(String)で指定された値が前に付いたヘッダー名と一致します。そのデフォルトは空の文字列です。- パラメーター:
inboundHeaderNamesArg- 受信ヘッダー名。
setExcludedOutboundStandardRequestHeaderNames
public void setExcludedOutboundStandardRequestHeaderNames(StringSE... excludedOutboundStandardRequestHeaderNames) 送信エンドポイントリクエストヘッダーをマッピングするときに非表示にする必要がある標準ヘッダーのリストからヘッダー名を指定します。- パラメーター:
excludedOutboundStandardRequestHeaderNames- 設定する excludedStandardRequestHeaderNames
setExcludedInboundStandardResponseHeaderNames
public void setExcludedInboundStandardResponseHeaderNames(StringSE... excludedInboundStandardResponseHeaderNames) 受信エンドポイントのレスポンスヘッダーをマッピングするときに非表示にする必要がある標準ヘッダーのリストからヘッダー名を指定します。- パラメーター:
excludedInboundStandardResponseHeaderNames- 設定する excludedStandardResponseHeaderNames
setUserDefinedHeaderPrefix
ユーザー定義(非標準)ヘッダーで使用するプレフィックスを設定します。デフォルトは空の文字列です。- パラメーター:
userDefinedHeaderPrefix- ユーザーがヘッダープレフィックスを定義しました。
afterPropertiesSet
public void afterPropertiesSet()- 次で指定:
- インターフェース
InitializingBeanのafterPropertiesSet
fromHeaders
統合 MessageHeaders から HttpHeaders インスタンスにマップします。このマッパーを使用しているアダプターの型に応じて、HttpHeaders は HTTP リクエスト(送信アダプター)用か、HTTP レスポンス(受信アダプター)用になります。- 次で指定:
- インターフェース
HeaderMapper<HttpHeaders>のfromHeaders
toHeaders
HttpHeaders インスタンスから統合 MessageHeaders へのマップ。このマッパーを使用しているアダプターの型に応じて、HttpHeaders は HTTP リクエスト(受信アダプター)から、または HTTP レスポンス(送信アダプター)からのものである可能性があります。- 次で指定:
- インターフェース
HeaderMapper<HttpHeaders>のtoHeaders
getHttpHeader
shouldMapInboundHeader
convertToString
containsElementIgnoreCase
getFirstDate
outboundMapper
基本的な送信マッパーインスタンスを作成するためのファクトリメソッド。これは、HTTP リクエストを送信するときにすべての標準 HTTP リクエストヘッダーをマップし、HTTP レスポンスを受信するときにすべての標準 HTTP レスポンスヘッダーをマップします。- 戻り値:
- デフォルトの発信マッパー。
setupDefaultOutboundMapper
サブクラスはこれを静的 outboundMapper() メソッドから呼び出して、送信マッパーの標準ヘッダーマッピングを設定できます。- パラメーター:
mapper- マッパー。
inboundMapper
基本的な受信マッパーインスタンスを作成するためのファクトリメソッド。これにより、HTTP リクエストを受信するときにすべての標準 HTTP リクエストヘッダーがマップされ、HTTP レスポンスを送信するときにすべての標準 HTTP レスポンスヘッダーがマップされます。- 戻り値:
- デフォルトの受信マッパー。
setupDefaultInboundMapper
サブクラスは、静的 inboundMapper() メソッドからこれを呼び出して、受信マッパーの標準ヘッダーマッピングを設定できます。- パラメーター:
mapper- マッパー。