...
See the Mina documentation how to write your own codec. To use your custom codec with camel-mina you should register your codec in the Registry such as the Spring XML file. Then use the codec option to set your codec with its bean id. See HL7 for examples.
...
Sample with sync=false
In this sample we let Camel expose a service that listen for TCP connections on port 6200. We use the textline codec. In out route we create the mina in the from to create the consumer that listen on port 6200:
...
Wiki Markup |
---|
{snippet:id=e2|lang=java|url=activemq/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaConsumerTest.java} |
Sample with sync=true
In the next sample we have a more common use-case where we expose a TCP service on port 6201 also using the textline codec. However this time we want to return a response and indicate that we support this so we set the sync option to true on the consumer.
...