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:
@@ -32,7 +32,7 @@ public class AwsNamespaceHandler extends AbstractIntegrationNamespaceHandler {
|
||||
registerBeanDefinitionParser("s3-outbound-channel-adapter", new S3OutboundChannelAdapterParser());
|
||||
registerBeanDefinitionParser("s3-outbound-gateway", new S3OutboundGatewayParser());
|
||||
registerBeanDefinitionParser("s3-inbound-channel-adapter", new S3InboundChannelAdapterParser());
|
||||
registerBeanDefinitionParser("s3-inbound-streaming-channel-adapter", new S3InboundStreamingChannelAdapterParser());
|
||||
registerBeanDefinitionParser("s3-inbound-streaming-channel-adapter", new S3StreamingInboundChannelAdapterParser());
|
||||
registerBeanDefinitionParser("sqs-outbound-channel-adapter", new SqsOutboundChannelAdapterParser());
|
||||
registerBeanDefinitionParser("sqs-message-driven-channel-adapter", new SqsMessageDrivenChannelAdapterParser());
|
||||
registerBeanDefinitionParser("sns-inbound-channel-adapter", new SnsInboundChannelAdapterParser());
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.integration.aws.config.xml;
|
||||
|
||||
import org.springframework.integration.aws.inbound.S3InboundStreamingMessageSource;
|
||||
import org.springframework.integration.aws.inbound.S3StreamingMessageSource;
|
||||
import org.springframework.integration.aws.support.S3RemoteFileTemplate;
|
||||
import org.springframework.integration.aws.support.filters.S3RegexPatternFileListFilter;
|
||||
import org.springframework.integration.aws.support.filters.S3SimplePatternFileListFilter;
|
||||
@@ -31,7 +31,7 @@ import org.springframework.integration.file.remote.RemoteFileOperations;
|
||||
* @author Christian Tzolov
|
||||
* @since 1.1
|
||||
*/
|
||||
public class S3InboundStreamingChannelAdapterParser extends AbstractRemoteFileStreamingInboundChannelAdapterParser {
|
||||
public class S3StreamingInboundChannelAdapterParser extends AbstractRemoteFileStreamingInboundChannelAdapterParser {
|
||||
|
||||
@Override
|
||||
protected Class<? extends RemoteFileOperations<?>> getTemplateClass() {
|
||||
@@ -40,7 +40,7 @@ public class S3InboundStreamingChannelAdapterParser extends AbstractRemoteFileSt
|
||||
|
||||
@Override
|
||||
protected Class<? extends MessageSource<?>> getMessageSourceClass() {
|
||||
return S3InboundStreamingMessageSource.class;
|
||||
return S3StreamingMessageSource.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -34,14 +34,14 @@ import com.amazonaws.services.s3.model.S3ObjectSummary;
|
||||
* @author Christian Tzolov
|
||||
* @since 1.1
|
||||
*/
|
||||
public class S3InboundStreamingMessageSource extends AbstractRemoteFileStreamingMessageSource<S3ObjectSummary> {
|
||||
public class S3StreamingMessageSource extends AbstractRemoteFileStreamingMessageSource<S3ObjectSummary> {
|
||||
|
||||
public S3InboundStreamingMessageSource(RemoteFileTemplate<S3ObjectSummary> template) {
|
||||
public S3StreamingMessageSource(RemoteFileTemplate<S3ObjectSummary> template) {
|
||||
super(template, null);
|
||||
}
|
||||
|
||||
public S3InboundStreamingMessageSource(RemoteFileTemplate<S3ObjectSummary> template,
|
||||
Comparator<AbstractFileInfo<S3ObjectSummary>> comparator) {
|
||||
public S3StreamingMessageSource(RemoteFileTemplate<S3ObjectSummary> template,
|
||||
Comparator<AbstractFileInfo<S3ObjectSummary>> comparator) {
|
||||
super(template, comparator);
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Configures a 'SourcePollingChannelAdapter' Endpoint for the
|
||||
'org.springframework.integration.aws.inbound.S3InboundStreamingMessageSource'.
|
||||
'org.springframework.integration.aws.inbound.S3StreamingMessageSource'.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
|
||||
@@ -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())
|
||||
@@ -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"));
|
||||
Reference in New Issue
Block a user