クラス IntegrationUtils
java.lang.ObjectSE
org.springframework.integration.support.utils.IntegrationUtils
一般的なユーティリティメソッド。
- 導入:
- 4.0
- 作成者:
- Gary Russell, Marius Bogoevici, Artem Bilan
フィールドサマリー
メソッドのサマリー
修飾子と型メソッド説明static StringSE
bytesToString
(byte[] bytes, StringSE encoding) byte[] から String への null セーフ変換のためのユーティリティメソッド。static ConversionService
getConversionService
(BeanFactory beanFactory) static MessageBuilderFactory
getMessageBuilderFactory
(BeanFactory beanFactory) beanFactory からコンテキスト全体の `messageBuilderFactory` Bean を返します。見つからない場合、または beanFactory が null の場合はDefaultMessageBuilderFactory
を返します。static StringSE
obtainComponentName
(NamedComponent component) 提供されているNamedComponent
からコンポーネント名を取得します。static byte[]
stringToBytes
(StringSE value, StringSE encoding) String から byte[] への null セーフ変換のためのユーティリティメソッド。static RuntimeExceptionSE
wrapInDeliveryExceptionIfNecessary
(Message<?> message, SupplierSE<StringSE> text, ThrowableSE ex) 例外がMessagingException
でない場合、またはfailedMessage
がない場合は、メッセージとともに新しいMessageDeliveryException
でラップします。static RuntimeExceptionSE
wrapInHandlingExceptionIfNecessary
(Message<?> message, SupplierSE<StringSE> text, ThrowableSE ex) 例外がMessagingException
でない場合、またはfailedMessage
がない場合は、メッセージとともに新しいMessageHandlingException
でラップします。
フィールドの詳細
メソッドの詳細
getConversionService
- パラメーター:
beanFactory
- ルックアップの BeanFactory。null であってはなりません。- 戻り値:
- 利用可能な場合、名前が "integrationConversionService" である
ConversionService
Bean。
getMessageBuilderFactory
beanFactory からコンテキスト全体の `messageBuilderFactory` Bean を返します。見つからない場合、または beanFactory が null の場合はDefaultMessageBuilderFactory
を返します。- パラメーター:
beanFactory
- Bean ファクトリ。- 戻り値:
- メッセージビルダーファクトリ。
stringToBytes
String から byte[] への null セーフ変換のためのユーティリティメソッド。- パラメーター:
value
- 変換する文字列encoding
- エンコーディング- 戻り値:
- 指定された文字列とエンコーディングに対応する byte[]、指定された文字列引数が null の場合は null
- 例外:
IllegalArgumentExceptionSE
- エンコーディングがサポートされていない場合
bytesToString
byte[] から String への null セーフ変換のためのユーティリティメソッド。- パラメーター:
bytes
- 変換される byte[]encoding
- エンコーディング- 戻り値:
- 指定された byte[] およびエンコーディングに対応する文字列。指定された byte[] 引数が null の場合は null
- 例外:
IllegalArgumentExceptionSE
- エンコーディングがサポートされていない場合
wrapInDeliveryExceptionIfNecessary
public static RuntimeExceptionSE wrapInDeliveryExceptionIfNecessary(Message<?> message, SupplierSE<StringSE> text, ThrowableSE ex) 例外がMessagingException
でない場合、またはfailedMessage
がない場合は、メッセージとともに新しいMessageDeliveryException
でラップします。- パラメーター:
message
- メッセージ。text
- 新しい例外のメッセージテキストのサプライヤー。ex
- 例外。- 戻り値:
- 必要に応じてラッパー、または元の例外。
- 導入:
- 5.0.4
wrapInHandlingExceptionIfNecessary
public static RuntimeExceptionSE wrapInHandlingExceptionIfNecessary(Message<?> message, SupplierSE<StringSE> text, ThrowableSE ex) 例外がMessagingException
でない場合、またはfailedMessage
がない場合は、メッセージとともに新しいMessageHandlingException
でラップします。- パラメーター:
message
- メッセージ。text
- 新しい例外のメッセージテキストのサプライヤー。ex
- 例外。- 戻り値:
- 必要に応じてラッパー、または元の例外。
- 導入:
- 5.0.4
obtainComponentName
提供されているNamedComponent
からコンポーネント名を取得します。- パラメーター:
component
- コンポーネント名のNamedComponent
ソース。- 戻り値:
- コンポーネント名
- 導入:
- 5.3