diff --git a/docs/src/reference/docbook/transformer.xml b/docs/src/reference/docbook/transformer.xml
index 844ea85ce9..f18c449ab2 100644
--- a/docs/src/reference/docbook/transformer.xml
+++ b/docs/src/reference/docbook/transformer.xml
@@ -74,15 +74,15 @@
- Just like Routers, Aggregators and other components, since Spring Integration 2.0 Transformers can also benefit from SpEL
- http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/expressions.html
+ Just like Routers, Aggregators and other components, as of Spring Integration 2.0 Transformers can also benefit from SpEL support
+ (http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/expressions.html)
whenever transformation logic is relatively simple.
]]>
- In the above configuration we are achieving a simple transformation of the payload with a simple SpEL
+ In the above configuration we are achieving a simple transformation of the payload with a simple SpEL
expression and without writing a custom transformer. Our payload (assuming String) will be
upper-cased and concatenated with the current timestamp with some simple formatting.
@@ -91,11 +91,13 @@
Common Transformers
- There are a also a few Transformer implementations available out of the box. Because, it is fairly common
+ There are also a few Transformer implementations available out of the box. Because, it is fairly common
to use the toString() representation of an Object, Spring Integration provides an
ObjectToStringTransformer whose output is a Message with a String payload. That String
- is the result of invoking the toString operation on the inbound Message's payload.
+ is the result of invoking the toString() operation on the inbound Message's payload.
+
]]>
+
A potential example for this would be sending some arbitrary object to the 'outbound-channel-adapter' in the
file namespace. Whereas that Channel Adapter only supports String, byte-array, or
java.io.File payloads by default, adding this transformer immediately before the
@@ -109,7 +111,10 @@
If you need to serialize an Object to a byte array or deserialize a byte array back into an Object,
- Spring Integration provides symmetrical serialization transformers.
+ Spring Integration provides symmetrical serialization transformers. These will use standard Java serialization
+ by default, but you can provide an implementation of Spring 3.0's Serializer or Deserializer strategies via the
+ 'serializer' and 'deserializer' attributes, respectively.
+
]]>
@@ -118,10 +123,10 @@
Object-to-Map Transformer
- As added convenience, Spring Integration also provides Object-to-Map and Map-to-Object transformers which
- utilize Spring Expression Language (SpEL) to serialize and de-serialize the object graphs. Object hierarchy is introspected
- to the most primitive types (e.g., String, int etc.). The path to this type is described via SpEL, which becomes the keykey in the
- transformed Map with primitive type being the value.
+ Spring Integration also provides Object-to-Map and Map-to-Object transformers which
+ utilize the Spring Expression Language (SpEL) to serialize and de-serialize the object graphs. The object hierarchy is introspected
+ to the most primitive types (String, int, etc.). The path to this type is described via SpEL, which becomes the key in the
+ transformed Map. The primitive type becomes the value.
For example:
@@ -140,19 +145,19 @@ public class Child{
{person.name=George, person.child.name=Jenna, person.child.nickNames[0]=Bimbo . . . etc}
- SpEL-based Map allows you to describe the object structure without sharing the actual types allowing
+ The SpEL-based Map allows you to describe the object structure without sharing the actual types allowing
you to restore/rebuild the object graph into a differently typed Object graph as long as you maintain the structure.
For example:
- The above structure could be easily restored back to the following Object graph via Map-to-Object transformer:
- nickNames;
// setters and getters are omitted
@@ -175,14 +180,14 @@ public class Kid{
- NOTE: 'ref' and 'type' attributes are mutually exclusive. You can only use either one.
- Also, if using 'ref' attribute you must point to a 'prototype' scoped bean, otherwise
- BeanCreationException will be thrown.
+ NOTE: 'ref' and 'type' attributes are mutually exclusive. You can only use one.
+ Also, if using the 'ref' attribute, you must point to a 'prototype' scoped bean, otherwise
+ a BeanCreationException will be thrown.
-