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

	<context:property-placeholder location="classpath:xmpp.properties"/>

	<int-xmpp:xmpp-connection id="googleTalkConnection"
		user="${user.login}"
		password="${user.password}"
		host="${user.host}"
		service-name="${user.service}"
		port="${user.port}"/>

	<int:channel id="toUserChannel"/>

	<int-xmpp:header-enricher input-channel="toUserChannel" output-channel="imChannel">
		<int-xmpp:chat-to value="${send.to.user}"/>
	</int-xmpp:header-enricher>

	<int:channel id="imChannel"/>

	<int-xmpp:outbound-channel-adapter channel="imChannel" xmpp-connection="googleTalkConnection"/>

</beans>
