TCP Sample - Use <o-t-s-t />

Replace expression-based transformers with <o-t-s-t/> now that
it can handle `byte[]`.
This commit is contained in:
Gary Russell
2014-08-27 17:46:54 -04:00
parent 28116776c2
commit 3296463fb8
2 changed files with 6 additions and 9 deletions

View File

@@ -33,9 +33,8 @@
request-timeout="10000"
reply-timeout="10000"/>
<int:transformer id="clientBytes2String"
input-channel="clientBytes2StringChannel"
expression="new String(payload)"/>
<int:object-to-string-transformer id="clientBytes2String"
input-channel="clientBytes2StringChannel" />
<!-- Server side -->
@@ -57,10 +56,9 @@
<bean id="echoService"
class="org.springframework.integration.samples.tcpclientserver.EchoService" />
<int:transformer id="serverBytes2String"
<int:object-to-string-transformer id="serverBytes2String"
input-channel="serverBytes2StringChannel"
output-channel="toSA"
expression="new String(payload)"/>
output-channel="toSA"/>
<int:transformer id="errorHandler"
input-channel="errorChannel"

View File

@@ -39,9 +39,8 @@
<int:channel id="clientBytes2StringChannel"/>
<int:transformer id="clientBytes2String"
input-channel="clientBytes2StringChannel"
expression="new String(payload)"/>
<int:object-to-string-transformer id="clientBytes2String"
input-channel="clientBytes2StringChannel" />
<!-- Server side -->
<!-- When creating the socket factory on the server side, we specify both the serializer and deserializer