INTSAMPLES-89 - Upgrade to Spring Integration 2.2 RC3
* Test samples * Polish documentation * Polish code For reference see: https://jira.springsource.org/browse/INTSAMPLES-89
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
XMPP Sample
|
||||
===========
|
||||
|
||||
This example was prepared for testing with GoogleTalk and demonstrates the following aspects of the *Extensible Messaging and Presence Protocol* (XMPP) support available with Spring Integration:
|
||||
This example was prepared for testing with [Google Talk][] and demonstrates the following aspects of the [Extensible Messaging and Presence Protocol][] (XMPP) support available with *Spring Integration*:
|
||||
|
||||
1. XMPP Inbound Channel Adapter - receive instant messages.
|
||||
2. XMPP Outboud Channel Adapter - send instant messages.
|
||||
@@ -16,4 +16,7 @@ Everything there was already preset. The only 3 properties you need to provide v
|
||||
You'll also need to test it with your friend or have two Google accounts setup.
|
||||
|
||||
To test **SendInstantMessageSample.java**, first log on to the account identified via **send.to.user** property and make sure that that account is in your buddy list. Then run the demo.
|
||||
To test **ReceiveInstantMessageSample.java**, first log on to the account identified via **send.to.user** property. Then run the demo. When demo class is started you'll see on GoggleTalk that your buddy (ReceiveInstantMessageSample.java) has just signed on. Now you can send a message from GoogleTalk and see it appear ion the console.
|
||||
To test **ReceiveInstantMessageSample.java**, first log on to the account identified via **send.to.user** property. Then run the demo. Now any instant messages sent to your account appear in the console.
|
||||
|
||||
[Google Talk]: http://www.google.com/talk/
|
||||
[Extensible Messaging and Presence Protocol]: http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol
|
||||
@@ -2,13 +2,18 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.springframework.integration.samples</groupId>
|
||||
<artifactId>xmpp</artifactId>
|
||||
<version>2.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>2.2.0.BUILD-SNAPSHOT</version>
|
||||
<name>Samples (Basic) - XMPP Demo</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<prerequisites>
|
||||
<maven>2.2.1</maven>
|
||||
</prerequisites>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<spring.integration.version>2.1.0.RELEASE</spring.integration.version>
|
||||
<log4j.version>1.2.16</log4j.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<spring.integration.version>2.2.0.RC3</spring.integration.version>
|
||||
<log4j.version>1.2.17</log4j.version>
|
||||
<junit.version>4.10</junit.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
@@ -34,13 +39,13 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<version>2.5.1</version>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<compilerArgument>-Xlint:all</compilerArgument>
|
||||
<showWarnings>true</showWarnings>
|
||||
<showDeprecation>false</showDeprecation>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
@@ -8,18 +8,18 @@
|
||||
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}"/>
|
||||
|
||||
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>
|
||||
@@ -8,24 +8,24 @@
|
||||
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"/>
|
||||
|
||||
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>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<!-- Loggers -->
|
||||
<logger name="org.springframework.integration">
|
||||
<level value="warn" />
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.integration.samples">
|
||||
|
||||
Reference in New Issue
Block a user