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

	<beans:bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<beans:property name="location" value="classpath:test.properties"/>
	</beans:bean>

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

	<xmpp:presence-inbound-channel-adapter channel="inboundPresenceChannel" xmpp-connection="testConnection"/>

	<channel id="inboundPresenceChannel"/>

	<service-activator input-channel="inboundPresenceChannel" output-channel="stdOutChannel"
					expression="'Presence event from: ' + payload.getFrom() + ' - ' + payload.getMode()"/>

	<channel id="stdOutChannel"/>

	<stream:stdout-channel-adapter channel="stdOutChannel" append-newline="true"/>

</beans:beans>
