<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns="http://www.springframework.org/schema/integration"
             xmlns:beans="http://www.springframework.org/schema/beans"
             xmlns:int-rsocket="http://www.springframework.org/schema/integration/rsocket"
             xsi:schemaLocation="http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/integration/rsocket https://www.springframework.org/schema/integration/rsocket/spring-integration-rsocket.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">

    <beans:description>
        This is the application context for ControlBusMain. It configures a Gateway tied to an RMI outbound gateway to
        communicate
        remotely with the CafeDemoApp.
    </beans:description>


    <gateway id="waiterMonitor"
             service-interface="org.springframework.integration.samples.cafe.WaiterMonitor">
        <method name="sendControlScript" request-channel="controlBusInput" request-timeout="1000" reply-timeout="1000"/>
    </gateway>

    <beans:bean id="clientRSocketConnector" class="org.springframework.integration.rsocket.ClientRSocketConnector">
        <beans:constructor-arg value="localhost"/>
        <beans:constructor-arg value="7777"/>
    </beans:bean>

    <int-rsocket:outbound-gateway
            request-channel="controlBusInput"
            client-rsocket-connector="clientRSocketConnector"
            route="controlBus"/>

</beans:beans>
