GH-54: Rename S3StreamingMessageSource

Fixes GH-54 (https://github.com/spring-projects/spring-integration-aws/issues/54)

For consistency with other `AbstractRemoteFileStreamingMessageSource` implementations (e.g. `FtpStreamingMessageSource`) rename `S3InboundStreamingMessageSource` to the `S3StreamingMessageSource`

Since there was no any Milestones for the `1.1` version yet, it is safe to do this renaming breaking change
This commit is contained in:
Artem Bilan
2016-11-28 15:27:02 -05:00
parent 1eab3c0d98
commit 0e31261545
7 changed files with 16 additions and 16 deletions

View File

@@ -27,7 +27,7 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.expression.Expression;
import org.springframework.integration.aws.inbound.S3InboundStreamingMessageSource;
import org.springframework.integration.aws.inbound.S3StreamingMessageSource;
import org.springframework.integration.aws.support.filters.S3PersistentAcceptOnceFileListFilter;
import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
import org.springframework.integration.file.remote.session.SessionFactory;
@@ -43,7 +43,7 @@ import org.springframework.util.ReflectionUtils;
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
public class S3InboundStreamingChannelAdapterParserTests {
public class S3StreamingInboundChannelAdapterParserTests {
@Autowired
private SourcePollingChannelAdapter s3Inbound;
@@ -68,8 +68,8 @@ public class S3InboundStreamingChannelAdapterParserTests {
assertThat(this.s3Inbound.getComponentType()).isEqualTo("aws:s3-inbound-streaming-channel-adapter");
assertThat(TestUtils.getPropertyValue(this.s3Inbound, "outputChannel")).isSameAs(this.s3Channel);
S3InboundStreamingMessageSource source = TestUtils.getPropertyValue(this.s3Inbound, "source",
S3InboundStreamingMessageSource.class);
S3StreamingMessageSource source = TestUtils.getPropertyValue(this.s3Inbound, "source",
S3StreamingMessageSource.class);
assertThat(TestUtils.getPropertyValue(source, "remoteDirectoryExpression", Expression.class)
.getExpressionString())

View File

@@ -71,7 +71,7 @@ import com.amazonaws.services.s3.model.S3ObjectSummary;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
@DirtiesContext
public class S3InboundStreamingChannelAdapterTests {
public class S3StreamingChannelAdapterTests {
@ClassRule
public static final TemporaryFolder TEMPORARY_FOLDER = new TemporaryFolder();
@@ -169,10 +169,10 @@ public class S3InboundStreamingChannelAdapterTests {
@Bean
@InboundChannelAdapter(value = "s3FilesChannel", poller = @Poller(fixedDelay = "100"))
public S3InboundStreamingMessageSource s3InboundStreamingMessageSource(AmazonS3 amazonS3) {
public S3StreamingMessageSource s3InboundStreamingMessageSource(AmazonS3 amazonS3) {
S3SessionFactory s3SessionFactory = new S3SessionFactory(amazonS3);
S3RemoteFileTemplate s3FileTemplate = new S3RemoteFileTemplate(s3SessionFactory);
S3InboundStreamingMessageSource s3MessageSource = new S3InboundStreamingMessageSource(s3FileTemplate,
S3StreamingMessageSource s3MessageSource = new S3StreamingMessageSource(s3FileTemplate,
(o1, o2) -> o1.getFilename().compareTo(o2.getFilename()));
s3MessageSource.setRemoteDirectory(S3_BUCKET);
s3MessageSource.setFilter(new S3PersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "streaming"));