diff --git a/spring-integration-java-dsl/README.md b/spring-integration-java-dsl/README.md
index 8897b4d..2c2b023 100644
--- a/spring-integration-java-dsl/README.md
+++ b/spring-integration-java-dsl/README.md
@@ -1,6 +1,4 @@
Spring Integration Java DSL
===============================
-See the
-[Spring Integration Java DSL Reference](https://github.com/spring-projects/spring-integration-extensions/wiki/Spring-Integration-Java-DSL-Reference)
-for more info.
+The project is hosted on https://github.com/spring-projects/spring-integration-java-dsl
\ No newline at end of file
diff --git a/spring-integration-java-dsl/build.gradle b/spring-integration-java-dsl/build.gradle
deleted file mode 100644
index 82bc98a..0000000
--- a/spring-integration-java-dsl/build.gradle
+++ /dev/null
@@ -1,253 +0,0 @@
-description = 'Spring Integration Java DSL'
-
-apply plugin: 'java'
-apply from: "${rootProject.projectDir}/publish-maven.gradle"
-apply plugin: 'eclipse'
-apply plugin: 'idea'
-
-buildscript {
- repositories {
- maven { url 'http://repo.spring.io/plugins-release' }
- }
- dependencies {
- classpath 'org.springframework.build.gradle:spring-io-plugin:0.0.3.RELEASE'
- }
-}
-
-group = 'org.springframework.integration'
-
-repositories {
- if (version.endsWith('BUILD-SNAPSHOT') || project.hasProperty('platformVersion')) {
- maven { url 'http://repo.spring.io/libs-snapshot' }
- }
- maven { url 'http://repo.spring.io/libs-milestone' }
-}
-
-if (project.hasProperty('platformVersion')) {
- apply plugin: 'spring-io'
-
- dependencies {
- springIoVersions "io.spring.platform:platform-versions:${platformVersion}@properties"
- }
-}
-
-compileJava {
- sourceCompatibility = 1.6
- targetCompatibility = 1.6
-}
-
-compileTestJava {
- sourceCompatibility = 1.8
-}
-
-ext {
- activeMqVersion = '5.10.0'
- apacheSshdVersion = '0.10.1'
- embedMongoVersion = '1.46.0'
- ftpServerVersion = '1.0.6'
- hsqldbVersion = '2.3.2'
- jacocoVersion = '0.7.1.201405082137'
- jmsApiVersion = '1.1-rev-1'
- mailVersion = '1.4.7'
- slf4jVersion = '1.7.7'
- springIntegrationVersion = '4.0.4.RELEASE'
- springBootVersion = '1.1.8.RELEASE'
-
- linkHomepage = 'https://github.com/spring-projects/spring-integration-extensions'
- linkCi = 'https://build.spring.io/browse/INTEXT'
- linkIssue = 'https://jira.spring.io/browse/INTEXT'
- linkScmUrl = 'https://github.com/spring-projects/spring-integration-extensions'
- linkScmConnection = 'https://github.com/spring-projects/spring-integration-extensions.git'
- linkScmDevConnection = 'git@github.com:spring-projects/spring-integration-extensions.git'
-}
-
-eclipse.project.natures += 'org.springframework.ide.eclipse.core.springnature'
-
-// See http://www.gradle.org/docs/current/userguide/dependency_management.html#sub:configurations
-// and http://www.gradle.org/docs/current/dsl/org.gradle.api.artifacts.ConfigurationContainer.html
-configurations {
- jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo
-}
-
-dependencies {
- compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
-
- ['spring-integration-amqp'
- , 'spring-integration-event'
- , 'spring-integration-feed'
- , 'spring-integration-ftp'
- , 'spring-integration-gemfire'
- , 'spring-integration-http'
- , 'spring-integration-jdbc'
- , 'spring-integration-jms'
- , 'spring-integration-jmx'
- , 'spring-integration-jpa'
- , 'spring-integration-mail'
- , 'spring-integration-mongodb'
- , 'spring-integration-mqtt'
- , 'spring-integration-redis'
- , 'spring-integration-rmi'
- , 'spring-integration-sftp'
- , 'spring-integration-stream'
- , 'spring-integration-syslog'
- , 'spring-integration-twitter'
- , 'spring-integration-ws'
- , 'spring-integration-xml'
- , 'spring-integration-xmpp'].each {
- compile("org.springframework.integration:$it:$springIntegrationVersion", optional)
- }
- compile ("javax.jms:jms-api:$jmsApiVersion", provided)
- compile ("javax.mail:javax.mail-api:$mailVersion", provided)
-
- testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion"
- testCompile "de.flapdoodle.embed:de.flapdoodle.embed.mongo:$embedMongoVersion"
- testCompile "org.apache.ftpserver:ftpserver-core:$ftpServerVersion"
- testCompile "org.apache.sshd:sshd-core:$apacheSshdVersion"
- testCompile "org.springframework.boot:spring-boot-autoconfigure:$springBootVersion"
-
- testRuntime "org.slf4j:slf4j-log4j12:$slf4jVersion"
- testRuntime("org.apache.activemq:activemq-broker:$activeMqVersion")
- testRuntime("org.apache.activemq:activemq-kahadb-store:$activeMqVersion") {
- exclude group: "org.springframework"
- }
- testRuntime "com.sun.mail:javax.mail:$mailVersion"
- testRuntime "com.sun.mail:smtp:$mailVersion"
- testRuntime "com.sun.mail:pop3:$mailVersion"
- testRuntime "com.sun.mail:imap:$mailVersion"
- testRuntime "org.hsqldb:hsqldb:$hsqldbVersion"
-
- jacoco "org.jacoco:org.jacoco.agent:$jacocoVersion:runtime"
-}
-
-// enable all compiler warnings; individual projects may customize further
-[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:all,-options']
-
-test {
- // suppress all console output during testing unless running `gradle -i`
- logging.captureStandardOutput(LogLevel.INFO)
- jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=*"
-}
-
-task sourcesJar(type: Jar) {
- classifier = 'sources'
- from sourceSets.main.allJava
-}
-
-task javadocJar(type: Jar) {
- classifier = 'javadoc'
- from javadoc
-}
-
-artifacts {
- archives sourcesJar
- archives javadocJar
-}
-
-apply plugin: 'sonar-runner'
-
-sonarRunner {
- sonarProperties {
- property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec"
- property "sonar.links.homepage", linkHomepage
- property "sonar.links.ci", linkCi
- property "sonar.links.issue", linkIssue
- property "sonar.links.scm", linkScmUrl
- property "sonar.links.scm_dev", linkScmDevConnection
- property "sonar.java.coveragePlugin", "jacoco"
- }
-}
-
-task api(type: Javadoc) {
- group = 'Documentation'
- description = 'Generates the Javadoc API documentation.'
- title = "${rootProject.description} ${version} API"
- options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
- options.author = true
- options.header = rootProject.description
- options.overview = 'src/api/overview.html'
-
- source = sourceSets.main.allJava
- classpath = project.sourceSets.main.compileClasspath
- destinationDir = new File(buildDir, "api")
-}
-
-task docsZip(type: Zip) {
- group = 'Distribution'
- classifier = 'docs'
- description = "Builds -${classifier} archive containing the api " +
- "for deployment at static.springframework.org/spring-integration/docs."
-
- from(api) {
- into 'api'
- }
-}
-
-task distZip(type: Zip, dependsOn: docsZip) {
- group = 'Distribution'
- classifier = 'dist'
- description = "Builds -${classifier} archive, containing all jars and docs, " +
- "suitable for community download page."
-
- ext.baseDir = "${project.name}-${project.version}";
-
- from('src/dist') {
- include 'license.txt'
- include 'notice.txt'
- into "${baseDir}"
- }
-
- from(zipTree(docsZip.archivePath)) {
- into "${baseDir}/docs"
- }
-
- into("${baseDir}/libs") {
- from project.jar
- from project.sourcesJar
- from project.javadocJar
- }
-}
-
-// Create an optional "with dependencies" distribution.
-// Not published by default; only for use when building from source.
-task depsZip(type: Zip, dependsOn: distZip) { zipTask ->
- group = 'Distribution'
- classifier = 'dist-with-deps'
- description = "Builds -${classifier} archive, containing everything " +
- "in the -${distZip.classifier} archive plus all dependencies."
-
- from zipTree(distZip.archivePath)
-
- gradle.taskGraph.whenReady { taskGraph ->
- if (taskGraph.hasTask(":${zipTask.name}")) {
- def projectName = rootProject.name
- def artifacts = new HashSet()
-
- rootProject.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each { artifact ->
- def dependency = artifact.moduleVersion.id
- if (!projectName.equals(dependency.name)) {
- artifacts << artifact.file
- }
- }
-
- zipTask.from(artifacts) {
- into "${distZip.baseDir}/deps"
- }
- }
- }
-}
-
-artifacts {
- archives distZip
- archives docsZip
-}
-
-task dist(dependsOn: assemble) {
- group = 'Distribution'
- description = 'Builds -dist, -docs and distribution archives.'
-}
-
-task wrapper(type: Wrapper) {
- description = 'Generates gradlew[.bat] scripts'
- gradleVersion = '1.12'
- distributionUrl = "http://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
-}
diff --git a/spring-integration-java-dsl/gradle.properties b/spring-integration-java-dsl/gradle.properties
deleted file mode 100644
index bebfcbc..0000000
--- a/spring-integration-java-dsl/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-version=1.0.0.BUILD-SNAPSHOT
diff --git a/spring-integration-java-dsl/gradle/wrapper/gradle-wrapper.jar b/spring-integration-java-dsl/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 3c7abdf..0000000
Binary files a/spring-integration-java-dsl/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/spring-integration-java-dsl/gradle/wrapper/gradle-wrapper.properties b/spring-integration-java-dsl/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index ba6ee38..0000000
--- a/spring-integration-java-dsl/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Wed Jul 23 18:56:31 EEST 2014
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
diff --git a/spring-integration-java-dsl/gradlew b/spring-integration-java-dsl/gradlew
deleted file mode 100755
index 91a7e26..0000000
--- a/spring-integration-java-dsl/gradlew
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
- echo "$*"
-}
-
-die ( ) {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/spring-integration-java-dsl/gradlew.bat b/spring-integration-java-dsl/gradlew.bat
deleted file mode 100644
index 8a0b282..0000000
--- a/spring-integration-java-dsl/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@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
diff --git a/spring-integration-java-dsl/publish-maven.gradle b/spring-integration-java-dsl/publish-maven.gradle
deleted file mode 100644
index c6c6f35..0000000
--- a/spring-integration-java-dsl/publish-maven.gradle
+++ /dev/null
@@ -1,80 +0,0 @@
-apply plugin: 'maven'
-
-ext.optionalDeps = []
-ext.providedDeps = []
-
-ext.optional = { optionalDeps << it }
-ext.provided = { providedDeps << it }
-
-install {
- repositories.mavenInstaller {
- customizePom(pom, project)
- }
-}
-
-def customizePom(pom, gradleProject) {
- pom.whenConfigured { generatedPom ->
- // respect 'optional' and 'provided' dependencies
- gradleProject.optionalDeps.each { dep ->
- generatedPom.dependencies.find { it.artifactId == dep.name }?.optional = true
- }
- gradleProject.providedDeps.each { dep ->
- generatedPom.dependencies.find { it.artifactId == dep.name }?.scope = 'provided'
- }
-
- // eliminate test-scoped dependencies (no need in maven central poms)
- generatedPom.dependencies.removeAll { dep ->
- dep.scope == 'test'
- }
-
- // add all items necessary for maven central publication
- generatedPom.project {
- name = gradleProject.description
- description = gradleProject.description
- url = linkHomepage
- organization {
- name = 'SpringIO'
- url = 'http://spring.io'
- }
- licenses {
- license {
- name 'The Apache Software License, Version 2.0'
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
- distribution 'repo'
- }
- }
-
- scm {
- url = linkScmUrl
- connection = 'scm:git:' + linkScmConnection
- developerConnection = 'scm:git:' + linkScmDevConnection
- }
-
- issueManagement {
- system = "Jira"
- url = linkIssue
- }
-
- developers {
- developer {
- id = 'markfisher'
- name = 'Mark Fisher'
- email = 'mfisher@pivotal.io'
- roles = ["project founder and lead emeritus"]
- }
- developer {
- id = 'garyrussell'
- name = 'Gary Russell'
- email = 'grussell@pivotal.io'
- roles = ["project lead"]
- }
- developer {
- id = 'abilan'
- name = 'Artem Bilan'
- email = 'abilan@pivotal.io'
- roles = ["project lead"]
- }
- }
- }
- }
-}
diff --git a/spring-integration-java-dsl/src/api/overview.html b/spring-integration-java-dsl/src/api/overview.html
deleted file mode 100644
index fb0198b..0000000
--- a/spring-integration-java-dsl/src/api/overview.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-This document is the API specification for Spring Integration
-
-
-
- For further API reference and developer documentation, see the
- Spring
- Integration reference documentation .
- That documentation contains more detailed, developer-targeted
- descriptions, with conceptual overviews, definitions of terms,
- workarounds, and working code examples.
-
-
-
- If you are interested in commercial training, consultancy, and
- support for Spring Integration, please visit
- http://www.springsource.com
-
-
-
-
diff --git a/spring-integration-java-dsl/src/dist/license.txt b/spring-integration-java-dsl/src/dist/license.txt
deleted file mode 100644
index 261eeb9..0000000
--- a/spring-integration-java-dsl/src/dist/license.txt
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/spring-integration-java-dsl/src/dist/notice.txt b/spring-integration-java-dsl/src/dist/notice.txt
deleted file mode 100644
index f62045a..0000000
--- a/spring-integration-java-dsl/src/dist/notice.txt
+++ /dev/null
@@ -1,21 +0,0 @@
- ========================================================================
- == NOTICE file corresponding to section 4 d of the Apache License, ==
- == Version 2.0, in this case for the Spring Integration distribution. ==
- ========================================================================
-
- This product includes software developed by
- the Apache Software Foundation (http://www.apache.org).
-
- The end-user documentation included with a redistribution, if any,
- must include the following acknowledgement:
-
- "This product includes software developed by the Spring Framework
- Project (http://www.springframework.org)."
-
- Alternatively, this acknowledgement may appear in the software itself,
- if and wherever such third-party acknowledgements normally appear.
-
- The names "Spring", "Spring Framework", and "Spring Integration" must
- not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- enquiries@springsource.com.
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/AbstractRouterSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/AbstractRouterSpec.java
deleted file mode 100644
index 4530924..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/AbstractRouterSpec.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import org.springframework.integration.dsl.core.MessageHandlerSpec;
-import org.springframework.integration.router.AbstractMessageRouter;
-
-/**
- * @author Artem Bilan
- */
-public class AbstractRouterSpec, R extends AbstractMessageRouter>
- extends MessageHandlerSpec {
-
- AbstractRouterSpec(R router) {
- this.target = router;
- }
-
- public S ignoreSendFailures(boolean ignoreSendFailures) {
- this.target.setIgnoreSendFailures(ignoreSendFailures);
- return _this();
- }
-
- public S applySequence(boolean applySequence) {
- this.target.setApplySequence(applySequence);
- return _this();
- }
-
- @Override
- protected R doGet() {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/Adapters.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/Adapters.java
deleted file mode 100644
index c88f9a9..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/Adapters.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.io.File;
-
-import javax.jms.ConnectionFactory;
-
-import org.apache.commons.net.ftp.FTPFile;
-
-import org.springframework.amqp.core.AmqpTemplate;
-import org.springframework.integration.dsl.amqp.Amqp;
-import org.springframework.integration.dsl.amqp.AmqpOutboundEndpointSpec;
-import org.springframework.integration.dsl.file.FileWritingMessageHandlerSpec;
-import org.springframework.integration.dsl.file.Files;
-import org.springframework.integration.dsl.ftp.Ftp;
-import org.springframework.integration.dsl.ftp.FtpMessageHandlerSpec;
-import org.springframework.integration.dsl.ftp.FtpOutboundGatewaySpec;
-import org.springframework.integration.dsl.jms.Jms;
-import org.springframework.integration.dsl.jms.JmsOutboundChannelAdapterSpec;
-import org.springframework.integration.dsl.jms.JmsOutboundGatewaySpec;
-import org.springframework.integration.dsl.mail.Mail;
-import org.springframework.integration.dsl.mail.MailSendingMessageHandlerSpec;
-import org.springframework.integration.dsl.sftp.Sftp;
-import org.springframework.integration.dsl.sftp.SftpMessageHandlerSpec;
-import org.springframework.integration.dsl.sftp.SftpOutboundGatewaySpec;
-import org.springframework.integration.dsl.support.Function;
-import org.springframework.integration.file.remote.RemoteFileTemplate;
-import org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway;
-import org.springframework.integration.file.remote.session.SessionFactory;
-import org.springframework.integration.file.support.FileExistsMode;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.messaging.Message;
-
-import com.jcraft.jsch.ChannelSftp;
-
-/**
- * @author Artem Bilan
- */
-public class Adapters {
-
- public AmqpOutboundEndpointSpec amqp(AmqpTemplate amqpTemplate) {
- return Amqp.outboundAdapter(amqpTemplate);
- }
-
- public AmqpOutboundEndpointSpec amqpGateway(AmqpTemplate amqpTemplate) {
- return Amqp.outboundGateway(amqpTemplate);
- }
-
- public FileWritingMessageHandlerSpec file(File destinationDirectory) {
- return Files.outboundAdapter(destinationDirectory);
- }
-
- public FileWritingMessageHandlerSpec file(String directoryExpression) {
- return Files.outboundAdapter(directoryExpression);
- }
-
- public FileWritingMessageHandlerSpec file(Function, ?> directoryFunction) {
- return Files.outboundAdapter(directoryFunction);
- }
-
- public FileWritingMessageHandlerSpec fileGateway(File destinationDirectory) {
- return Files.outboundGateway(destinationDirectory);
- }
-
- public FileWritingMessageHandlerSpec fileGateway(String directoryExpression) {
- return Files.outboundGateway(directoryExpression);
- }
-
- public FileWritingMessageHandlerSpec fileGateway(Function, ?> directoryFunction) {
- return Files.outboundGateway(directoryFunction);
- }
-
- public FtpMessageHandlerSpec ftp(SessionFactory sessionFactory) {
- return Ftp.outboundAdapter(sessionFactory);
- }
-
- public FtpMessageHandlerSpec ftp(SessionFactory sessionFactory, FileExistsMode fileExistsMode) {
- return Ftp.outboundAdapter(sessionFactory, fileExistsMode);
- }
-
- public FtpMessageHandlerSpec ftp(RemoteFileTemplate remoteFileTemplate) {
- return Ftp.outboundAdapter(remoteFileTemplate);
- }
-
- public FtpMessageHandlerSpec ftp(RemoteFileTemplate remoteFileTemplate, FileExistsMode fileExistsMode) {
- return Ftp.outboundAdapter(remoteFileTemplate, fileExistsMode);
- }
-
- public FtpOutboundGatewaySpec ftpGateway(SessionFactory sessionFactory,
- AbstractRemoteFileOutboundGateway.Command command, String expression) {
- return Ftp.outboundGateway(sessionFactory, command, expression);
- }
-
- public FtpOutboundGatewaySpec ftpGateway(SessionFactory sessionFactory, String command,
- String expression) {
- return Ftp.outboundGateway(sessionFactory, command, expression);
- }
-
- public SftpMessageHandlerSpec ftps(SessionFactory sessionFactory) {
- return Sftp.outboundAdapter(sessionFactory);
- }
-
- public SftpMessageHandlerSpec sftp(SessionFactory sessionFactory,
- FileExistsMode fileExistsMode) {
- return Sftp.outboundAdapter(sessionFactory, fileExistsMode);
- }
-
- public SftpMessageHandlerSpec sftp(RemoteFileTemplate remoteFileTemplate) {
- return Sftp.outboundAdapter(remoteFileTemplate);
- }
-
- public SftpMessageHandlerSpec sftp(RemoteFileTemplate remoteFileTemplate,
- FileExistsMode fileExistsMode) {
- return Sftp.outboundAdapter(remoteFileTemplate, fileExistsMode);
- }
-
- public SftpOutboundGatewaySpec sftpGateway(SessionFactory sessionFactory,
- AbstractRemoteFileOutboundGateway.Command command, String expression) {
- return Sftp.outboundGateway(sessionFactory, command, expression);
- }
-
- public SftpOutboundGatewaySpec sftpGateway(SessionFactory sessionFactory, String command,
- String expression) {
- return Sftp.outboundGateway(sessionFactory, command, expression);
- }
-
- public JmsOutboundChannelAdapterSpec.JmsOutboundChannelSpecTemplateAware jms(ConnectionFactory connectionFactory) {
- return Jms.outboundAdapter(connectionFactory);
- }
-
- public JmsOutboundChannelAdapterSpec extends JmsOutboundChannelAdapterSpec>> jms(JmsTemplate jmsTemplate) {
- return Jms.outboundAdapter(jmsTemplate);
- }
-
- public JmsOutboundGatewaySpec jmsGateway(ConnectionFactory connectionFactory) {
- return Jms.outboundGateway(connectionFactory);
- }
-
- public MailSendingMessageHandlerSpec mail(String host) {
- return Mail.outboundAdapter(host);
- }
-
- Adapters() {
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/AggregatorSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/AggregatorSpec.java
deleted file mode 100644
index d23963d..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/AggregatorSpec.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import org.springframework.integration.aggregator.AggregatingMessageHandler;
-import org.springframework.integration.aggregator.DefaultAggregatingMessageGroupProcessor;
-import org.springframework.integration.aggregator.ExpressionEvaluatingMessageGroupProcessor;
-import org.springframework.integration.aggregator.MessageGroupProcessor;
-import org.springframework.integration.aggregator.MethodInvokingMessageGroupProcessor;
-
-/**
- * @author Artem Bilan
- */
-public class AggregatorSpec extends CorrelationHandlerSpec {
-
- private MessageGroupProcessor outputProcessor = new DefaultAggregatingMessageGroupProcessor();
-
- private boolean expireGroupsUponCompletion;
-
- AggregatorSpec() {
- }
-
- public AggregatorSpec processor(Object target, String methodName) {
- super.processor(target, methodName);
- return this.outputProcessor(methodName != null
- ? new MethodInvokingMessageGroupProcessor(target, methodName)
- : new MethodInvokingMessageGroupProcessor(target));
- }
-
- public AggregatorSpec outputExpression(String expression) {
- return this.outputProcessor(new ExpressionEvaluatingMessageGroupProcessor(expression));
- }
-
- public AggregatorSpec outputProcessor(MessageGroupProcessor outputProcessor) {
- this.outputProcessor = outputProcessor;
- return _this();
- }
-
- public AggregatorSpec expireGroupsUponCompletion(boolean expireGroupsUponCompletion) {
- this.expireGroupsUponCompletion = expireGroupsUponCompletion;
- return _this();
- }
-
- @Override
- protected AggregatingMessageHandler doGet() {
- AggregatingMessageHandler handler = new AggregatingMessageHandler(this.outputProcessor);
- handler.setExpireGroupsUponCompletion(this.expireGroupsUponCompletion);
- return this.configure(handler);
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/Channels.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/Channels.java
deleted file mode 100644
index a5c1f25..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/Channels.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.util.Queue;
-import java.util.concurrent.Executor;
-
-import org.springframework.amqp.rabbit.connection.ConnectionFactory;
-import org.springframework.integration.dsl.amqp.Amqp;
-import org.springframework.integration.dsl.amqp.AmqpMessageChannelSpec;
-import org.springframework.integration.dsl.amqp.AmqpPollableMessageChannelSpec;
-import org.springframework.integration.dsl.amqp.AmqpPublishSubscribeMessageChannelSpec;
-import org.springframework.integration.dsl.channel.DirectChannelSpec;
-import org.springframework.integration.dsl.channel.ExecutorChannelSpec;
-import org.springframework.integration.dsl.channel.MessageChannels;
-import org.springframework.integration.dsl.channel.PriorityChannelSpec;
-import org.springframework.integration.dsl.channel.PublishSubscribeChannelSpec;
-import org.springframework.integration.dsl.channel.QueueChannelSpec;
-import org.springframework.integration.dsl.channel.RendezvousChannelSpec;
-import org.springframework.integration.dsl.jms.Jms;
-import org.springframework.integration.dsl.jms.JmsMessageChannelSpec;
-import org.springframework.integration.dsl.jms.JmsPollableMessageChannelSpec;
-import org.springframework.integration.dsl.jms.JmsPublishSubscribeMessageChannelSpec;
-import org.springframework.integration.store.ChannelMessageStore;
-import org.springframework.integration.store.PriorityCapableChannelMessageStore;
-import org.springframework.messaging.Message;
-
-/**
- * @author Artem Bilan
- */
-public class Channels {
-
- public DirectChannelSpec direct() {
- return MessageChannels.direct();
- }
-
- public DirectChannelSpec direct(String id) {
- return MessageChannels.direct(id);
- }
-
- public QueueChannelSpec queue() {
- return MessageChannels.queue();
- }
-
- public QueueChannelSpec queue(String id) {
- return MessageChannels.queue(id);
- }
-
- public QueueChannelSpec queue(Integer capacity) {
- return MessageChannels.queue(capacity);
- }
-
- public QueueChannelSpec queue(String id, Integer capacity) {
- return MessageChannels.queue(id, capacity);
- }
-
- public QueueChannelSpec queue(Queue> queue) {
- return MessageChannels.queue(queue);
- }
-
- public QueueChannelSpec queue(String id, Queue> queue) {
- return MessageChannels.queue(id, queue);
- }
-
- public QueueChannelSpec.MessageStoreSpec queue(ChannelMessageStore messageGroupStore, Object groupId) {
- return MessageChannels.queue(messageGroupStore, groupId);
- }
-
- public QueueChannelSpec.MessageStoreSpec queue(String id, ChannelMessageStore messageGroupStore, Object groupId) {
- return MessageChannels.queue(id, messageGroupStore, groupId);
- }
-
- public PriorityChannelSpec priority() {
- return MessageChannels.priority();
- }
-
- public PriorityChannelSpec priority(String id) {
- return MessageChannels.priority(id);
- }
-
- public QueueChannelSpec.MessageStoreSpec priority(String id, PriorityCapableChannelMessageStore messageGroupStore,
- Object groupId) {
- return MessageChannels.priority(id, messageGroupStore, groupId);
- }
-
- public QueueChannelSpec.MessageStoreSpec priority(PriorityCapableChannelMessageStore messageGroupStore,
- Object groupId) {
- return MessageChannels.priority(messageGroupStore, groupId);
- }
-
- public RendezvousChannelSpec rendezvous() {
- return MessageChannels.rendezvous();
- }
-
- public RendezvousChannelSpec rendezvous(String id) {
- return MessageChannels.rendezvous(id);
- }
-
- public PublishSubscribeChannelSpec extends PublishSubscribeChannelSpec>> publishSubscribe() {
- return MessageChannels.publishSubscribe();
- }
-
- public PublishSubscribeChannelSpec extends PublishSubscribeChannelSpec>> publishSubscribe(Executor executor) {
- return MessageChannels.publishSubscribe(executor);
- }
-
- public PublishSubscribeChannelSpec extends PublishSubscribeChannelSpec>> publishSubscribe(String id,
- Executor executor) {
- return MessageChannels.publishSubscribe(id, executor);
- }
-
- public PublishSubscribeChannelSpec extends PublishSubscribeChannelSpec>> publishSubscribe(String id) {
- return MessageChannels.publishSubscribe(id);
- }
-
- public ExecutorChannelSpec executor(Executor executor) {
- return MessageChannels.executor(executor);
- }
-
- public ExecutorChannelSpec executor(String id, Executor executor) {
- return MessageChannels.executor(id, executor);
- }
-
- public AmqpPollableMessageChannelSpec extends AmqpPollableMessageChannelSpec>> amqpPollable(
- ConnectionFactory connectionFactory) {
- return Amqp.pollableChannel(connectionFactory);
- }
-
- public AmqpPollableMessageChannelSpec extends AmqpPollableMessageChannelSpec>> amqpPollable(String id,
- ConnectionFactory connectionFactory) {
- return Amqp.pollableChannel(id, connectionFactory);
- }
-
- public AmqpMessageChannelSpec extends AmqpMessageChannelSpec>> amqp(ConnectionFactory connectionFactory) {
- return Amqp.channel(connectionFactory);
- }
-
- public AmqpMessageChannelSpec extends AmqpMessageChannelSpec>> amqp(String id,
- ConnectionFactory connectionFactory) {
- return Amqp.channel(id, connectionFactory);
- }
-
- public static AmqpPublishSubscribeMessageChannelSpec amqpPublishSubscribe(ConnectionFactory connectionFactory) {
- return Amqp.publishSubscribeChannel(connectionFactory);
- }
-
- public static AmqpPublishSubscribeMessageChannelSpec amqpPublishSubscribe(String id,
- ConnectionFactory connectionFactory) {
- return Amqp.publishSubscribeChannel(id, connectionFactory);
- }
-
- public JmsPollableMessageChannelSpec extends JmsPollableMessageChannelSpec>> jmsPollable(
- javax.jms.ConnectionFactory connectionFactory) {
- return Jms.pollableChannel(connectionFactory);
- }
-
- public JmsPollableMessageChannelSpec extends JmsPollableMessageChannelSpec>> jmsPollable(String id,
- javax.jms.ConnectionFactory connectionFactory) {
- return Jms.pollableChannel(id, connectionFactory);
- }
-
- public JmsMessageChannelSpec extends JmsMessageChannelSpec>> jms(
- javax.jms.ConnectionFactory connectionFactory) {
- return Jms.channel(connectionFactory);
- }
-
- public JmsMessageChannelSpec extends JmsMessageChannelSpec>> jms(String id,
- javax.jms.ConnectionFactory connectionFactory) {
- return Jms.channel(id, connectionFactory);
- }
-
- public JmsPublishSubscribeMessageChannelSpec jmsPublishSubscribe(javax.jms.ConnectionFactory connectionFactory) {
- return Jms.publishSubscribeChannel(connectionFactory);
- }
-
- public JmsPublishSubscribeMessageChannelSpec jmsPublishSubscribe(String id,
- javax.jms.ConnectionFactory connectionFactory) {
- return Jms.publishSubscribeChannel(id, connectionFactory);
- }
-
- Channels() {
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/CorrelationHandlerSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/CorrelationHandlerSpec.java
deleted file mode 100644
index 065a0a7..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/CorrelationHandlerSpec.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import org.springframework.expression.Expression;
-import org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler;
-import org.springframework.integration.aggregator.CorrelationStrategy;
-import org.springframework.integration.aggregator.ExpressionEvaluatingCorrelationStrategy;
-import org.springframework.integration.aggregator.ExpressionEvaluatingReleaseStrategy;
-import org.springframework.integration.aggregator.ReleaseStrategy;
-import org.springframework.integration.config.CorrelationStrategyFactoryBean;
-import org.springframework.integration.config.ReleaseStrategyFactoryBean;
-import org.springframework.integration.dsl.core.MessageHandlerSpec;
-import org.springframework.integration.dsl.support.Function;
-import org.springframework.integration.dsl.support.FunctionExpression;
-import org.springframework.integration.expression.ValueExpression;
-import org.springframework.integration.store.MessageGroup;
-import org.springframework.integration.store.MessageGroupStore;
-import org.springframework.messaging.MessageChannel;
-import org.springframework.scheduling.TaskScheduler;
-import org.springframework.util.StringUtils;
-
-/**
- * @author Artem Bilan
- */
-public abstract class
- CorrelationHandlerSpec, H extends AbstractCorrelatingMessageHandler>
- extends MessageHandlerSpec {
-
- protected MessageGroupStore messageStore;
-
- protected boolean sendPartialResultOnExpiry;
-
- private long minimumTimeoutForEmptyGroups;
-
- private Expression groupTimeoutExpression;
-
- private TaskScheduler taskScheduler;
-
- private MessageChannel discardChannel;
-
- private String discardChannelName;
-
- private CorrelationStrategy correlationStrategy;
-
- private ReleaseStrategy releaseStrategy;
-
- public S messageStore(MessageGroupStore messageStore) {
- this.messageStore = messageStore;
- return _this();
- }
-
- public S sendPartialResultOnExpiry(boolean sendPartialResultOnExpiry) {
- this.sendPartialResultOnExpiry = sendPartialResultOnExpiry;
- return _this();
- }
-
- public S minimumTimeoutForEmptyGroups(long minimumTimeoutForEmptyGroups) {
- this.minimumTimeoutForEmptyGroups = minimumTimeoutForEmptyGroups;
- return _this();
- }
-
- public S groupTimeout(long groupTimeout) {
- this.groupTimeoutExpression = new ValueExpression(groupTimeout);
- return _this();
- }
-
- public S groupTimeoutExpression(String groupTimeoutExpression) {
- this.groupTimeoutExpression = PARSER.parseExpression(groupTimeoutExpression);
- return _this();
- }
-
- public S groupTimeout(Function groupTimeoutFunction) {
- this.groupTimeoutExpression = new FunctionExpression(groupTimeoutFunction);
- return _this();
- }
-
- public S taskScheduler(TaskScheduler taskScheduler) {
- this.taskScheduler = taskScheduler;
- return _this();
- }
-
- public S discardChannel(MessageChannel discardChannel) {
- this.discardChannel = discardChannel;
- return _this();
- }
-
- public S discardChannel(String discardChannelName) {
- this.discardChannelName = discardChannelName;
- return _this();
- }
-
- public S processor(Object target, String methodName) {
- try {
- return correlationStrategy(new CorrelationStrategyFactoryBean(target, methodName).getObject())
- .releaseStrategy(new ReleaseStrategyFactoryBean(target, methodName).getObject());
- }
- catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
-
- public S correlationExpression(String correlationExpression) {
- return correlationStrategy(new ExpressionEvaluatingCorrelationStrategy(correlationExpression));
- }
-
- public S correlationStrategy(Object target, String methodName) {
- try {
- return correlationStrategy(new CorrelationStrategyFactoryBean(target, methodName).getObject());
- }
- catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
-
- public S correlationStrategy(CorrelationStrategy correlationStrategy) {
- this.correlationStrategy = correlationStrategy;
- return _this();
- }
-
- public S releaseExpression(String releaseExpression) {
- return releaseStrategy(new ExpressionEvaluatingReleaseStrategy(releaseExpression));
- }
-
- public S releaseStrategy(Object target, String methodName) {
- try {
- return releaseStrategy(new ReleaseStrategyFactoryBean(target, methodName).getObject());
- }
- catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
-
- public S releaseStrategy(ReleaseStrategy releaseStrategy) {
- this.releaseStrategy = releaseStrategy;
- return _this();
- }
-
- protected H configure(H handler) {
- if (this.discardChannel != null) {
- handler.setDiscardChannel(this.discardChannel);
- }
- if (StringUtils.hasText(this.discardChannelName)) {
- handler.setDiscardChannelName(this.discardChannelName);
- }
- if (this.messageStore != null) {
- handler.setMessageStore(this.messageStore);
- }
- handler.setMinimumTimeoutForEmptyGroups(this.minimumTimeoutForEmptyGroups);
- handler.setGroupTimeoutExpression(this.groupTimeoutExpression);
- if (this.taskScheduler != null) {
- handler.setTaskScheduler(this.taskScheduler);
- }
- handler.setSendPartialResultOnExpiry(this.sendPartialResultOnExpiry);
- if (this.correlationStrategy != null) {
- handler.setCorrelationStrategy(this.correlationStrategy);
- }
- if (this.releaseStrategy != null) {
- handler.setReleaseStrategy(this.releaseStrategy);
- }
- return handler;
- }
-
- CorrelationHandlerSpec() {
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/DelayerEndpointSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/DelayerEndpointSpec.java
deleted file mode 100644
index 4eef421..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/DelayerEndpointSpec.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.aopalliance.aop.Advice;
-
-import org.springframework.integration.dsl.core.ConsumerEndpointSpec;
-import org.springframework.integration.handler.DelayHandler;
-import org.springframework.integration.store.MessageGroupStore;
-
-/**
- * @author Artem Bilan
- */
-public final class DelayerEndpointSpec extends ConsumerEndpointSpec {
-
- private final List delayedAdvice = new LinkedList();
-
- DelayerEndpointSpec(DelayHandler delayHandler) {
- super(delayHandler);
- this.target.getT2().setDelayedAdviceChain(this.delayedAdvice);
- }
-
- public DelayerEndpointSpec defaultDelay(long defaultDelay) {
- this.target.getT2().setDefaultDelay(defaultDelay);
- return _this();
- }
-
-
- public DelayerEndpointSpec ignoreExpressionFailures(boolean ignoreExpressionFailures) {
- this.target.getT2().setIgnoreExpressionFailures(ignoreExpressionFailures);
- return _this();
- }
-
- public DelayerEndpointSpec messageStore(MessageGroupStore messageStore) {
- this.target.getT2().setMessageStore(messageStore);
- return _this();
- }
-
- public DelayerEndpointSpec delayedAdvice(Advice... advice) {
- this.delayedAdvice.addAll(Arrays.asList(advice));
- return _this();
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/DslRecipientListRouter.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/DslRecipientListRouter.java
deleted file mode 100644
index de77e15..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/DslRecipientListRouter.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.beans.BeansException;
-import org.springframework.integration.core.MessageSelector;
-import org.springframework.integration.dsl.support.MessageChannelReference;
-import org.springframework.integration.filter.ExpressionEvaluatingSelector;
-import org.springframework.integration.router.RecipientListRouter;
-import org.springframework.messaging.MessageChannel;
-import org.springframework.messaging.core.DestinationResolutionException;
-import org.springframework.util.StringUtils;
-
-/**
- * @author Artem Bilan
- */
-class DslRecipientListRouter extends RecipientListRouter {
-
- private final Map expressionRecipientMap = new HashMap();
-
- private final Map selectorRecipientMap = new HashMap();
-
- private final Map channelExpressionRecipientMap = new HashMap();
-
- private final Map channelSelectorRecipientMap =
- new HashMap();
-
- void add(String channelName, String expression) {
- this.expressionRecipientMap.put(channelName, expression);
- }
-
- void add(String channelName, MessageSelector selector) {
- this.selectorRecipientMap.put(channelName, selector);
- }
-
- void add(MessageChannel channel, String expression) {
- this.channelExpressionRecipientMap.put(channel, expression);
- }
-
- void add(MessageChannel channel, MessageSelector selector) {
- this.channelSelectorRecipientMap.put(channel, selector);
- }
-
- @Override
- public void onInit() throws Exception {
- for (Map.Entry recipient : this.expressionRecipientMap.entrySet()) {
- ExpressionEvaluatingSelector selector = null;
- String expression = recipient.getValue();
- if (StringUtils.hasText(expression)) {
- selector = new ExpressionEvaluatingSelector(expression);
- selector.setBeanFactory(this.getBeanFactory());
- }
- this.selectorRecipientMap.put(recipient.getKey(), selector);
- }
-
- for (Map.Entry recipient : this.channelExpressionRecipientMap.entrySet()) {
- ExpressionEvaluatingSelector selector = null;
- String expression = recipient.getValue();
- if (StringUtils.hasText(expression)) {
- selector = new ExpressionEvaluatingSelector(expression);
- selector.setBeanFactory(this.getBeanFactory());
- }
- this.channelSelectorRecipientMap.put(recipient.getKey(), selector);
- }
-
- List recipients = new ArrayList(this.selectorRecipientMap.size()
- + this.channelSelectorRecipientMap.size());
-
- for (Map.Entry entry : selectorRecipientMap.entrySet()) {
- recipients.add(new DslRecipient(new MessageChannelReference(entry.getKey()), entry.getValue()));
- }
-
- for (Map.Entry entry : channelSelectorRecipientMap.entrySet()) {
- recipients.add(new Recipient(entry.getKey(), entry.getValue()));
- }
-
- setRecipients(recipients);
- super.onInit();
- }
-
-
- class DslRecipient extends Recipient {
-
- private volatile MessageChannel channel;
-
- DslRecipient(MessageChannelReference channel, MessageSelector selector) {
- super(channel, selector);
- }
-
- @Override
- public MessageChannel getChannel() {
- if (this.channel == null) {
- synchronized (this) {
- if (this.channel == null) {
- this.channel = resolveChannelName((MessageChannelReference) super.getChannel());
- }
- }
- }
- return this.channel;
- }
-
- private MessageChannel resolveChannelName(MessageChannelReference channelReference) {
- String channelName = channelReference.getName();
- try {
- return DslRecipientListRouter.this.getBeanFactory().getBean(channelName, MessageChannel.class);
- }
- catch (BeansException e) {
- throw new DestinationResolutionException("Failed to look up MessageChannel with name '"
- + channelName + "' in the BeanFactory.");
- }
- }
-
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/EnricherSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/EnricherSpec.java
deleted file mode 100644
index ce0a622..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/EnricherSpec.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.springframework.expression.Expression;
-import org.springframework.integration.dsl.core.MessageHandlerSpec;
-import org.springframework.integration.dsl.support.Function;
-import org.springframework.integration.dsl.support.FunctionExpression;
-import org.springframework.integration.expression.ValueExpression;
-import org.springframework.integration.transformer.ContentEnricher;
-import org.springframework.integration.transformer.support.AbstractHeaderValueMessageProcessor;
-import org.springframework.integration.transformer.support.ExpressionEvaluatingHeaderValueMessageProcessor;
-import org.springframework.integration.transformer.support.HeaderValueMessageProcessor;
-import org.springframework.integration.transformer.support.StaticHeaderValueMessageProcessor;
-import org.springframework.messaging.Message;
-import org.springframework.messaging.MessageChannel;
-import org.springframework.util.Assert;
-
-/**
- * @author Artem Bilan
- * @author Tim Ysewyn
- */
-public class EnricherSpec extends MessageHandlerSpec {
-
- private final ContentEnricher enricher = new ContentEnricher();
-
- private final Map propertyExpressions = new HashMap();
-
- private final Map> headerExpressions =
- new HashMap>();
-
- EnricherSpec() {
- }
-
- public EnricherSpec requestChannel(MessageChannel requestChannel) {
- this.enricher.setRequestChannel(requestChannel);
- return _this();
- }
-
- public EnricherSpec requestChannel(String requestChannel) {
- this.enricher.setRequestChannelName(requestChannel);
- return _this();
- }
-
- public EnricherSpec replyChannel(MessageChannel replyChannel) {
- this.enricher.setReplyChannel(replyChannel);
- return _this();
- }
-
- public EnricherSpec replyChannel(String replyChannel) {
- this.enricher.setReplyChannelName(replyChannel);
- return _this();
- }
-
- public EnricherSpec requestTimeout(Long requestTimeout) {
- this.enricher.setRequestTimeout(requestTimeout);
- return _this();
- }
-
- public EnricherSpec replyTimeout(Long replyTimeout) {
- this.enricher.setReplyTimeout(replyTimeout);
- return _this();
- }
-
- public EnricherSpec requestPayloadExpression(String requestPayloadExpression) {
- this.enricher.setRequestPayloadExpression(PARSER.parseExpression(requestPayloadExpression));
- return _this();
- }
-
- public EnricherSpec requestPayload(Function, ?> requestPayloadFunction) {
- this.enricher.setRequestPayloadExpression(new FunctionExpression>(requestPayloadFunction));
- return _this();
- }
-
- public EnricherSpec shouldClonePayload(boolean shouldClonePayload) {
- this.enricher.setShouldClonePayload(shouldClonePayload);
- return _this();
- }
-
- public EnricherSpec property(String key, V value) {
- this.propertyExpressions.put(key, new ValueExpression(value));
- return _this();
- }
-
- public EnricherSpec propertyExpression(String key, String expression) {
- Assert.notNull(key);
- this.propertyExpressions.put(key, PARSER.parseExpression(expression));
- return _this();
- }
-
- public EnricherSpec propertyFunction(String key, Function, Object> function) {
- Assert.notNull(key);
- this.propertyExpressions.put(key, new FunctionExpression>(function));
- return _this();
- }
-
- public EnricherSpec header(String name, V value) {
- return this.header(name, value, null);
- }
-
- public EnricherSpec header(String name, V value, Boolean overwrite) {
- AbstractHeaderValueMessageProcessor headerValueMessageProcessor =
- new StaticHeaderValueMessageProcessor(value);
- headerValueMessageProcessor.setOverwrite(overwrite);
- return header(name, headerValueMessageProcessor);
- }
-
- public EnricherSpec headerExpression(String name, String expression) {
- return headerExpression(name, expression, null);
- }
-
- public EnricherSpec headerExpression(String name, String expression, Boolean overwrite) {
- Assert.hasText(expression);
- return headerExpression(name, PARSER.parseExpression(expression), overwrite);
- }
-
- public EnricherSpec headerFunction(String name, Function, Object> function) {
- return headerFunction(name, function, null);
- }
-
- public EnricherSpec headerFunction(String name, Function, Object> function, Boolean overwrite) {
- Assert.notNull(function);
- return headerExpression(name, new FunctionExpression>(function), overwrite);
- }
-
- private EnricherSpec headerExpression(String name, Expression expression, Boolean overwrite) {
- AbstractHeaderValueMessageProcessor> headerValueMessageProcessor =
- new ExpressionEvaluatingHeaderValueMessageProcessor(expression, null);
- headerValueMessageProcessor.setOverwrite(overwrite);
- return header(name, headerValueMessageProcessor);
- }
-
- public EnricherSpec header(String name, HeaderValueMessageProcessor headerValueMessageProcessor) {
- Assert.hasText(name);
- this.headerExpressions.put(name, headerValueMessageProcessor);
- return _this();
- }
-
- @Override
- protected ContentEnricher doGet() {
- if(!this.propertyExpressions.isEmpty()) {
- this.enricher.setPropertyExpressions(this.propertyExpressions);
- }
- if(!this.headerExpressions.isEmpty()) {
- this.enricher.setHeaderExpressions(this.headerExpressions);
- }
- return this.enricher;
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/FilterEndpointSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/FilterEndpointSpec.java
deleted file mode 100644
index 7ed1d1f..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/FilterEndpointSpec.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.springframework.integration.channel.DirectChannel;
-import org.springframework.integration.dsl.core.ComponentsRegistration;
-import org.springframework.integration.dsl.core.ConsumerEndpointSpec;
-import org.springframework.integration.filter.MessageFilter;
-import org.springframework.messaging.MessageChannel;
-import org.springframework.util.Assert;
-
-/**
- * @author Artem Bilan
- */
-public final class FilterEndpointSpec extends ConsumerEndpointSpec
- implements ComponentsRegistration {
-
- private IntegrationFlow discardFlow;
-
- FilterEndpointSpec(MessageFilter messageFilter) {
- super(messageFilter);
- }
-
- public FilterEndpointSpec throwExceptionOnRejection(boolean throwExceptionOnRejection) {
- this.target.getT2().setThrowExceptionOnRejection(throwExceptionOnRejection);
- return _this();
- }
-
- public FilterEndpointSpec discardChannel(MessageChannel discardChannel) {
- this.target.getT2().setDiscardChannel(discardChannel);
- return _this();
- }
-
- public FilterEndpointSpec discardChannel(String discardChannelName) {
- this.target.getT2().setDiscardChannelName(discardChannelName);
- return _this();
- }
-
- public FilterEndpointSpec discardFlow(IntegrationFlow discardFlow) {
- Assert.notNull(discardFlow);
- DirectChannel channel = new DirectChannel();
- IntegrationFlowBuilder flowBuilder = IntegrationFlows.from(channel);
- discardFlow.accept(flowBuilder);
- this.discardFlow = flowBuilder.get();
- return discardChannel(channel);
- }
-
- public FilterEndpointSpec discardWithinAdvice(boolean discardWithinAdvice) {
- this.target.getT2().setDiscardWithinAdvice(discardWithinAdvice);
- return _this();
- }
-
- @Override
- public Collection getComponentsToRegister() {
- if (this.discardFlow != null) {
- return Collections.singletonList(this.discardFlow);
- }
- return null;
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/GatewayEndpointSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/GatewayEndpointSpec.java
deleted file mode 100644
index 7c3a149..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/GatewayEndpointSpec.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import org.springframework.integration.dsl.core.ConsumerEndpointSpec;
-import org.springframework.messaging.MessageChannel;
-
-/**
- * @author Artem Bilan
- */
-public final class GatewayEndpointSpec extends ConsumerEndpointSpec {
-
- GatewayEndpointSpec(MessageChannel requestChannel) {
- super(new GatewayMessageHandler());
- this.target.getT2().setRequestChannel(requestChannel);
- }
-
- GatewayEndpointSpec(String requestChannel) {
- super(new GatewayMessageHandler());
- this.target.getT2().setRequestChannelName(requestChannel);
- }
-
- public GatewayEndpointSpec replyChannel(MessageChannel replyChannel) {
- this.target.getT2().setReplyChannel(replyChannel);
- return this;
- }
-
- public GatewayEndpointSpec replyChannel(String replyChannel) {
- this.target.getT2().setReplyChannelName(replyChannel);
- return this;
- }
-
- public GatewayEndpointSpec errorChannel(MessageChannel errorChannel) {
- this.target.getT2().setErrorChannel(errorChannel);
- return this;
- }
-
- public GatewayEndpointSpec errorChannel(String errorChannel) {
- this.target.getT2().setErrorChannelName(errorChannel);
- return this;
- }
-
- public GatewayEndpointSpec requestTimeout(Long requestTimeout) {
- this.target.getT2().setRequestTimeout(requestTimeout);
- return this;
- }
-
- public GatewayEndpointSpec replyTimeout(Long replyTimeout) {
- this.target.getT2().setReplyTimeout(replyTimeout);
- return this;
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/GatewayMessageHandler.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/GatewayMessageHandler.java
deleted file mode 100644
index 06e5852..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/GatewayMessageHandler.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import org.springframework.beans.factory.BeanCreationException;
-import org.springframework.beans.factory.BeanFactory;
-import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
-import org.springframework.integration.gateway.GatewayProxyFactoryBean;
-import org.springframework.integration.gateway.RequestReplyExchanger;
-import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
-import org.springframework.messaging.Message;
-import org.springframework.messaging.MessageChannel;
-import org.springframework.util.StringUtils;
-
-/**
- * @author Artem Bilan
- */
-class GatewayMessageHandler extends AbstractReplyProducingMessageHandler {
-
- private final GatewayProxyFactoryBean gatewayProxyFactoryBean;
-
- private RequestReplyExchanger exchanger;
-
- private String requestChannel;
-
- private String replyChannel;
-
- private String errorChannel;
-
- GatewayMessageHandler() {
- this.gatewayProxyFactoryBean = new GatewayProxyFactoryBean();
- this.gatewayProxyFactoryBean.setServiceInterface(RequestReplyExchanger.class);
- }
-
- void setRequestChannel(MessageChannel requestChannel) {
- this.gatewayProxyFactoryBean.setDefaultRequestChannel(requestChannel);
- }
-
- void setRequestChannelName(String requestChannel) {
- this.requestChannel = requestChannel;
- }
-
- public void setReplyChannel(MessageChannel replyChannel) {
- this.gatewayProxyFactoryBean.setDefaultReplyChannel(replyChannel);
- }
-
- public void setReplyChannelName(String replyChannel) {
- this.replyChannel = replyChannel;
- }
-
- public void setErrorChannel(MessageChannel errorChannel) {
- this.gatewayProxyFactoryBean.setErrorChannel(errorChannel);
- }
-
- public void setErrorChannelName(String errorChannel) {
- this.errorChannel = errorChannel;
- }
-
- public void setRequestTimeout(Long requestTimeout) {
- this.gatewayProxyFactoryBean.setDefaultRequestTimeout(requestTimeout);
- }
-
- public void setReplyTimeout(Long replyTimeout) {
- this.gatewayProxyFactoryBean.setDefaultReplyTimeout(replyTimeout);
- }
-
- @Override
- protected Object handleRequestMessage(Message> requestMessage) {
- if (this.exchanger == null) {
- synchronized (this) {
- if (this.exchanger == null) {
- initialize();
- }
- }
- }
- return this.exchanger.exchange(requestMessage);
- }
-
- private void initialize() {
- BeanFactory beanFactory = getBeanFactory();
-
- if (StringUtils.hasText(this.requestChannel)) {
- this.gatewayProxyFactoryBean.setDefaultRequestChannel(beanFactory.getBean(this.requestChannel,
- MessageChannel.class));
- }
-
- if (StringUtils.hasText(this.replyChannel)) {
- this.gatewayProxyFactoryBean.setDefaultReplyChannel(beanFactory.getBean(this.replyChannel,
- MessageChannel.class));
- }
-
- if (StringUtils.hasText(this.errorChannel)) {
- this.gatewayProxyFactoryBean.setErrorChannel(beanFactory.getBean(this.errorChannel,
- MessageChannel.class));
- }
-
- if (beanFactory instanceof ConfigurableListableBeanFactory) {
- ((ConfigurableListableBeanFactory) beanFactory).initializeBean(this.gatewayProxyFactoryBean, null);
- }
- try {
- this.exchanger = (RequestReplyExchanger) this.gatewayProxyFactoryBean.getObject();
- }
- catch (Exception e) {
- throw new BeanCreationException("Can't instantiate the GatewayProxyFactoryBean: " + this, e);
- }
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/GenericEndpointSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/GenericEndpointSpec.java
deleted file mode 100644
index ec6b388..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/GenericEndpointSpec.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import org.springframework.integration.dsl.core.ConsumerEndpointSpec;
-import org.springframework.messaging.MessageHandler;
-
-/**
- * @author Artem Bilan
- */
-public final class GenericEndpointSpec
- extends ConsumerEndpointSpec, H> {
-
- GenericEndpointSpec(H messageHandler) {
- super(messageHandler);
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/HeaderEnricherSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/HeaderEnricherSpec.java
deleted file mode 100644
index 08a0d71..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/HeaderEnricherSpec.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.springframework.expression.Expression;
-import org.springframework.integration.context.IntegrationContextUtils;
-import org.springframework.integration.dsl.core.IntegrationComponentSpec;
-import org.springframework.integration.dsl.support.BeanNameMessageProcessor;
-import org.springframework.integration.dsl.support.Consumer;
-import org.springframework.integration.dsl.support.Function;
-import org.springframework.integration.dsl.support.FunctionExpression;
-import org.springframework.integration.dsl.support.MapBuilder;
-import org.springframework.integration.dsl.support.StringStringMapBuilder;
-import org.springframework.integration.handler.ExpressionEvaluatingMessageProcessor;
-import org.springframework.integration.handler.MessageProcessor;
-import org.springframework.integration.transformer.HeaderEnricher;
-import org.springframework.integration.transformer.support.AbstractHeaderValueMessageProcessor;
-import org.springframework.integration.transformer.support.ExpressionEvaluatingHeaderValueMessageProcessor;
-import org.springframework.integration.transformer.support.HeaderValueMessageProcessor;
-import org.springframework.integration.transformer.support.StaticHeaderValueMessageProcessor;
-import org.springframework.messaging.Message;
-import org.springframework.util.Assert;
-
-/**
- * @author Artem Bilan
- * @author Gary Russell
- */
-public class HeaderEnricherSpec extends IntegrationComponentSpec {
-
- private final Map> headerToAdd = new HashMap>();
-
- private final HeaderEnricher headerEnricher = new HeaderEnricher(headerToAdd);
-
- HeaderEnricherSpec() {
- }
-
- public HeaderEnricherSpec defaultOverwrite(boolean defaultOverwrite) {
- this.headerEnricher.setDefaultOverwrite(defaultOverwrite);
- return _this();
- }
-
- public HeaderEnricherSpec shouldSkipNulls(boolean shouldSkipNulls) {
- this.headerEnricher.setShouldSkipNulls(shouldSkipNulls);
- return _this();
- }
-
- public HeaderEnricherSpec messageProcessor(MessageProcessor> messageProcessor) {
- this.headerEnricher.setMessageProcessor(messageProcessor);
- return _this();
- }
-
- public HeaderEnricherSpec messageProcessor(String expression) {
- return messageProcessor(new ExpressionEvaluatingMessageProcessor(PARSER.parseExpression(expression)));
- }
-
- public HeaderEnricherSpec messageProcessor(String beanName, String methodName) {
- return messageProcessor(new BeanNameMessageProcessor(beanName, methodName));
- }
-
- public HeaderEnricherSpec headers(MapBuilder, String, Object> headers) {
- return headers(headers.get());
- }
-
- public HeaderEnricherSpec headers(Map headers) {
- Assert.notNull(headers);
- for (Entry entry : headers.entrySet()) {
- String name = entry.getKey();
- Object value = entry.getValue();
- if (value instanceof Expression) {
- header(name, new ExpressionEvaluatingHeaderValueMessageProcessor((Expression) value, null));
- }
- else {
- header(name, value);
- }
- }
- return this;
- }
-
- public HeaderEnricherSpec headerExpressions(MapBuilder, String, String> headers) {
- Assert.notNull(headers);
- return headerExpressions(headers.get());
- }
-
- public HeaderEnricherSpec headerExpressions(Consumer configurer) {
- Assert.notNull(configurer);
- StringStringMapBuilder builder = new StringStringMapBuilder();
- configurer.accept(builder);
- return headerExpressions(builder.get());
- }
-
- public HeaderEnricherSpec headerExpressions(Map headers) {
- Assert.notNull(headers);
- for (Entry entry : headers.entrySet()) {
- header(entry.getKey(), new ExpressionEvaluatingHeaderValueMessageProcessor(entry.getValue(), null));
- }
- return this;
- }
-
- public HeaderEnricherSpec header(String name, V value) {
- return header(name, value, null);
- }
-
- public HeaderEnricherSpec header(String name, V value, Boolean overwrite) {
- AbstractHeaderValueMessageProcessor headerValueMessageProcessor =
- new StaticHeaderValueMessageProcessor(value);
- headerValueMessageProcessor.setOverwrite(overwrite);
- return header(name, headerValueMessageProcessor);
- }
-
- public HeaderEnricherSpec headerExpression(String name, String expression) {
- return headerExpression(name, expression, null);
- }
-
- public HeaderEnricherSpec headerExpression(String name, String expression, Boolean overwrite) {
- Assert.hasText(expression);
- return headerExpression(name, PARSER.parseExpression(expression), overwrite);
- }
-
- public HeaderEnricherSpec headerFunction(String name, Function, Object> function) {
- return headerFunction(name, function, null);
- }
-
- public HeaderEnricherSpec headerFunction(String name, Function, Object> function,
- Boolean overwrite) {
- Assert.notNull(function);
- return headerExpression(name, new FunctionExpression>(function), overwrite);
- }
-
- private HeaderEnricherSpec headerExpression(String name, Expression expression, Boolean overwrite) {
- AbstractHeaderValueMessageProcessor> headerValueMessageProcessor =
- new ExpressionEvaluatingHeaderValueMessageProcessor(expression, null);
- headerValueMessageProcessor.setOverwrite(overwrite);
- return header(name, headerValueMessageProcessor);
- }
-
- public HeaderEnricherSpec header(String name, HeaderValueMessageProcessor headerValueMessageProcessor) {
- Assert.hasText(name);
- this.headerToAdd.put(name, headerValueMessageProcessor);
- return _this();
- }
-
- public HeaderEnricherSpec headerChannelsToString() {
- return headerExpression("replyChannel",
- "@" + IntegrationContextUtils.INTEGRATION_HEADER_CHANNEL_REGISTRY_BEAN_NAME
- + ".channelToChannelName(headers.replyChannel)",
- true)
- .headerExpression("errorChannel",
- "@" + IntegrationContextUtils.INTEGRATION_HEADER_CHANNEL_REGISTRY_BEAN_NAME
- + ".channelToChannelName(headers.errorChannel)",
- true);
- }
-
- @Override
- protected HeaderEnricher doGet() {
- return this.headerEnricher;
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/IntegrationFlow.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/IntegrationFlow.java
deleted file mode 100644
index 81d6bcd..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/IntegrationFlow.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import org.springframework.integration.dsl.support.Consumer;
-
-/**
- * @author Artem Bilan
- */
-public interface IntegrationFlow extends Consumer> {
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/IntegrationFlowBuilder.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/IntegrationFlowBuilder.java
deleted file mode 100644
index 1383336..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/IntegrationFlowBuilder.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-/**
- * @author Artem Bilan
- */
-public final class IntegrationFlowBuilder extends IntegrationFlowDefinition {
-
- @Override
- public StandardIntegrationFlow get() {
- return super.get();
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/IntegrationFlowDefinition.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/IntegrationFlowDefinition.java
deleted file mode 100644
index f1bfeb5..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/IntegrationFlowDefinition.java
+++ /dev/null
@@ -1,819 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.util.Collection;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.Executor;
-
-import org.springframework.aop.framework.Advised;
-import org.springframework.aop.support.AopUtils;
-import org.springframework.beans.factory.BeanCreationException;
-import org.springframework.expression.Expression;
-import org.springframework.expression.spel.standard.SpelExpressionParser;
-import org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler;
-import org.springframework.integration.aggregator.AggregatingMessageHandler;
-import org.springframework.integration.aggregator.ResequencingMessageHandler;
-import org.springframework.integration.channel.DirectChannel;
-import org.springframework.integration.channel.FixedSubscriberChannel;
-import org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean;
-import org.springframework.integration.core.GenericSelector;
-import org.springframework.integration.core.MessageSelector;
-import org.springframework.integration.dsl.channel.MessageChannelSpec;
-import org.springframework.integration.dsl.core.ComponentsRegistration;
-import org.springframework.integration.dsl.core.ConsumerEndpointSpec;
-import org.springframework.integration.dsl.core.MessageHandlerSpec;
-import org.springframework.integration.dsl.support.BeanNameMessageProcessor;
-import org.springframework.integration.dsl.support.Consumer;
-import org.springframework.integration.dsl.support.FixedSubscriberChannelPrototype;
-import org.springframework.integration.dsl.support.Function;
-import org.springframework.integration.dsl.support.FunctionExpression;
-import org.springframework.integration.dsl.support.GenericHandler;
-import org.springframework.integration.dsl.support.MapBuilder;
-import org.springframework.integration.dsl.support.MessageChannelReference;
-import org.springframework.integration.expression.ControlBusMethodFilter;
-import org.springframework.integration.filter.ExpressionEvaluatingSelector;
-import org.springframework.integration.filter.MessageFilter;
-import org.springframework.integration.filter.MethodInvokingSelector;
-import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
-import org.springframework.integration.handler.BridgeHandler;
-import org.springframework.integration.handler.DelayHandler;
-import org.springframework.integration.handler.ExpressionCommandMessageProcessor;
-import org.springframework.integration.handler.ServiceActivatingHandler;
-import org.springframework.integration.router.AbstractMappingMessageRouter;
-import org.springframework.integration.router.AbstractMessageRouter;
-import org.springframework.integration.router.ExpressionEvaluatingRouter;
-import org.springframework.integration.router.MethodInvokingRouter;
-import org.springframework.integration.router.RecipientListRouter;
-import org.springframework.integration.splitter.AbstractMessageSplitter;
-import org.springframework.integration.splitter.DefaultMessageSplitter;
-import org.springframework.integration.splitter.ExpressionEvaluatingSplitter;
-import org.springframework.integration.splitter.MethodInvokingSplitter;
-import org.springframework.integration.store.MessageStore;
-import org.springframework.integration.transformer.ClaimCheckInTransformer;
-import org.springframework.integration.transformer.ClaimCheckOutTransformer;
-import org.springframework.integration.transformer.ContentEnricher;
-import org.springframework.integration.transformer.ExpressionEvaluatingTransformer;
-import org.springframework.integration.transformer.GenericTransformer;
-import org.springframework.integration.transformer.HeaderFilter;
-import org.springframework.integration.transformer.MessageTransformingHandler;
-import org.springframework.integration.transformer.MethodInvokingTransformer;
-import org.springframework.integration.transformer.Transformer;
-import org.springframework.messaging.Message;
-import org.springframework.messaging.MessageChannel;
-import org.springframework.messaging.MessageHandler;
-import org.springframework.util.Assert;
-import org.springframework.util.CollectionUtils;
-import org.springframework.util.StringUtils;
-
-/**
- * @author Artem Bilan
- * @author Gary Russell
- */
-public abstract class IntegrationFlowDefinition> {
-
- private final static SpelExpressionParser PARSER = new SpelExpressionParser();
-
- protected final Set integrationComponents = new LinkedHashSet();
-
- protected MessageChannel currentMessageChannel;
-
- protected Object currentComponent;
-
- IntegrationFlowDefinition() {
- }
-
- B addComponent(Object component) {
- this.integrationComponents.add(component);
- return _this();
- }
-
- B addComponents(Collection components) {
- if (components != null) {
- for (Object component : components) {
- this.integrationComponents.add(component);
- }
- }
- return _this();
- }
-
- B currentComponent(Object component) {
- this.currentComponent = component;
- return _this();
- }
-
- public B fixedSubscriberChannel() {
- return fixedSubscriberChannel(null);
- }
-
- public B fixedSubscriberChannel(String messageChannelName) {
- return channel(new FixedSubscriberChannelPrototype(messageChannelName));
- }
-
- public B channel(String messageChannelName) {
- return channel(new MessageChannelReference(messageChannelName));
- }
-
- public B channel(Function> channels) {
- Assert.notNull(channels);
- return channel(channels.apply(new Channels()));
- }
-
- public B channel(MessageChannelSpec, ?> messageChannelSpec) {
- Assert.notNull(messageChannelSpec);
- return channel(messageChannelSpec.get());
- }
-
- public B channel(MessageChannel messageChannel) {
- Assert.notNull(messageChannel);
- if (this.currentMessageChannel != null) {
- this.register(new GenericEndpointSpec(new BridgeHandler()), null);
- }
- this.currentMessageChannel = messageChannel;
- return registerOutputChannelIfCan(this.currentMessageChannel);
- }
-
- public B publishSubscribeChannel(Consumer publishSubscribeChannelConfigurer) {
- return publishSubscribeChannel(null, publishSubscribeChannelConfigurer);
- }
-
- public B publishSubscribeChannel(Executor executor,
- Consumer publishSubscribeChannelConfigurer) {
- Assert.notNull(publishSubscribeChannelConfigurer);
- PublishSubscribeSpec spec = new PublishSubscribeSpec(executor);
- publishSubscribeChannelConfigurer.accept(spec);
- return addComponents(spec.getComponentsToRegister()).channel(spec);
- }
-
- public B controlBus() {
- return controlBus(null);
- }
-
- public B controlBus(Consumer> endpointConfigurer) {
- return this.handle(new ServiceActivatingHandler(new ExpressionCommandMessageProcessor(
- new ControlBusMethodFilter())), endpointConfigurer);
- }
-
- public B transform(String expression) {
- Assert.hasText(expression);
- return this.transform(new ExpressionEvaluatingTransformer(PARSER.parseExpression(expression)));
- }
-
- public B transform(GenericTransformer genericTransformer) {
- return this.transform(null, genericTransformer);
- }
-
- public B transform(Class
payloadType, GenericTransformer
genericTransformer) {
- return this.transform(payloadType, genericTransformer, null);
- }
-
- public B transform(GenericTransformer genericTransformer,
- Consumer> endpointConfigurer) {
- return this.transform(null, genericTransformer, endpointConfigurer);
- }
-
- public B transform(Class
payloadType, GenericTransformer
genericTransformer,
- Consumer> endpointConfigurer) {
- Assert.notNull(genericTransformer);
- Transformer transformer = genericTransformer instanceof Transformer ? (Transformer) genericTransformer :
- (isLambda(genericTransformer)
- ? new MethodInvokingTransformer(new LambdaMessageProcessor(genericTransformer, payloadType))
- : new MethodInvokingTransformer(genericTransformer));
- return addComponent(transformer)
- .handle(new MessageTransformingHandler(transformer), endpointConfigurer);
- }
-
- public B filter(String expression) {
- Assert.hasText(expression);
- return this.filter(new ExpressionEvaluatingSelector(PARSER.parseExpression(expression)));
- }
-
- public B filter(GenericSelector genericSelector) {
- return this.filter(null, genericSelector);
- }
-
- public B filter(Class
payloadType, GenericSelector
genericSelector) {
- return this.filter(payloadType, genericSelector, null);
- }
-
- public
B filter(GenericSelector
genericSelector, Consumer endpointConfigurer) {
- return filter(null, genericSelector, endpointConfigurer);
- }
-
- public B filter(Class
payloadType, GenericSelector
genericSelector,
- Consumer endpointConfigurer) {
- Assert.notNull(genericSelector);
- MessageSelector selector = genericSelector instanceof MessageSelector ? (MessageSelector) genericSelector :
- (isLambda(genericSelector)
- ? new MethodInvokingSelector(new LambdaMessageProcessor(genericSelector, payloadType))
- : new MethodInvokingSelector(genericSelector));
- return this.register(new FilterEndpointSpec(new MessageFilter(selector)), endpointConfigurer);
- }
-
- public B handleWithAdapter(Function> adapters) {
- return handleWithAdapter(adapters, null);
- }
-
- public B handleWithAdapter(Function> adapters,
- Consumer> endpointConfigurer) {
- return handle(adapters.apply(new Adapters()), endpointConfigurer);
- }
-
- public B handle(MessageHandlerSpec, ? extends MessageHandler> messageHandlerSpec) {
- return handle(messageHandlerSpec, null);
- }
-
- public B handle(MessageHandler messageHandler) {
- return this.handle(messageHandler, null);
- }
-
- public B handle(String beanName, String methodName) {
- return this.handle(beanName, methodName, null);
- }
-
- public B handle(String beanName, String methodName,
- Consumer> endpointConfigurer) {
- return this.handle(new ServiceActivatingHandler(new BeanNameMessageProcessor(beanName, methodName)),
- endpointConfigurer);
- }
-
- public B handle(GenericHandler
handler) {
- return handle(null, handler);
- }
-
- public
B handle(GenericHandler
handler,
- Consumer> endpointConfigurer) {
- return this.handle(null, handler, endpointConfigurer);
- }
-
- public B handle(Class
payloadType, GenericHandler
handler) {
- return this.handle(payloadType, handler, null);
- }
-
- public
B handle(Class
payloadType, GenericHandler
handler,
- Consumer> endpointConfigurer) {
- ServiceActivatingHandler serviceActivatingHandler = null;
- if (isLambda(handler)) {
- serviceActivatingHandler = new ServiceActivatingHandler(new LambdaMessageProcessor(handler, payloadType));
- }
- else {
- serviceActivatingHandler = new ServiceActivatingHandler(handler);
- }
- return this.handle(serviceActivatingHandler, endpointConfigurer);
- }
-
- public B handle(MessageHandlerSpec, H> messageHandlerSpec,
- Consumer> endpointConfigurer) {
- Assert.notNull(messageHandlerSpec);
- if (messageHandlerSpec instanceof ComponentsRegistration) {
- addComponents(((ComponentsRegistration) messageHandlerSpec).getComponentsToRegister());
- }
- return handle(messageHandlerSpec.get(), endpointConfigurer);
- }
-
- public B handle(H messageHandler, Consumer> endpointConfigurer) {
- Assert.notNull(messageHandler);
- return this.register(new GenericEndpointSpec(messageHandler), endpointConfigurer);
- }
-
- public B bridge(Consumer> endpointConfigurer) {
- return this.register(new GenericEndpointSpec(new BridgeHandler()), endpointConfigurer);
- }
-
- public B delay(String groupId) {
- return this.delay(groupId, (String) null);
- }
-
- public B delay(String groupId, Consumer endpointConfigurer) {
- return this.delay(groupId, (String) null, endpointConfigurer);
- }
-
- public B delay(String groupId, String expression) {
- return this.delay(groupId, expression, null);
- }
-
- public B delay(String groupId, Function, Object> function) {
- return this.delay(groupId, function, null);
- }
-
- public B delay(String groupId, Function, Object> function,
- Consumer endpointConfigurer) {
- Assert.notNull(function);
- return this.delay(groupId, new FunctionExpression>(function), endpointConfigurer);
- }
-
- public B delay(String groupId, String expression, Consumer endpointConfigurer) {
- return delay(groupId,
- StringUtils.hasText(expression) ? PARSER.parseExpression(expression) : null,
- endpointConfigurer);
- }
-
- private B delay(String groupId, Expression expression, Consumer endpointConfigurer) {
- DelayHandler delayHandler = new DelayHandler(groupId);
- if (expression != null) {
- delayHandler.setDelayExpression(expression);
- }
- return this.register(new DelayerEndpointSpec(delayHandler), endpointConfigurer);
- }
-
- public B enrich(Consumer enricherConfigurer) {
- return this.enrich(enricherConfigurer, null);
- }
-
- public B enrich(Consumer enricherConfigurer,
- Consumer> endpointConfigurer) {
- Assert.notNull(enricherConfigurer);
- EnricherSpec enricherSpec = new EnricherSpec();
- enricherConfigurer.accept(enricherSpec);
- return this.handle(enricherSpec.get(), endpointConfigurer);
- }
-
- public B enrichHeaders(MapBuilder, String, Object> headers) {
- return enrichHeaders(headers, null);
- }
-
- public B enrichHeaders(MapBuilder, String, Object> headers,
- Consumer> endpointConfigurer) {
- return enrichHeaders(headers.get(), endpointConfigurer);
- }
-
- /**
- * Accept a {@link Map} of values to be used for the
- * {@link org.springframework.messaging.Message} header enrichment.
- * {@code values} can apply an {@link org.springframework.expression.Expression}
- * to be evaluated against a request {@link org.springframework.messaging.Message}.
- * @param headers the Map of headers to enrich.
- * @return this.
- */
- public B enrichHeaders(Map headers) {
- return enrichHeaders(headers, null);
- }
-
- public B enrichHeaders(final Map headers,
- Consumer> endpointConfigurer) {
- return enrichHeaders(new Consumer() {
-
- @Override
- public void accept(HeaderEnricherSpec spec) {
- spec.headers(headers);
- }
-
- }, endpointConfigurer);
- }
-
- public B enrichHeaders(Consumer headerEnricherConfigurer) {
- return this.enrichHeaders(headerEnricherConfigurer, null);
- }
-
- public B enrichHeaders(Consumer headerEnricherConfigurer,
- Consumer> endpointConfigurer) {
- Assert.notNull(headerEnricherConfigurer);
- HeaderEnricherSpec headerEnricherSpec = new HeaderEnricherSpec();
- headerEnricherConfigurer.accept(headerEnricherSpec);
- return transform(headerEnricherSpec.get(), endpointConfigurer);
- }
-
- public B split() {
- return this.split((Consumer>) null);
- }
-
- public B split(Consumer> endpointConfigurer) {
- return this.split(new DefaultMessageSplitter(), endpointConfigurer);
- }
-
- public B split(String expression,
- Consumer> endpointConfigurer) {
- return this.split(new ExpressionEvaluatingSplitter(PARSER.parseExpression(expression)), endpointConfigurer);
- }
-
- public B split(String beanName, String methodName) {
- return this.split(beanName, methodName, null);
- }
-
- public B split(String beanName, String methodName,
- Consumer> endpointConfigurer) {
- return this.split(new MethodInvokingSplitter(new BeanNameMessageProcessor(beanName, methodName)),
- endpointConfigurer);
- }
-
- public B split(Class
payloadType, Function
splitter) {
- return split(payloadType, splitter, null);
- }
-
- public
B split(Function
splitter,
- Consumer> endpointConfigurer) {
- return split(null, splitter, endpointConfigurer);
- }
-
- public B split(Class
payloadType, Function
splitter,
- Consumer> endpointConfigurer) {
- MethodInvokingSplitter split = isLambda(splitter)
- ? new MethodInvokingSplitter(new LambdaMessageProcessor(splitter, payloadType))
- : new MethodInvokingSplitter(splitter);
- return this.split(split, endpointConfigurer);
- }
-
- public B split(S splitter,
- Consumer> endpointConfigurer) {
- Assert.notNull(splitter);
- return this.register(new SplitterEndpointSpec(splitter), endpointConfigurer);
- }
-
- /**
- * Provides the {@link HeaderFilter} to the current {@link StandardIntegrationFlow}.
- * @param headersToRemove the array of headers (or patterns)
- * to remove from {@link org.springframework.messaging.MessageHeaders}.
- * @return this {@link IntegrationFlowDefinition}.
- */
- public B headerFilter(String... headersToRemove) {
- return this.headerFilter(new HeaderFilter(headersToRemove), null);
- }
-
- /**
- * Provides the {@link HeaderFilter} to the current {@link StandardIntegrationFlow}.
- * @param headersToRemove the comma separated headers (or patterns) to remove from
- * {@link org.springframework.messaging.MessageHeaders}.
- * @param patternMatch the {@code boolean} flag to indicate if {@code headersToRemove}
- * should be interpreted as patterns or direct header names.
- * @return this {@link IntegrationFlowDefinition}.
- */
- public B headerFilter(String headersToRemove, boolean patternMatch) {
- HeaderFilter headerFilter = new HeaderFilter(StringUtils.delimitedListToStringArray(headersToRemove, ",", " "));
- headerFilter.setPatternMatch(patternMatch);
- return this.headerFilter(headerFilter, null);
- }
-
- public B headerFilter(HeaderFilter headerFilter,
- Consumer> endpointConfigurer) {
- return this.transform(headerFilter, endpointConfigurer);
- }
-
- public B claimCheckIn(MessageStore messageStore) {
- return this.claimCheckIn(messageStore, null);
- }
-
- public B claimCheckIn(MessageStore messageStore,
- Consumer> endpointConfigurer) {
- return this.transform(new ClaimCheckInTransformer(messageStore), endpointConfigurer);
- }
-
- public B claimCheckOut(MessageStore messageStore) {
- return this.claimCheckOut(messageStore, false);
- }
-
- public B claimCheckOut(MessageStore messageStore, boolean removeMessage) {
- return this.claimCheckOut(messageStore, removeMessage, null);
- }
-
- public B claimCheckOut(MessageStore messageStore, boolean removeMessage,
- Consumer> endpointConfigurer) {
- ClaimCheckOutTransformer claimCheckOutTransformer = new ClaimCheckOutTransformer(messageStore);
- claimCheckOutTransformer.setRemoveMessage(removeMessage);
- return this.transform(claimCheckOutTransformer, endpointConfigurer);
- }
-
- public B resequence() {
- return this.resequence((Consumer>) null);
- }
-
- public B resequence(Consumer> endpointConfigurer) {
- return this.handle(new ResequencerSpec().get(), endpointConfigurer);
- }
-
- public B resequence(Consumer resequencerConfigurer,
- Consumer> endpointConfigurer) {
- Assert.notNull(resequencerConfigurer);
- ResequencerSpec spec = new ResequencerSpec();
- resequencerConfigurer.accept(spec);
- return this.handle(spec.get(), endpointConfigurer);
- }
-
- public B aggregate() {
- return aggregate((Consumer>) null);
- }
-
- public B
- aggregate(Consumer> endpointConfigurer) {
- return handle(new AggregatorSpec().get(), endpointConfigurer);
- }
-
- public B aggregate(Consumer aggregatorConfigurer,
- Consumer> endpointConfigurer) {
- Assert.notNull(aggregatorConfigurer);
- AggregatorSpec spec = new AggregatorSpec();
- aggregatorConfigurer.accept(spec);
- return this.handle(spec.get(), endpointConfigurer);
- }
-
- public B route(String beanName, String method) {
- return this.route(beanName, method, null);
- }
-
- public B route(String beanName, String method, Consumer> routerConfigurer) {
- return this.route(beanName, method, routerConfigurer, null);
- }
-
- public B route(String beanName, String method, Consumer> routerConfigurer,
- Consumer> endpointConfigurer) {
- return this.route(new MethodInvokingRouter(new BeanNameMessageProcessor(beanName, method)),
- routerConfigurer, endpointConfigurer);
- }
-
- public B route(String expression) {
- return this.route(expression, (Consumer>) null);
- }
-
- public B route(String expression, Consumer> routerConfigurer) {
- return this.route(expression, routerConfigurer, null);
- }
-
- public B route(String expression, Consumer> routerConfigurer,
- Consumer> endpointConfigurer) {
- return this.route(new ExpressionEvaluatingRouter(PARSER.parseExpression(expression)), routerConfigurer,
- endpointConfigurer);
- }
-
- public B route(Function router) {
- return this.route(null, router);
- }
-
- public B route(Function router, Consumer> routerConfigurer) {
- return this.route(null, router, routerConfigurer);
- }
-
- public B route(Class
payloadType, Function
router) {
- return this.route(payloadType, router, null, null);
- }
-
- public
B route(Class
payloadType, Function
router,
- Consumer> routerConfigurer) {
- return this.route(payloadType, router, routerConfigurer, null);
- }
-
- public B route(Function router, Consumer> routerConfigurer,
- Consumer> endpointConfigurer) {
- return route(null, router, routerConfigurer, endpointConfigurer);
- }
-
- public B route(Class
payloadType, Function
router,
- Consumer> routerConfigurer,
- Consumer> endpointConfigurer) {
- MethodInvokingRouter methodInvokingRouter = isLambda(router)
- ? new MethodInvokingRouter(new LambdaMessageProcessor(router, payloadType))
- : new MethodInvokingRouter(router);
- return route(methodInvokingRouter, routerConfigurer, endpointConfigurer);
- }
-
- public B route(R router, Consumer> routerConfigurer,
- Consumer> endpointConfigurer) {
- Collection componentsToRegister = null;
- if (routerConfigurer != null) {
- RouterSpec routerSpec = new RouterSpec(router);
- routerConfigurer.accept(routerSpec);
- componentsToRegister = routerSpec.getComponentsToRegister();
- }
-
- route(router, endpointConfigurer);
-
- final MessageChannel afterRouterChannel = new DirectChannel();
- boolean hasSubFlows = false;
- if (!CollectionUtils.isEmpty(componentsToRegister)) {
- for (Object component : componentsToRegister) {
- if (component instanceof IntegrationFlowDefinition) {
- hasSubFlows = true;
- IntegrationFlowDefinition> flowBuilder = (IntegrationFlowDefinition>) component;
- addComponent(flowBuilder.fixedSubscriberChannel()
- .bridge(new Consumer>() {
-
- @Override
- public void accept(GenericEndpointSpec bridge) {
- bridge.get().getT2().setOutputChannel(afterRouterChannel);
- }
-
- })
- .get());
- }
- else {
- addComponent(component);
- }
- }
- }
- if (hasSubFlows) {
- channel(afterRouterChannel);
- }
- return _this();
- }
-
- public B routeToRecipients(Consumer routerConfigurer) {
- return routeToRecipients(routerConfigurer, null);
- }
-
- public B routeToRecipients(Consumer routerConfigurer,
- Consumer> endpointConfigurer) {
- Assert.notNull(routerConfigurer);
- RecipientListRouterSpec spec = new RecipientListRouterSpec();
- routerConfigurer.accept(spec);
- addComponents(spec.getComponentsToRegister());
- return route(spec.get(), endpointConfigurer);
- }
-
- public B route(AbstractMessageRouter router) {
- return route(router, null);
- }
-
- public B route(R router, Consumer> endpointConfigurer) {
- return handle(router, endpointConfigurer);
- }
-
- public B gateway(String requestChannel) {
- return gateway(requestChannel, null);
- }
-
- public B gateway(String requestChannel, Consumer endpointConfigurer) {
- return register(new GatewayEndpointSpec(requestChannel), endpointConfigurer);
- }
-
- public B gateway(MessageChannel requestChannel) {
- return gateway(requestChannel, null);
- }
-
- public B gateway(MessageChannel requestChannel, Consumer endpointConfigurer) {
- return register(new GatewayEndpointSpec(requestChannel), endpointConfigurer);
- }
-
- public B gateway(IntegrationFlow flow) {
- return gateway(flow, null);
- }
-
- public B gateway(IntegrationFlow flow, Consumer endpointConfigurer) {
- Assert.notNull(flow);
- final DirectChannel requestChannel = new DirectChannel();
- IntegrationFlowBuilder flowBuilder = IntegrationFlows.from(requestChannel);
- flow.accept(flowBuilder);
- addComponent(flowBuilder.get());
- return gateway(requestChannel, endpointConfigurer);
- }
-
- private > B register(S endpointSpec, Consumer endpointConfigurer) {
- if (endpointConfigurer != null) {
- endpointConfigurer.accept(endpointSpec);
- }
- if (endpointSpec instanceof ComponentsRegistration) {
- addComponents(((ComponentsRegistration) endpointSpec).getComponentsToRegister());
- }
- MessageChannel inputChannel = this.currentMessageChannel;
- this.currentMessageChannel = null;
- if (inputChannel == null) {
- inputChannel = new DirectChannel();
- this.registerOutputChannelIfCan(inputChannel);
- }
-
- if (inputChannel instanceof MessageChannelReference) {
- endpointSpec.get().getT1().setInputChannelName(((MessageChannelReference) inputChannel).getName());
- }
- else {
- if (inputChannel instanceof FixedSubscriberChannelPrototype) {
- String beanName = ((FixedSubscriberChannelPrototype) inputChannel).getName();
- inputChannel = new FixedSubscriberChannel(endpointSpec.get().getT2());
- if (beanName != null) {
- ((FixedSubscriberChannel) inputChannel).setBeanName(beanName);
- }
- this.registerOutputChannelIfCan(inputChannel);
- }
- endpointSpec.get().getT1().setInputChannel(inputChannel);
- }
-
- return this.addComponent(endpointSpec).currentComponent(endpointSpec.get().getT2());
- }
-
- private B registerOutputChannelIfCan(MessageChannel outputChannel) {
- if (!(outputChannel instanceof FixedSubscriberChannelPrototype)) {
- this.integrationComponents.add(outputChannel);
- if (this.currentComponent != null) {
- String channelName = null;
- if (outputChannel instanceof MessageChannelReference) {
- channelName = ((MessageChannelReference) outputChannel).getName();
- }
-
- Object currentComponent = this.currentComponent;
-
- if (AopUtils.isAopProxy(currentComponent)) {
- currentComponent = extractProxyTarget(currentComponent);
- }
-
- if (currentComponent instanceof AbstractReplyProducingMessageHandler) {
- AbstractReplyProducingMessageHandler messageProducer =
- (AbstractReplyProducingMessageHandler) currentComponent;
- if (channelName != null) {
- messageProducer.setOutputChannelName(channelName);
- }
- else {
- messageProducer.setOutputChannel(outputChannel);
- }
- }
- else if (currentComponent instanceof SourcePollingChannelAdapterSpec) {
- SourcePollingChannelAdapterFactoryBean pollingChannelAdapterFactoryBean =
- ((SourcePollingChannelAdapterSpec) currentComponent).get().getT1();
- if (channelName != null) {
- pollingChannelAdapterFactoryBean.setOutputChannelName(channelName);
- }
- else {
- pollingChannelAdapterFactoryBean.setOutputChannel(outputChannel);
- }
- }
- else if (currentComponent instanceof AbstractCorrelatingMessageHandler) {
- AbstractCorrelatingMessageHandler messageProducer =
- (AbstractCorrelatingMessageHandler) currentComponent;
- if (channelName != null) {
- messageProducer.setOutputChannelName(channelName);
- }
- else {
- messageProducer.setOutputChannel(outputChannel);
- }
- }
- else if (this.currentComponent instanceof AbstractMessageRouter) {
- AbstractMessageRouter router = (AbstractMessageRouter) this.currentComponent;
- if (channelName != null) {
- router.setDefaultOutputChannelName(channelName);
- }
- else {
- router.setDefaultOutputChannel(outputChannel);
- }
- }
- else {
- throw new BeanCreationException("The 'currentComponent' (" + currentComponent +
- ") is a one-way 'MessageHandler' and it isn't appropriate to configure 'outputChannel'. " +
- "This is the end of the integration flow.");
- }
- this.currentComponent = null;
- }
- }
- return _this();
- }
-
- @SuppressWarnings("unchecked")
- protected final B _this() {
- return (B) this;
- }
-
- private static boolean isLambda(Object o) {
- Class> aClass = o.getClass();
- return aClass.isSynthetic() && !aClass.isAnonymousClass() && !aClass.isLocalClass();
- }
-
- private static Object extractProxyTarget(Object target) {
- if (!(target instanceof Advised)) {
- return target;
- }
- Advised advised = (Advised) target;
- if (advised.getTargetSource() == null) {
- return null;
- }
- try {
- return extractProxyTarget(advised.getTargetSource().getTarget());
- }
- catch (Exception e) {
- throw new BeanCreationException("Could not extract target", e);
- }
- }
-
- protected StandardIntegrationFlow get() {
- if (this.currentMessageChannel instanceof FixedSubscriberChannelPrototype) {
- throw new BeanCreationException("The 'currentMessageChannel' (" + this.currentMessageChannel +
- ") is a prototype for FixedSubscriberChannel which can't be created without MessageHandler " +
- "constructor argument. That means that '.fixedSubscriberChannel()' can't be the last EIP-method " +
- "in the IntegrationFlow definition.");
- }
-
- if (this.integrationComponents.size() == 1) {
- if (this.currentComponent != null) {
- if (this.currentComponent instanceof SourcePollingChannelAdapterSpec) {
- throw new BeanCreationException("The 'SourcePollingChannelAdapter' (" + this.currentComponent
- + ") " + "must be configured with at least one 'MessageChanel' or 'MessageHandler'.");
- }
- }
- else if (this.currentMessageChannel != null) {
- throw new BeanCreationException("The 'IntegrationFlow' can't consist of only one 'MessageChannel'. " +
- "Add at lest '.bridge()' EIP-method before the end of flow.");
- }
- }
- return new StandardIntegrationFlow(this.integrationComponents);
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/IntegrationFlows.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/IntegrationFlows.java
deleted file mode 100644
index 11eec72..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/IntegrationFlows.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import org.springframework.beans.DirectFieldAccessor;
-import org.springframework.integration.channel.DirectChannel;
-import org.springframework.integration.core.MessageSource;
-import org.springframework.integration.dsl.channel.MessageChannelSpec;
-import org.springframework.integration.dsl.core.ComponentsRegistration;
-import org.springframework.integration.dsl.core.MessageProducerSpec;
-import org.springframework.integration.dsl.core.MessageSourceSpec;
-import org.springframework.integration.dsl.core.MessagingGatewaySpec;
-import org.springframework.integration.dsl.support.Consumer;
-import org.springframework.integration.dsl.support.FixedSubscriberChannelPrototype;
-import org.springframework.integration.dsl.support.Function;
-import org.springframework.integration.dsl.support.MessageChannelReference;
-import org.springframework.integration.endpoint.MessageProducerSupport;
-import org.springframework.integration.gateway.MessagingGatewaySupport;
-import org.springframework.messaging.MessageChannel;
-import org.springframework.util.Assert;
-
-/**
- * The central factory for fluent {@link IntegrationFlowBuilder} API.
- *
- * @author Artem Bilan
- */
-public final class IntegrationFlows {
-
- /**
- * @param messageChannelName the name of existing {@link MessageChannel} bean.
- * The new {@link DirectChannel} bean will be created on context startup
- * if there is no bean with this name.
- * @return new {@link IntegrationFlowBuilder}
- */
- public static IntegrationFlowBuilder from(String messageChannelName) {
- return from(new MessageChannelReference(messageChannelName));
- }
-
- /**
- * @param messageChannelName the name for {@link DirectChannel} or
- * {@link org.springframework.integration.channel.FixedSubscriberChannel}
- * to be created on context startup, not reference.
- * The {@link MessageChannel} depends on the {@code fixedSubscriber} boolean argument.
- * @param fixedSubscriber the boolean flag to determine if result {@link MessageChannel} should
- * be {@link DirectChannel}, if {@code false} or
- * {@link org.springframework.integration.channel.FixedSubscriberChannel}, if {@code true}.
- * @return new {@link IntegrationFlowBuilder}
- */
- public static IntegrationFlowBuilder from(String messageChannelName, boolean fixedSubscriber) {
- return fixedSubscriber
- ? from(new FixedSubscriberChannelPrototype(messageChannelName))
- : from(messageChannelName);
- }
-
- public static IntegrationFlowBuilder from(ChannelsFunction channels) {
- Assert.notNull(channels);
- return from(channels.apply(new Channels()));
- }
-
- public static IntegrationFlowBuilder from(MessageChannelSpec, ?> messageChannelSpec) {
- Assert.notNull(messageChannelSpec);
- return from(messageChannelSpec.get());
- }
-
- public static IntegrationFlowBuilder from(MessageChannel messageChannel) {
- return new IntegrationFlowBuilder().channel(messageChannel);
- }
-
- public static IntegrationFlowBuilder from(MessageSourcesFunction sources) {
- return from(sources, null);
- }
-
- public static IntegrationFlowBuilder from(MessageSourcesFunction sources,
- Consumer endpointConfigurer) {
- Assert.notNull(sources);
- return from(sources.apply(new MessageSources()), endpointConfigurer);
- }
-
- public static IntegrationFlowBuilder from(MessageSourceSpec, ? extends MessageSource>> messageSourceSpec) {
- return from(messageSourceSpec, null);
- }
-
- public static IntegrationFlowBuilder from(MessageSourceSpec, ? extends MessageSource>> messageSourceSpec,
- Consumer endpointConfigurer) {
- Assert.notNull(messageSourceSpec);
- return from(messageSourceSpec.get(), endpointConfigurer, registerComponents(messageSourceSpec));
- }
-
- public static IntegrationFlowBuilder from(MessageSource> messageSource) {
- return from(messageSource, null);
- }
-
- public static IntegrationFlowBuilder from(MessageSource> messageSource,
- Consumer endpointConfigurer) {
- return from(messageSource, endpointConfigurer, null);
- }
-
- private static IntegrationFlowBuilder from(MessageSource> messageSource,
- Consumer endpointConfigurer,
- IntegrationFlowBuilder integrationFlowBuilder) {
- SourcePollingChannelAdapterSpec spec = new SourcePollingChannelAdapterSpec(messageSource);
- if (endpointConfigurer != null) {
- endpointConfigurer.accept(spec);
- }
- if (integrationFlowBuilder == null) {
- integrationFlowBuilder = new IntegrationFlowBuilder();
- }
- return integrationFlowBuilder.addComponent(spec)
- .currentComponent(spec);
- }
-
- public static IntegrationFlowBuilder from(MessageProducersFunction producers) {
- return from(producers.apply(new MessageProducers()));
- }
-
- public static IntegrationFlowBuilder from(MessageProducerSpec, ?> messageProducerSpec) {
- return from(messageProducerSpec.get(), registerComponents(messageProducerSpec));
- }
-
- public static IntegrationFlowBuilder from(MessageProducerSupport messageProducer) {
- return from(messageProducer, null);
- }
-
- private static IntegrationFlowBuilder from(MessageProducerSupport messageProducer,
- IntegrationFlowBuilder integrationFlowBuilder) {
- DirectFieldAccessor dfa = new DirectFieldAccessor(messageProducer);
- MessageChannel outputChannel = (MessageChannel) dfa.getPropertyValue("outputChannel");
- if (outputChannel == null) {
- outputChannel = new DirectChannel();
- messageProducer.setOutputChannel(outputChannel);
- }
- if (integrationFlowBuilder == null) {
- integrationFlowBuilder = from(outputChannel);
- }
- else {
- integrationFlowBuilder.channel(outputChannel);
- }
- return integrationFlowBuilder.addComponent(messageProducer);
- }
-
- public static IntegrationFlowBuilder from(MessagingGatewaysFunction gateways) {
- return from(gateways.apply(new MessagingGateways()));
- }
-
- public static IntegrationFlowBuilder from(MessagingGatewaySpec, ?> inboundGatewaySpec) {
- return from(inboundGatewaySpec.get(), registerComponents(inboundGatewaySpec));
- }
-
- public static IntegrationFlowBuilder from(MessagingGatewaySupport inboundGateway) {
- DirectFieldAccessor dfa = new DirectFieldAccessor(inboundGateway);
- MessageChannel outputChannel = (MessageChannel) dfa.getPropertyValue("requestChannel");
- if (outputChannel == null) {
- outputChannel = new DirectChannel();
- inboundGateway.setRequestChannel(outputChannel);
- }
- return from(outputChannel).addComponent(inboundGateway);
- }
-
- private static IntegrationFlowBuilder from(MessagingGatewaySupport inboundGateway,
- IntegrationFlowBuilder integrationFlowBuilder) {
- DirectFieldAccessor dfa = new DirectFieldAccessor(inboundGateway);
- MessageChannel outputChannel = (MessageChannel) dfa.getPropertyValue("requestChannel");
- if (outputChannel == null) {
- outputChannel = new DirectChannel();
- inboundGateway.setRequestChannel(outputChannel);
- }
- if (integrationFlowBuilder == null) {
- integrationFlowBuilder = from(outputChannel);
- }
- else {
- integrationFlowBuilder.channel(outputChannel);
- }
- return integrationFlowBuilder.addComponent(inboundGateway);
- }
-
- private static IntegrationFlowBuilder registerComponents(Object spec) {
- if (spec instanceof ComponentsRegistration) {
- return new IntegrationFlowBuilder()
- .addComponents(((ComponentsRegistration) spec).getComponentsToRegister());
- }
- return null;
- }
-
- private IntegrationFlows() {
- }
-
- public interface ChannelsFunction extends Function> {}
-
- public interface MessageSourcesFunction extends Function> {}
-
- public interface MessageProducersFunction extends Function> {}
-
- public interface MessagingGatewaysFunction extends Function> {}
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/LambdaMessageProcessor.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/LambdaMessageProcessor.java
deleted file mode 100644
index b8e9a97..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/LambdaMessageProcessor.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.BeanFactory;
-import org.springframework.beans.factory.BeanFactoryAware;
-import org.springframework.core.convert.ConversionService;
-import org.springframework.core.convert.TypeDescriptor;
-import org.springframework.core.convert.support.DefaultConversionService;
-import org.springframework.integration.handler.MessageProcessor;
-import org.springframework.integration.support.utils.IntegrationUtils;
-import org.springframework.messaging.Message;
-import org.springframework.messaging.MessageHandlingException;
-import org.springframework.util.Assert;
-import org.springframework.util.ReflectionUtils;
-
-/**
- * @author Artem Bilan
- */
-class LambdaMessageProcessor implements MessageProcessor, BeanFactoryAware {
-
- private final Object target;
-
- private final Method method;
-
- private final TypeDescriptor payloadType;
-
- private final Class>[] parameterTypes;
-
-
- private ConversionService conversionService;
-
- public LambdaMessageProcessor(Object target, Class> payloadType) {
- Assert.notNull(target);
- this.target = target;
- final AtomicReference methodValue = new AtomicReference();
- ReflectionUtils.doWithMethods(target.getClass(), new ReflectionUtils.MethodCallback() {
-
- @Override
- public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException {
- methodValue.set(method);
- }
-
- }, new ReflectionUtils.MethodFilter() {
-
- @Override
- public boolean matches(Method method) {
- return !method.isBridge() && method.getDeclaringClass() != Object.class &&
- Modifier.isPublic(method.getModifiers()) && !Modifier.isStatic(method.getModifiers());
- }
-
- });
-
- Assert.notNull(methodValue.get(), "LambdaMessageProcessor is applicable for inline or lambda " +
- "classes with single method - functional interfaces implementations.");
-
- this.method = methodValue.get();
- this.method.setAccessible(true);
- this.parameterTypes = this.method.getParameterTypes();
- this.payloadType = TypeDescriptor.valueOf(payloadType);
- }
-
- @Override
- public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
- ConversionService conversionService = IntegrationUtils.getConversionService(beanFactory);
- if (conversionService == null) {
- conversionService = new DefaultConversionService();
- }
- this.conversionService = conversionService;
- }
-
- @Override
- public Object processMessage(Message> message) {
- Object[] args = new Object[this.parameterTypes.length];
- for (int i = 0; i < this.parameterTypes.length; i++) {
- Class> parameterType = this.parameterTypes[i];
- if (Message.class.isAssignableFrom(parameterType)) {
- args[i] = message;
- }
- if (Map.class.isAssignableFrom(parameterType)) {
- if (message.getPayload() instanceof Map) {
- args[i] = message.getPayload();
- }
- else {
- args[i] = message.getHeaders();
- }
- }
- else {
- if (this.payloadType != null) {
- if (Message.class.isAssignableFrom(this.payloadType.getType())) {
- args[i] = message;
- }
- else {
- args[i] = this.conversionService.convert(message.getPayload(),
- TypeDescriptor.forObject(message.getPayload()), this.payloadType);
- }
-
- }
- else {
- args[i] = message.getPayload();
- }
- }
- }
-
- try {
- return this.method.invoke(this.target, args);
- }
- catch (Exception e) {
- throw new MessageHandlingException(message, e);
- }
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/MessageProducers.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/MessageProducers.java
deleted file mode 100644
index 3d8d2e6..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/MessageProducers.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.io.File;
-
-import org.springframework.amqp.core.Queue;
-import org.springframework.integration.dsl.amqp.Amqp;
-import org.springframework.integration.dsl.amqp.AmqpInboundChannelAdapterSpec;
-import org.springframework.integration.dsl.file.Files;
-import org.springframework.integration.dsl.file.TailAdapterSpec;
-import org.springframework.integration.dsl.jms.Jms;
-import org.springframework.integration.dsl.jms.JmsMessageDrivenChannelAdapterSpec;
-import org.springframework.integration.dsl.mail.ImapIdleChannelAdapterSpec;
-import org.springframework.integration.dsl.mail.Mail;
-import org.springframework.jms.listener.AbstractMessageListenerContainer;
-
-/**
- * @author Artem Bilan
- */
-public class MessageProducers {
-
- public AmqpInboundChannelAdapterSpec amqp(
- org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory, String... queueNames) {
- return Amqp.inboundAdapter(connectionFactory, queueNames);
- }
-
- public AmqpInboundChannelAdapterSpec amqp(
- org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory, Queue... queues) {
- return Amqp.inboundAdapter(connectionFactory, queues);
- }
-
- public TailAdapterSpec tail(File file) {
- return Files.tailAdapter(file);
- }
-
- public ImapIdleChannelAdapterSpec imap(String url) {
- return Mail.imapIdleAdapter(url);
- }
-
- public JmsMessageDrivenChannelAdapterSpec extends JmsMessageDrivenChannelAdapterSpec>> jms(
- AbstractMessageListenerContainer listenerContainer) {
- return Jms.messageDriverChannelAdapter(listenerContainer);
- }
-
- public JmsMessageDrivenChannelAdapterSpec extends JmsMessageDrivenChannelAdapterSpec>> jms(
- javax.jms.ConnectionFactory connectionFactory) {
- return Jms.messageDriverChannelAdapter(connectionFactory);
- }
-
- public
- JmsMessageDrivenChannelAdapterSpec extends JmsMessageDrivenChannelAdapterSpec>> jms(
- javax.jms.ConnectionFactory connectionFactory,
- Class containerClass) {
- return Jms.messageDriverChannelAdapter(connectionFactory, containerClass);
- }
-
- MessageProducers() {
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/MessageSources.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/MessageSources.java
deleted file mode 100644
index f625e6c..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/MessageSources.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.io.File;
-import java.util.Comparator;
-
-import javax.jms.ConnectionFactory;
-
-import org.apache.commons.net.ftp.FTPFile;
-
-import org.springframework.integration.dsl.file.FileInboundChannelAdapterSpec;
-import org.springframework.integration.dsl.file.Files;
-import org.springframework.integration.dsl.ftp.Ftp;
-import org.springframework.integration.dsl.ftp.FtpInboundChannelAdapterSpec;
-import org.springframework.integration.dsl.jms.Jms;
-import org.springframework.integration.dsl.jms.JmsInboundChannelAdapterSpec;
-import org.springframework.integration.dsl.mail.ImapMailInboundChannelAdapterSpec;
-import org.springframework.integration.dsl.mail.Mail;
-import org.springframework.integration.dsl.mail.Pop3MailInboundChannelAdapterSpec;
-import org.springframework.integration.dsl.sftp.Sftp;
-import org.springframework.integration.dsl.sftp.SftpInboundChannelAdapterSpec;
-import org.springframework.integration.file.remote.session.SessionFactory;
-import org.springframework.jms.core.JmsTemplate;
-
-import com.jcraft.jsch.ChannelSftp;
-
-/**
- * @author Artem Bilan
- */
-public class MessageSources {
-
- public FileInboundChannelAdapterSpec file(File directory) {
- return file(directory, null);
- }
-
- public FileInboundChannelAdapterSpec file(File directory, Comparator receptionOrderComparator) {
- return Files.inboundAdapter(directory, receptionOrderComparator);
- }
-
- public FtpInboundChannelAdapterSpec ftp(SessionFactory sessionFactory) {
- return ftp(sessionFactory, null);
- }
-
- public FtpInboundChannelAdapterSpec ftp(SessionFactory sessionFactory,
- Comparator receptionOrderComparator) {
- return Ftp.inboundAdapter(sessionFactory, receptionOrderComparator);
- }
-
- public SftpInboundChannelAdapterSpec sftp(SessionFactory sessionFactory) {
- return sftp(sessionFactory, null);
- }
-
- public SftpInboundChannelAdapterSpec sftp(SessionFactory sessionFactory,
- Comparator receptionOrderComparator) {
- return Sftp.inboundAdapter(sessionFactory, receptionOrderComparator);
- }
-
- public JmsInboundChannelAdapterSpec extends JmsInboundChannelAdapterSpec>> jms(JmsTemplate jmsTemplate) {
- return Jms.inboundAdapter(jmsTemplate);
- }
-
- public JmsInboundChannelAdapterSpec.JmsInboundChannelSpecTemplateAware jms(ConnectionFactory connectionFactory) {
- return Jms.inboundAdapter(connectionFactory);
- }
-
- public ImapMailInboundChannelAdapterSpec imap() {
- return Mail.imapInboundAdapter();
- }
-
- public ImapMailInboundChannelAdapterSpec imap(String url) {
- return Mail.imapInboundAdapter(url);
- }
-
- public Pop3MailInboundChannelAdapterSpec pop3() {
- return Mail.pop3InboundAdapter();
- }
-
- public Pop3MailInboundChannelAdapterSpec pop3(String url) {
- return Mail.pop3InboundAdapter(url);
- }
-
- public Pop3MailInboundChannelAdapterSpec pop3(String host, String username, String password) {
- return pop3(host, -1, username, password);
- }
-
- public Pop3MailInboundChannelAdapterSpec pop3(String host, int port, String username, String password) {
- return Mail.pop3InboundAdapter(host, port, username, password);
- }
-
- MessageSources() {
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/MessagingGateways.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/MessagingGateways.java
deleted file mode 100644
index 4827a70..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/MessagingGateways.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import javax.jms.ConnectionFactory;
-
-import org.springframework.amqp.core.Queue;
-import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
-import org.springframework.integration.dsl.amqp.Amqp;
-import org.springframework.integration.dsl.amqp.AmqpInboundGatewaySpec;
-import org.springframework.integration.dsl.jms.Jms;
-import org.springframework.integration.dsl.jms.JmsInboundGatewaySpec;
-import org.springframework.jms.listener.AbstractMessageListenerContainer;
-import org.springframework.jms.listener.DefaultMessageListenerContainer;
-
-/**
- * @author Artem Bilan
- */
-public class MessagingGateways {
-
- public AmqpInboundGatewaySpec amqp(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory,
- String... queueNames) {
- return Amqp.inboundGateway(connectionFactory, queueNames);
- }
-
- public AmqpInboundGatewaySpec amqp(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory,
- Queue... queues) {
- return Amqp.inboundGateway(connectionFactory, queues);
- }
-
- public AmqpInboundGatewaySpec amqp(SimpleMessageListenerContainer listenerContainer) {
- return (AmqpInboundGatewaySpec) Amqp.inboundGateway(listenerContainer);
- }
-
- public JmsInboundGatewaySpec.JmsInboundGatewayListenerContainerSpec jms(
- javax.jms.ConnectionFactory connectionFactory) {
- return Jms.inboundGateway(connectionFactory);
- }
-
- public
- JmsInboundGatewaySpec.JmsInboundGatewayListenerContainerSpec jms(ConnectionFactory connectionFactory,
- Class containerClass) {
- return Jms.inboundGateway(connectionFactory, containerClass);
- }
-
- public JmsInboundGatewaySpec extends JmsInboundGatewaySpec>> jms(
- AbstractMessageListenerContainer listenerContainer) {
- return Jms.inboundGateway(listenerContainer);
- }
-
- MessagingGateways() {
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/PublishSubscribeSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/PublishSubscribeSpec.java
deleted file mode 100644
index 1647ca1..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/PublishSubscribeSpec.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.concurrent.Executor;
-
-import org.springframework.integration.dsl.channel.PublishSubscribeChannelSpec;
-import org.springframework.integration.dsl.core.ComponentsRegistration;
-
-/**
- * @author Artem Bilan
- */
-public class PublishSubscribeSpec extends PublishSubscribeChannelSpec
- implements ComponentsRegistration {
-
- private final List subscriberFlows = new ArrayList();
-
- PublishSubscribeSpec() {
- super();
- }
-
- PublishSubscribeSpec(Executor executor) {
- super(executor);
- }
-
- @Override
- public PublishSubscribeSpec id(String id) {
- return super.id(id);
- }
-
- public PublishSubscribeSpec subscribe(IntegrationFlow flow) {
- IntegrationFlowBuilder flowBuilder = IntegrationFlows.from(this.channel);
- flow.accept(flowBuilder);
- this.subscriberFlows.add(flowBuilder.get());
- return _this();
- }
-
- @Override
- public Collection getComponentsToRegister() {
- return this.subscriberFlows;
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/RecipientListRouterSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/RecipientListRouterSpec.java
deleted file mode 100644
index a437e8d..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/RecipientListRouterSpec.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.springframework.integration.channel.DirectChannel;
-import org.springframework.integration.core.MessageSelector;
-import org.springframework.integration.dsl.core.ComponentsRegistration;
-import org.springframework.integration.router.RecipientListRouter;
-import org.springframework.util.Assert;
-
-/**
- * @author Artem Bilan
- */
-public class RecipientListRouterSpec extends AbstractRouterSpec
- implements ComponentsRegistration {
-
- private final List subFlows = new ArrayList();
-
- RecipientListRouterSpec() {
- super(new DslRecipientListRouter());
- }
-
- public RecipientListRouterSpec recipient(String channelName, String expression) {
- Assert.hasText(channelName);
- ((DslRecipientListRouter) this.target).add(channelName, expression);
- return _this();
- }
-
- public RecipientListRouterSpec recipient(String channelName, MessageSelector selector) {
- Assert.hasText(channelName);
- ((DslRecipientListRouter) this.target).add(channelName, selector);
- return _this();
- }
-
- public RecipientListRouterSpec recipientFlow(MessageSelector selector, IntegrationFlow subFlow) {
- Assert.notNull(subFlow);
- DirectChannel channel = populateSubFlow(subFlow);
- ((DslRecipientListRouter) this.target).add(channel, selector);
- return _this();
- }
-
- public RecipientListRouterSpec recipientFlow(String expression, IntegrationFlow subFlow) {
- Assert.notNull(subFlow);
- DirectChannel channel = populateSubFlow(subFlow);
- ((DslRecipientListRouter) this.target).add(channel, expression);
- return _this();
- }
-
- private DirectChannel populateSubFlow(IntegrationFlow subFlow) {
- DirectChannel channel = new DirectChannel();
- IntegrationFlowBuilder flowBuilder = IntegrationFlows.from(channel);
- subFlow.accept(flowBuilder);
- this.subFlows.add(flowBuilder.get());
- return channel;
- }
-
- @Override
- public Collection getComponentsToRegister() {
- return subFlows;
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/ResequencerSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/ResequencerSpec.java
deleted file mode 100644
index 2863095..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/ResequencerSpec.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import org.springframework.integration.aggregator.ResequencingMessageGroupProcessor;
-import org.springframework.integration.aggregator.ResequencingMessageHandler;
-
-/**
- * @author Artem Bilan
- */
-public class ResequencerSpec extends CorrelationHandlerSpec {
-
- private final ResequencingMessageHandler resequencingMessageHandler =
- new ResequencingMessageHandler(new ResequencingMessageGroupProcessor());
-
- ResequencerSpec() {
- }
-
- public ResequencerSpec releasePartialSequences(boolean releasePartialSequences) {
- this.resequencingMessageHandler.setReleasePartialSequences(releasePartialSequences);
- return _this();
- }
-
- @Override
- protected ResequencingMessageHandler doGet() {
- return this.configure(this.resequencingMessageHandler);
- }
-
-}
diff --git a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/RouterSpec.java b/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/RouterSpec.java
deleted file mode 100644
index b642934..0000000
--- a/spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/RouterSpec.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.dsl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.annotation.PostConstruct;
-
-import org.springframework.integration.channel.DirectChannel;
-import org.springframework.integration.dsl.core.ComponentsRegistration;
-import org.springframework.integration.router.AbstractMappingMessageRouter;
-import org.springframework.integration.router.MappingMessageRouterManagement;
-import org.springframework.integration.support.context.NamedComponent;
-import org.springframework.util.Assert;
-import org.springframework.util.StringUtils;
-
-/**
- * @author Artem Bilan
- */
-public final class RouterSpec extends AbstractRouterSpec