Add Reactive mode for AbstractPollingEndpoint (#2429)
* Add Reactive mode for AbstractPollingEndpoint * When `SourcePollingChannelAdapter.outputChannel` is a `ReactiveStreamsSubscribableChannel`, use `Flux.generate()` for polling * Refactor `AbstractPollingEndpoint` to remove redundant `Poller` class in favor of lambda * Extract `pollForMessage()` method to handle TX states instead of `Poller` class previously * * Rebase and fix conflicts * Polishing for GatewayProxyFactoryBeanTests
This commit is contained in:
committed by
Gary Russell
parent
76b1d1df06
commit
27353ed393
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -36,6 +36,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Gunnar Hillert
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
*/
|
||||
@ContextConfiguration
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@@ -49,16 +50,16 @@ public class FtpsInboundChannelAdapterParserTests {
|
||||
private MessageChannel ftpChannel;
|
||||
|
||||
@Test
|
||||
public void testFtpsInboundChannelAdapterComplete() throws Exception {
|
||||
public void testFtpsInboundChannelAdapterComplete() {
|
||||
assertEquals("ftpInbound", ftpInbound.getComponentName());
|
||||
assertEquals("ftp:inbound-channel-adapter", ftpInbound.getComponentType());
|
||||
assertNotNull(TestUtils.getPropertyValue(ftpInbound, "poller"));
|
||||
assertNotNull(TestUtils.getPropertyValue(ftpInbound, "pollingTask"));
|
||||
assertEquals(this.ftpChannel, TestUtils.getPropertyValue(ftpInbound, "outputChannel"));
|
||||
FtpInboundFileSynchronizingMessageSource inbound =
|
||||
(FtpInboundFileSynchronizingMessageSource) TestUtils.getPropertyValue(ftpInbound, "source");
|
||||
(FtpInboundFileSynchronizingMessageSource) TestUtils.getPropertyValue(ftpInbound, "source");
|
||||
|
||||
FtpInboundFileSynchronizer fisync =
|
||||
(FtpInboundFileSynchronizer) TestUtils.getPropertyValue(inbound, "synchronizer");
|
||||
(FtpInboundFileSynchronizer) TestUtils.getPropertyValue(inbound, "synchronizer");
|
||||
assertNotNull(TestUtils.getPropertyValue(fisync, "filter"));
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user