<?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="input"/>

	<channel id="inputForRouterWithDefaultOutput"/>

	<channel id="output1">
		<queue capacity="1"/>
	</channel>

	<channel id="output2">
		<queue capacity="1"/>
	</channel>

	<channel id="defaultOutput">
		<queue capacity="2"/>
	</channel>

	<router id="router" ref="pojo" method="route" input-channel="input"/>

	<router id="routerWithDefaultOutputChannel" ref="pojo" method="route"
			input-channel="inputForRouterWithDefaultOutput"
			default-output-channel="defaultOutput"/>

	<beans:bean id="pojo" class="org.springframework.integration.router.config.TestRouter"/>

	<channel id="output3">
		<queue capacity="1"/>
	</channel>

	<channel id="inputForAbstractMessageRouterImplementation"/>

	<router input-channel="inputForAbstractMessageRouterImplementation" ref="implementation"/>

	<beans:bean id="implementation" class="org.springframework.integration.router.config.RouterParserTests$TestRouterImplementation">
		<beans:constructor-arg ref="output3"/>
	</beans:bean>

	<channel id="output4">
		<queue capacity="1"/>
	</channel>

	<channel id="inputForAnnotatedRouter"/>

	<router input-channel="inputForAnnotatedRouter" ref="annotated"/>

	<router input-channel="sequenceRouter" apply-sequence="true" expression="'sequenceOut1,sequenceOut2,sequenceOut3'"/>

	<channel id="sequenceOut1">
		<queue/>
	</channel>

	<channel id="sequenceOut2">
		<queue/>
	</channel>

	<channel id="sequenceOut3">
		<queue/>
	</channel>

	<beans:bean id="annotated" class="org.springframework.integration.router.config.RouterParserTests$AnnotatedTestRouterBean">
		<beans:constructor-arg ref="output4"/>
	</beans:bean>

	<channel id="inputForRouterRequiringResolution"/>

	<router id="resolutionRequiredRouter" ref="pojo" method="route" input-channel="inputForRouterRequiringResolution" resolution-required="true" />

	<beans:bean id="payloadAsChannelNameRouter" class="org.springframework.integration.router.config.RouterParserTests$ReturnStringPassedInAsChannelNameRouter" />

	<router id="resolutionRequiredFalseRouter" ref="payloadAsChannelNameRouter" input-channel="resolutionRequiredIsFalseInput" resolution-required="false" />

	<channel id="timeoutRouterChannel"/>

	<router id="routerWithTimeout" ref="payloadAsChannelNameRouter" send-timeout="1234" input-channel="timeoutRouterChannel"/>

	<router input-channel="routerNestedBeanChannel" method="route">
		<beans:bean class="org.springframework.integration.router.config.TestRouter"/>
	</router>

	<chain input-channel="chainRouterNestedBeanChannel">
		<router method="route">
			<beans:bean class="org.springframework.integration.router.config.TestRouter"/>
		</router>
	</chain>

	<router input-channel="routerAndErrorChannelInputChannel" default-output-channel="errorChannel" resolution-required="false">
		<beans:bean class="org.springframework.integration.router.config.RouterParserTests.NonExistingChannelRouter"/>
	</router>

	<beans:bean id="testChannelResolver"
		class="org.springframework.integration.router.config.RouterParserTests$TestChannelResolver"/>

</beans:beans>
