クラス IntegrationUtils
java.lang.ObjectSE
org.springframework.integration.support.utils.IntegrationUtils
一般的なユーティリティメソッド。
- 導入:
- 4.0
- 作成者:
- Gary Russell, Marius Bogoevici, Artem Bilan
フィールド概要
フィールド方法の概要
修飾子と型メソッド説明static StringSEbytesToString(byte[] bytes, StringSE encoding) byte[] から String への null セーフ変換のためのユーティリティメソッド。static ConversionServicegetConversionService(BeanFactory beanFactory) static MessageBuilderFactorygetMessageBuilderFactory(BeanFactory beanFactory) beanFactory からコンテキスト全体の `messageBuilderFactory` Bean を返します。見つからない場合、または beanFactory が null の場合は、DefaultMessageBuilderFactoryを返します。static StringSEobtainComponentName(NamedComponent component) 提供されているNamedComponentからコンポーネント名を取得します。static byte[]stringToBytes(StringSE value, StringSE encoding) String から byte[] への null セーフ変換のためのユーティリティメソッド。static RuntimeExceptionSEwrapInDeliveryExceptionIfNecessary(Message<?> message, SupplierSE<StringSE> text, ThrowableSE ex) 例外がMessagingExceptionでない場合、またはfailedMessageがない場合は、メッセージとともに新しいMessageDeliveryExceptionでラップします。static RuntimeExceptionSEwrapInHandlingExceptionIfNecessary(Message<?> message, SupplierSE<StringSE> text, ThrowableSE ex) 例外がMessagingExceptionでない場合、またはfailedMessageがない場合は、メッセージとともに新しいMessageHandlingExceptionでラップします。
フィールドの詳細
方法の詳細
getConversionService
- パラメーター:
beanFactory- ルックアップの BeanFactory。null であってはなりません。- 戻り値:
- 使用可能な場合、名前が "integrationConversionService" である
ConversionServiceBean。
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