<?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:tls="http://www.mulesource.org/schema/mule/tls/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/tls/2.0 http://www.mulesource.org/schema/mule/tls/2.0/mule-tls.xsd">

    <!-- keepSendSocketOpen is required for the Async test case?  see TCP -->
    <tls:connector name="tlsConnector" keepSendSocketOpen="true">
        <tls:client path="clientKeyStore" storePassword="mulepassword"/>
        <tls:key-store path="serverKeystore" storePassword="mulepassword" keyPassword="mulepassword"/>
        <tls:server path="trustStore" storePassword="mulepassword"/>
    </tls:connector>

    <tls:endpoint name="sendEndpoint" connector-ref="tlsConnector" address="tls://localhost:60198" synchronous="true"/>

    <endpoint name="sendManyEndpoint" connector-ref="tlsConnector" address="tls://localhost:60197" synchronous="true"/>

    <tls:endpoint name="asyncEndpoint" connector-ref="tlsConnector" host="localhost" port="60196" synchronous="false"/>

    <model name="main">

        <custom-service name="testComponent1" class="org.mule.tck.testmodels.mule.TestSedaService">
            <inbound>
                <tls:inbound-endpoint ref="sendEndpoint"/>
            </inbound>
            <pooled-component>
                <prototype-object class="org.mule.tck.functional.FunctionalTestComponent">
                    <properties>
                        <spring:entry key="eventCallback">
                            <spring:bean class="org.mule.tck.functional.CounterCallback"/>
                        </spring:entry>
                    </properties>
                </prototype-object>
            </pooled-component>
        </custom-service>

        <custom-service name="testComponent2" class="org.mule.tck.testmodels.mule.TestSedaService">
            <inbound>
                <tls:inbound-endpoint ref="sendManyEndpoint"/>
            </inbound>
            <pooled-component>
                <prototype-object class="org.mule.tck.functional.FunctionalTestComponent">
                    <properties>
                        <spring:entry key="eventCallback">
                            <spring:bean class="org.mule.tck.functional.CounterCallback"/>
                        </spring:entry>
                    </properties>
                </prototype-object>
            </pooled-component>
        </custom-service>

        <custom-service name="testComponent3" class="org.mule.tck.testmodels.mule.TestSedaService">
            <inbound>
                <inbound-endpoint ref="asyncEndpoint"/>
            </inbound>
            <pooled-component>
                <prototype-object class="org.mule.tck.functional.FunctionalTestComponent">
                    <properties>
                        <spring:entry key="eventCallback">
                            <spring:bean class="org.mule.tck.functional.ResponseWriterCallback"/>
                        </spring:entry>
                    </properties>
                </prototype-object>
            </pooled-component>
        </custom-service>

    </model>

</mule>
