INTSAMPLES-9 added XMPP sample

This commit is contained in:
Oleg Zhurakousky
2010-11-18 15:07:11 -05:00
parent f4e019da3f
commit e6c6a3ecc4
14 changed files with 288 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?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 http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
http://www.springframework.org/schema/integration/xmpp http://www.springframework.org/schema/integration/xmpp/spring-integration-xmpp-2.0.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-xmpp:inbound-channel-adapter channel="imOutChannel" xmpp-connection="googleTalkConnection"/>
<int:logging-channel-adapter id="imOutChannel"/>
</beans>

View File

@@ -0,0 +1,31 @@
<?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 http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
http://www.springframework.org/schema/integration/xmpp http://www.springframework.org/schema/integration/xmpp/spring-integration-xmpp-2.0.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>

View File

@@ -0,0 +1,8 @@
log4j.rootCategory=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %t %c{2}:%L - %m%n
log4j.category.org.springframework=WARN
log4j.category.org.springframework.integration=INFO

View File

@@ -0,0 +1,8 @@
user.login=user@gmail.com
user.password=password
user.host=talk.google.com
user.service=gmail.com
user.resource=resource
user.port=5222
send.to.user=another.user@gmail.com