INTEXT-64 - Polishing

* Update dependency versions
* Add more comments/links
* Remove DocBook usage
This commit is contained in:
Gunnar Hillert
2013-05-15 16:44:48 -04:00
parent 745dd018ca
commit ac43f8e930
21 changed files with 118 additions and 299 deletions

View File

@@ -11,6 +11,7 @@ The Spring Integration Extensions project provides extension modules for [Spring
* [XQuery][] Support
* [Splunk][] Support
* [Amazon Web Services (AWS)][] Support
* [MQ Telemetry Transport (MQTT)][] Support
## Samples
@@ -133,4 +134,5 @@ The Spring Integration Extensions Framework is released under version 2.0 of the
[Websockets]: http://www.html5rocks.com/en/tutorials/websockets/basics/
[XQuery]: http://en.wikipedia.org/wiki/XQuery
[Splunk]:http://www.splunk.com/
[Amazon Web Services (AWS)]: http://aws.amazon.com/
[Amazon Web Services (AWS)]: http://aws.amazon.com/
[MQ Telemetry Transport (MQTT)]: http://mqtt.org/

View File

@@ -1,7 +1,7 @@
Spring Integration Mqtt Adapters
=================================================
`inbound` and `outbound` channel adapters are provided for Mqtt. The current implementation uses the [Eclipse Paho][] client.
`inbound` and `outbound` channel adapters are provided for [MQ Telemetry Transport (MQTT)][]. The current implementation uses the [Eclipse Paho][] client.
Example configurations...
@@ -73,4 +73,5 @@ For more information, please also don't forget to visit the [Spring Integration]
[Spring Integration Pattern Catalog]: https://github.com/SpringSource/spring-integration-pattern-catalog
[Stack Overflow]: http://stackoverflow.com/faq
[Eclipse Paho]: http://www.eclipse.org/paho/
[open paho bug]: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382471
[open paho bug]: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382471
[MQ Telemetry Transport (MQTT)]: http://mqtt.org/

View File

@@ -1,12 +1,9 @@
description = 'Spring Integration Mqtt Adapter'
description = 'Spring Integration MQTT Adapter'
buildscript {
repositories {
maven { url 'https://repo.springsource.org/plugins-snapshot' }
}
dependencies {
classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.1.5'
}
}
apply plugin: 'java'
@@ -26,9 +23,9 @@ sourceCompatibility=1.6
targetCompatibility=1.6
ext {
junitVersion = '4.10'
log4jVersion = '1.2.12'
mockitoVersion = '1.9.0'
junitVersion = '4.11'
log4jVersion = '1.2.17'
mockitoVersion = '1.9.5'
springVersion = '3.1.3.RELEASE'
springIntegrationVersion = '3.0.0.BUILD-SNAPSHOT'
@@ -63,7 +60,7 @@ dependencies {
testCompile "log4j:log4j:$log4jVersion"
testCompile "org.mockito:mockito-all:$mockitoVersion"
testCompile "org.springframework:spring-test:$springVersion"
jacoco group: "org.jacoco", name: "org.jacoco.agent", version: "0.5.6.201201232323", classifier: "runtime"
jacoco group: "org.jacoco", name: "org.jacoco.agent", version: "0.6.2.201302030002", classifier: "runtime"
}
@@ -92,12 +89,6 @@ artifacts {
archives javadocJar
}
apply plugin: 'docbook-reference'
reference {
sourceDir = file('src/reference/docbook')
}
apply plugin: 'sonar'
sonar {
@@ -174,7 +165,7 @@ task schemaZip(type: Zip) {
task docsZip(type: Zip) {
group = 'Distribution'
classifier = 'docs'
description = "Builds -${classifier} archive containing api and reference " +
description = "Builds -${classifier} archive containing the api " +
"for deployment at static.springframework.org/spring-integration/docs."
from('src/dist') {
@@ -184,10 +175,6 @@ task docsZip(type: Zip) {
from (api) {
into 'api'
}
from (reference) {
into 'reference'
}
}
task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
@@ -262,5 +249,5 @@ task dist(dependsOn: assemble) {
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '1.3'
gradleVersion = '1.6'
}

View File

@@ -1,6 +1,6 @@
#Wed Sep 05 13:34:36 EDT 2012
#Wed May 15 15:57:24 EDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.1-bin.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip

View File

@@ -101,7 +101,7 @@ if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi

View File

@@ -1,90 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@@ -27,6 +27,7 @@ import org.eclipse.paho.client.mqttv3.MqttException;
/**
* Creates a default {@link MqttClient} and a set of options as configured.
* @author Gary Russell
* @author Gunnar Hillert
* @since 1.0
*
*/
@@ -78,6 +79,11 @@ public class DefaultMqttPahoClientFactory implements MqttPahoClientFactory {
this.userName = userName;
}
/**
* Will be used to set the "Last Will and Testament" (LWT) for the connection.
*
* @see MqttConnectOptions
*/
public void setWill(Will will) {
this.will = will;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

After

Width:  |  Height:  |  Size: 539 B

View File

@@ -1,73 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="SIAdapterLowerPrefix"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>MqttAdapter Adapter</title>
<para>
The Spring Integration MqttAdapter Adapter provides...
</para>
<itemizedlist>
<listitem>
<para><emphasis><link linkend='SIAdapterLowerPrefix-outbound-channel-adapter'>Outbound Channel adapter</link></emphasis></para>
</listitem>
<listitem>
<para><emphasis><link linkend='SIAdapterLowerPrefix-outbound-gateway'>Outbound Gateway</link></emphasis></para>
</listitem>
<listitem>
<para><emphasis><link linkend='SIAdapterLowerPrefix-inbound-channel-adapter'>Inbound Channel Adapter</link></emphasis></para>
</listitem>
</itemizedlist>
<section id="jpa-java-implementation">
<title>Java Implementation</title>
<para>Each of the provided components will use the
<classname>org.springframework.integration.mqtt.core.MqttAdapterExecutor</classname>
class...
</para>
</section>
<section id="jpa-common-configuration-attributes">
<title>Common Configuration Attributes</title>
<para>
Certain configuration parameters are shared amongst all MqttAdapter
components and are described below:
</para>
<para><emphasis role="bold">auto-startup</emphasis></para>
<para>
Lifecycle attribute signaling if this component should
be started during Application Context startup.
Defaults to <code>true</code>.
<emphasis>Optional</emphasis>.
</para>
<para><emphasis role="bold">id</emphasis></para>
<para>
Identifies the underlying Spring bean definition, which
is an instance of either <classname>EventDrivenConsumer</classname>
or <classname>PollingConsumer</classname>.
<emphasis>Optional</emphasis>.
</para>
</section>
<section id="SIAdapterLowerPrefix-outbound-channel-adapter">
<title>Outbound Channel Adapter</title>
<para>
The MqttAdapter Outbound channel adapter allows you to...
</para>
</section>
<section id="SIAdapterLowerPrefix-outbound-gateway">
<title>Outbound Gateway</title>
<para>
Outbound gateways are similar to outbound channel adapters except that it can also be used to
get a result on the <emphasis>reply channel</emphasis> after performing
the given...
</para>
</section>
<section id="SIAdapterLowerPrefix-inbound-channel-adapter">
<title>Inbound Channel Adapter</title>
<para>
An inbound channel adapter is used to execute...
</para>
</section>
</chapter>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<appendix xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="history"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Change History</title>
</appendix>

View File

@@ -1,68 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<book xmlns="http://docbook.org/ns/docbook" version="5.0"
xml:id="spring-integration-reference" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink">
<bookinfo>
<title>Spring Integration MqttAdapter Adapter</title>
<titleabbrev>MqttAdapter Adapter ${version}</titleabbrev>
<productname>Spring Integration</productname>
<releaseinfo>${version}</releaseinfo>
<!-- TODO: this isn't showing up. -->
<mediaobject>
<imageobject role="fo">
<imagedata fileref="images/logo.png" format="PNG" align="center" />
</imageobject>
<imageobject role="html">
<imagedata fileref="images/logo.png" format="PNG" align="center" />
</imageobject>
</mediaobject>
<!-- END TODO -->
<authorgroup>
<author><firstname>Gary Russell</firstname></author>
</authorgroup>
<legalnotice>
<para>© SpringSource Inc., 2012</para>
</legalnotice>
</bookinfo>
<toc></toc>
<part id="whats-new-part">
<title>What's new?</title>
<partintro id="spring-integration-intro">
<para>
For those who are already familiar with Spring Integration, this
chapter
provides a brief overview of the new features of version 2.2. If you are
interested in the changes and features, that were introduced in
earlier
versions, please take a look at chapter:
<xref linkend="history" />
</para>
</partintro>
<xi:include href="./whats-new.xml" />
</part>
<part id="spring-integration-adapters">
<title>Integration Adapters</title>
<partintro id="spring-integration-adapters">
<para>This section covers the various Channel Adapters and Messaging
Gateways provided
by Spring Integration to support Message-based communication with
external systems.
</para>
</partintro>
<xi:include href="./SIAdapterLowerPrefix.xml" />
</part>
<part id="spring-integration-appendices">
<title>Appendices</title>
<partintro id="spring-integration-adapters">
<para>Advanced Topics and Additional Resources</para>
</partintro>
<xi:include href="./history.xml" />
</part>
</book>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<appendix xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="resources"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Additional Resources</title>
<section id="resources-home">
<title>Spring Integration Home</title>
<para>
The definitive source of information about Spring Integration is the
<ulink url="http://www.springsource.org/spring-integration">Spring Integration Home</ulink> at
<ulink url="http://www.springsource.org">http://www.springsource.org</ulink>. That site serves as a hub of
information and is the best place to find up-to-date announcements about the project as well as links to
articles, blogs, and new sample applications.
</para>
</section>
</appendix>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="whats-new"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>What's new?</title>
<para>
This chapter provides an overview of the new features and improvements
that have been added to the MqttAdapter Adapter:
</para>
</chapter>

View File

@@ -31,7 +31,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
/**
* @author Gary Russell
* @since 3.0
* @since 1.0
*
*/
public class BackTobackAdapterTests {

View File

@@ -32,7 +32,7 @@ import org.springframework.integration.mqtt.core.DefaultMqttPahoClientFactory;
/**
* @author Gary Russell
* @since 3.0
* @since 1.0
*
*/
public class BrokerRunning extends TestWatcher {

View File

@@ -53,7 +53,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
/**
* @author Gary Russell
* @since 3.0
* @since 1.0
*
*/
public class MqttAdapterTests {

View File

@@ -32,7 +32,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* @author Gary Russell
* @since 3.0
* @since 1.0
*
*/
@ContextConfiguration

View File

@@ -35,7 +35,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* @author Gary Russell
* @since 3.0
* @since 1.0
*
*/
@ContextConfiguration