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

    <!-- access this from test code to set destination directory -->
    <file:connector name="sendConnector" outputAppend="true" outputPattern="[TARGET_FILE]"/>

    <!-- access this from test code to set destination directory -->
    <file:connector name="receiveConnector" fileAge="500" autoDelete="true" pollingFrequency="100"/>

    <vm:connector name="vmQueue" queueEvents="true"/>

    <file:endpoint path="test" name="send" connector-ref="sendConnector"/>
    
    <endpoint address="vm://receive" name="receive"/>

    <model name="receiveModel">

        <service name="relay">
            <inbound>
                <!-- will be set at runtime, once connector has readFromDirectory -->
                <!-- mule:endpoint address="file:///tmp/foo"/ -->
                <forwarding-router/>
            </inbound>
            <outbound>
                <outbound-pass-through-router>
                    <outbound-endpoint ref="receive"/>
                </outbound-pass-through-router>
            </outbound>
        </service>

    </model>

</mule>
