public final class IntegrationUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
fatalWhenNoBeanFactory
Should be set to TRUE on CI plans and framework developer systems.
|
static java.lang.String |
INTEGRATION_CONVERSION_SERVICE_BEAN_NAME |
static java.lang.String |
INTEGRATION_MESSAGE_BUILDER_FACTORY_BEAN_NAME |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
bytesToString(byte[] bytes,
java.lang.String encoding)
Utility method for null-safe conversion from byte[] to String
|
static org.springframework.core.convert.ConversionService |
getConversionService(org.springframework.beans.factory.BeanFactory beanFactory) |
static MessageBuilderFactory |
getMessageBuilderFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Returns the context-wide `messageBuilderFactory` bean from the beanFactory,
or a
DefaultMessageBuilderFactory if not found or the beanFactory is null. |
static byte[] |
stringToBytes(java.lang.String value,
java.lang.String encoding)
Utility method for null-safe conversion from String to byte[]
|
public static final java.lang.String INTEGRATION_CONVERSION_SERVICE_BEAN_NAME
public static final java.lang.String INTEGRATION_MESSAGE_BUILDER_FACTORY_BEAN_NAME
public static final boolean fatalWhenNoBeanFactory
public static org.springframework.core.convert.ConversionService getConversionService(org.springframework.beans.factory.BeanFactory beanFactory)
beanFactory - BeanFactory for lookup, must not be null.ConversionService bean whose name is "integrationConversionService" if available.public static MessageBuilderFactory getMessageBuilderFactory(org.springframework.beans.factory.BeanFactory beanFactory)
DefaultMessageBuilderFactory if not found or the beanFactory is null.beanFactory - The bean factory.public static byte[] stringToBytes(java.lang.String value,
java.lang.String encoding)
value - the String to be convertedencoding - the encodingjava.lang.IllegalArgumentException - if the encoding is not supportedpublic static java.lang.String bytesToString(byte[] bytes,
java.lang.String encoding)
bytes - the byte[] to be convertedencoding - the encodingjava.lang.IllegalArgumentException - if the encoding is not supported