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

	<channel id="requestChannel">
		<queue capacity="100"/>
	</channel>

	<channel id="replyChannel">
		<queue capacity="100"/>
	</channel>

	<channel id="otherRequestChannel">
		<queue capacity="100"/>
	</channel>

	<gateway id="oneWay"
			 service-interface="org.springframework.integration.gateway.TestService"
			 default-request-channel="requestChannel"
			 proxy-default-methods="true"/>

	<gateway id="solicitResponse"
			 service-interface="org.springframework.integration.gateway.TestService"
			 default-reply-channel="replyChannel"
			 default-reply-timeout="3000"/>

	<gateway id="requestReply"
			 service-interface="org.springframework.integration.gateway.TestService"
			 default-request-channel="requestChannel"
			 default-reply-channel="replyChannel"
			 default-reply-timeout="5000"/>

	<gateway id="async"
			 service-interface="org.springframework.integration.gateway.TestService"
			 default-request-channel="requestChannel"
			 default-reply-channel="replyChannel"
			 async-executor="testExecutor"/>

	<gateway id="asyncOff"
			 service-interface="org.springframework.integration.gateway.TestService"
			 default-request-channel="requestChannel"
			 default-reply-channel="replyChannel"
			 async-executor=""/>

	<gateway id="promise"
			 service-interface="org.springframework.integration.gateway.TestService"
			 default-request-channel="requestChannel"
			 default-reply-channel="replyChannel"/>

	<gateway id="asyncCompletable"
			 service-interface="org.springframework.integration.gateway.TestService"
			 default-request-channel="requestChannel"
			 default-reply-channel="replyChannel"
			 async-executor="testExecutor"/>

	<gateway id="completableNoAsync"
			 service-interface="org.springframework.integration.gateway.TestService"
			 default-request-channel="requestChannel"
			 default-reply-channel="replyChannel"
			 async-executor=""/>

	<gateway id="customCompletable"
			 service-interface="org.springframework.integration.gateway.TestService"
			 default-request-channel="requestChannel"
			 default-reply-channel="replyChannel"
			 async-executor=""/>

	<gateway id="customCompletableAttemptAsync"
			 service-interface="org.springframework.integration.gateway.TestService"
			 default-request-channel="requestChannel"
			 default-reply-channel="replyChannel"
			 async-executor="testExecutor"/>

	<gateway id="methodOverride"
			 service-interface="org.springframework.integration.gateway.TestService"
			 default-request-channel="requestChannel"
			 default-reply-channel="replyChannel"
			 default-request-timeout="1000"
			 default-reply-timeout="2000"
			 async-executor="testExecutor">
		<default-header name="baz" value="qux"/>
		<method name="oneWay" request-channel="otherRequestChannel"
				request-timeout="456"
				reply-timeout="123"
				payload-expression="'fiz'"
				reply-channel="foo">
			<header name="foo" value="bar"/>
		</method>
		<method name="oneWayWithTimeouts" request-channel="otherRequestChannel"
				request-timeout="args[1]"
				reply-timeout="args[2]">
		</method>
	</gateway>

	<!-- no assertions for this. The fact that this config does not result in error is sufficient -->
	<gateway id="defaultConfig" default-request-channel="nullChannel"/>

	<beans:bean id="testExecutor" class="org.springframework.integration.config.xml.GatewayParserTests$TestExecutor"/>

</beans:beans>
