Files
spring-integration-samples/basic/ftp
Spring Operator fce2acb3fa URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://services.gradle.org/distributions/gradle- (404) with 1 occurrences migrated to:
  https://services.gradle.org/distributions/gradle- ([https](https://services.gradle.org/distributions/gradle-) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://maven.apache.org/xsd/maven-4.0.0.xsd with 63 occurrences migrated to:
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).
* http://www.apache.org/licenses/LICENSE-2.0 with 4 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
* http://www.apache.org/licenses/LICENSE-2.0.txt with 64 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0.txt ([https](https://www.apache.org/licenses/LICENSE-2.0.txt) result 200).
* http://projects.spring.io/spring-integration with 64 occurrences migrated to:
  https://projects.spring.io/spring-integration ([https](https://projects.spring.io/spring-integration) result 301).
* http://repo.spring.io/libs-milestone with 2 occurrences migrated to:
  https://repo.spring.io/libs-milestone ([https](https://repo.spring.io/libs-milestone) result 302).
* http://repo.spring.io/libs-snapshot with 2 occurrences migrated to:
  https://repo.spring.io/libs-snapshot ([https](https://repo.spring.io/libs-snapshot) result 302).
* http://repo.spring.io/libs-staging-local with 1 occurrences migrated to:
  https://repo.spring.io/libs-staging-local ([https](https://repo.spring.io/libs-staging-local) result 302).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 126 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 63 occurrences
2019-03-16 12:52:58 -04:00
..
2010-11-18 11:12:35 -05:00
2019-03-16 12:52:58 -04:00

FTP Samples

Introduction

This example demonstrates the following aspects of the FTP support available with Spring Integration:

  1. Transfer local files via the FTP Outbound Channel Adapter to a remote directory
  2. Poll for remote files using the FTP Inbound Channel Adapter
  3. Execute explicit FTP command (LS, RM) in order to retrieve a remote file listing and to subsequently delete those files.

Setup

The samples work out of the box using an embedded Apache FTP Server. Simply execute:

$ gradlew :ftp:run

and the samples are build as well as executed. The samples are part of a JUnit test suite:

org.springframework.integration.samples.ftp.TestSuite.java

which comprises the following tests that correspond to the scenarios outlined above:

  • org.springframework.integration.samples.ftp.FtpOutboundChannelAdapterSample.class,
  • org.springframework.integration.samples.ftp.FtpInboundChannelAdapterSample.class,
  • org.springframework.integration.samples.ftp.FtpOutboundGatewaySample.class

Keep in mind that the tests are meant to be executed in sequence.

The Scenarios

Outbound Channel Adapter

This sample will take 2 local files

  1. a.txt
  2. b.txt

and transfer them to a remote directory '/'.

Inbound Channel Adapter

This test will use the 2 files previously uploaded. Using an Inbound Channel Adapter, the test will poll the remote (Root) directory that will contain 2 files. The adapter will attempt to transfer them to a local directory, which will be generated. Once copied, the files will be sent as a payload of the message to a channel. We are using a file filter, transferring only files that end with 'txt'. The remote files are not deleted.

Outbound Gateway

The last test will re-use the 2 files that are still on the remote FTP server. This test will retrieve and removes them through explicit FTP commands (ls and rm).