public abstract class Transformers
extends java.lang.Object
Transformer
s.Constructor and Description |
---|
Transformers() |
Modifier and Type | Method and Description |
---|---|
static <T,U> PayloadTypeConvertingTransformer<T,U> |
converter(org.springframework.core.convert.converter.Converter<T,U> converter) |
static <T> DecodingTransformer<T> |
decoding(Codec codec,
java.lang.Class<T> type)
The factory method for the
DecodingTransformer . |
static <T> DecodingTransformer<T> |
decoding(Codec codec,
org.springframework.expression.Expression typeExpression)
The factory method for the
DecodingTransformer . |
static <T> DecodingTransformer<T> |
decoding(Codec codec,
java.util.function.Function<org.springframework.messaging.Message<?>,java.lang.Class<T>> typeFunction)
The factory method for the
DecodingTransformer . |
static <T> DecodingTransformer<T> |
decoding(Codec codec,
java.lang.String typeExpression)
The factory method for the
DecodingTransformer . |
static PayloadDeserializingTransformer |
deserializer(org.springframework.core.serializer.Deserializer<java.lang.Object> deserializer,
java.lang.String... whiteListPatterns) |
static PayloadDeserializingTransformer |
deserializer(java.lang.String... whiteListPatterns) |
static <T> EncodingPayloadTransformer<T> |
encoding(Codec codec)
The factory method for the
EncodingPayloadTransformer . |
static JsonToObjectTransformer |
fromJson() |
static JsonToObjectTransformer |
fromJson(java.lang.Class<?> targetClass) |
static JsonToObjectTransformer |
fromJson(java.lang.Class<?> targetClass,
JsonObjectMapper<?,?> jsonObjectMapper) |
static JsonToObjectTransformer |
fromJson(JsonObjectMapper<?,?> jsonObjectMapper) |
static MapToObjectTransformer |
fromMap(java.lang.Class<?> targetClass) |
static MapToObjectTransformer |
fromMap(java.lang.String beanName) |
static StreamTransformer |
fromStream()
The factory method for the
StreamTransformer . |
static StreamTransformer |
fromStream(java.lang.String charset)
Create an instance with the charset to convert the stream to a
String; if null a
byte[] will be produced instead. |
static ObjectToStringTransformer |
objectToString() |
static ObjectToStringTransformer |
objectToString(java.lang.String charset) |
static PayloadSerializingTransformer |
serializer() |
static PayloadSerializingTransformer |
serializer(org.springframework.core.serializer.Serializer<java.lang.Object> serializer) |
static SyslogToMapTransformer |
syslogToMap() |
static ObjectToJsonTransformer |
toJson() |
static ObjectToJsonTransformer |
toJson(JsonObjectMapper<?,?> jsonObjectMapper) |
static ObjectToJsonTransformer |
toJson(JsonObjectMapper<?,?> jsonObjectMapper,
ObjectToJsonTransformer.ResultType resultType) |
static ObjectToJsonTransformer |
toJson(JsonObjectMapper<?,?> jsonObjectMapper,
ObjectToJsonTransformer.ResultType resultType,
java.lang.String contentType) |
static ObjectToJsonTransformer |
toJson(JsonObjectMapper<?,?> jsonObjectMapper,
java.lang.String contentType) |
static ObjectToJsonTransformer |
toJson(ObjectToJsonTransformer.ResultType resultType,
java.lang.String contentType) |
static ObjectToJsonTransformer |
toJson(java.lang.String contentType) |
static ObjectToMapTransformer |
toMap() |
static ObjectToMapTransformer |
toMap(boolean shouldFlattenKeys) |
static ObjectToMapTransformer |
toMap(JsonObjectMapper<?,?> jsonObjectMapper) |
static ObjectToMapTransformer |
toMap(JsonObjectMapper<?,?> jsonObjectMapper,
boolean shouldFlattenKeys) |
public static ObjectToStringTransformer objectToString()
public static ObjectToStringTransformer objectToString(java.lang.String charset)
public static ObjectToMapTransformer toMap()
public static ObjectToMapTransformer toMap(boolean shouldFlattenKeys)
public static ObjectToMapTransformer toMap(JsonObjectMapper<?,?> jsonObjectMapper)
public static ObjectToMapTransformer toMap(JsonObjectMapper<?,?> jsonObjectMapper, boolean shouldFlattenKeys)
public static MapToObjectTransformer fromMap(java.lang.Class<?> targetClass)
public static MapToObjectTransformer fromMap(java.lang.String beanName)
public static ObjectToJsonTransformer toJson()
public static ObjectToJsonTransformer toJson(JsonObjectMapper<?,?> jsonObjectMapper)
public static ObjectToJsonTransformer toJson(JsonObjectMapper<?,?> jsonObjectMapper, ObjectToJsonTransformer.ResultType resultType)
public static ObjectToJsonTransformer toJson(java.lang.String contentType)
public static ObjectToJsonTransformer toJson(JsonObjectMapper<?,?> jsonObjectMapper, java.lang.String contentType)
public static ObjectToJsonTransformer toJson(ObjectToJsonTransformer.ResultType resultType, java.lang.String contentType)
public static ObjectToJsonTransformer toJson(JsonObjectMapper<?,?> jsonObjectMapper, ObjectToJsonTransformer.ResultType resultType, java.lang.String contentType)
public static JsonToObjectTransformer fromJson()
public static JsonToObjectTransformer fromJson(java.lang.Class<?> targetClass)
public static JsonToObjectTransformer fromJson(JsonObjectMapper<?,?> jsonObjectMapper)
public static JsonToObjectTransformer fromJson(java.lang.Class<?> targetClass, JsonObjectMapper<?,?> jsonObjectMapper)
public static PayloadSerializingTransformer serializer()
public static PayloadSerializingTransformer serializer(org.springframework.core.serializer.Serializer<java.lang.Object> serializer)
public static PayloadDeserializingTransformer deserializer(java.lang.String... whiteListPatterns)
public static PayloadDeserializingTransformer deserializer(org.springframework.core.serializer.Deserializer<java.lang.Object> deserializer, java.lang.String... whiteListPatterns)
public static <T,U> PayloadTypeConvertingTransformer<T,U> converter(org.springframework.core.convert.converter.Converter<T,U> converter)
public static SyslogToMapTransformer syslogToMap()
public static <T> EncodingPayloadTransformer<T> encoding(Codec codec)
EncodingPayloadTransformer
.T
- the payload
type.codec
- the Codec
to use.EncodingPayloadTransformer
instance.public static <T> DecodingTransformer<T> decoding(Codec codec, java.lang.Class<T> type)
DecodingTransformer
.T
- the target type.codec
- the Codec
to use.type
- the target type to transform to.DecodingTransformer
instance.public static <T> DecodingTransformer<T> decoding(Codec codec, java.lang.String typeExpression)
DecodingTransformer
.T
- the target type.codec
- the Codec
to use.typeExpression
- the target type SpEL expression.DecodingTransformer
instance.public static <T> DecodingTransformer<T> decoding(Codec codec, java.util.function.Function<org.springframework.messaging.Message<?>,java.lang.Class<T>> typeFunction)
DecodingTransformer
.T
- the target type.codec
- the Codec
to use.typeFunction
- the target type function.DecodingTransformer
instance.public static <T> DecodingTransformer<T> decoding(Codec codec, org.springframework.expression.Expression typeExpression)
DecodingTransformer
.T
- the target type.codec
- the Codec
to use.typeExpression
- the target type SpEL expression.DecodingTransformer
instance.public static StreamTransformer fromStream()
StreamTransformer
.StreamTransformer
instance.public static StreamTransformer fromStream(java.lang.String charset)
byte[]
will be produced instead.charset
- the charset.StreamTransformer
instance.