Sample with Spring DSL - 6.3

Talend ESB Mediation Developer Guide

Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Design and Development
Talend ESB

Spring DSL can, of course, also be used for Mina. In the sample below we expose a TCP server on port 5555:

   <from uri="mina2:tcp://localhost:5555?textline=true"/>
   <to uri="bean:myTCPOrderHandler"/>

In the route above, we expose a TCP server on port 5555 using the textline codec. We let the Spring bean with ID, myTCPOrderHandler, handle the request and return a reply. For instance, the handler bean could be implemented as follows:

public String handleOrder(String payload) {
     return "Order: OK"