<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.0"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:spring="http://www.springframework.org/schema/beans"
       xmlns:tcp="http://www.mulesource.org/schema/mule/tcp/2.0"
       xsi:schemaLocation="
               http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
               http://www.mulesource.org/schema/mule/core/2.0 http://www.mulesource.org/schema/mule/core/2.0/mule.xsd
               http://www.mulesource.org/schema/mule/tcp/2.0 http://www.mulesource.org/schema/mule/tcp/2.0/mule-tcp.xsd">

    <tcp:connector name="safe-connector">
        <tcp:safe-protocol payloadOnly="true" maxMessageLength="10"/>
    </tcp:connector>

    <tcp:connector name="length-connector">
        <tcp:length-protocol payloadOnly="true" maxMessageLength="10"/>
    </tcp:connector>
    
    <tcp:endpoint name="safe" host="localhost" port="65432" connector-ref="safe-connector" 
                  synchronous="true"/>
                          
    <endpoint name="length" address="tcp://localhost:65433" connector-ref="length-connector" 
              synchronous="true"/>              

    <model name="main">
        <service name="service">
            <inbound>
                <tcp:inbound-endpoint ref="safe"/>
                <!-- legacy style -->
                <inbound-endpoint ref="length"/>
            </inbound>
            <pooled-component>
                <prototype-object class="org.mule.tck.functional.FunctionalTestComponent">
                    <property key="addReceived" value="false"/>
                </prototype-object>
            </pooled-component>
        </service>
    </model>

</mule>
