Removing usage of the Subscription object, and resolved issue with 'auto-create' channels for SourceEndpoints (INT-235).

This commit is contained in:
Mark Fisher
2008-07-04 21:31:25 +00:00
parent 0aa00b969b
commit 96b22fd01b
22 changed files with 137 additions and 143 deletions

View File

@@ -42,7 +42,8 @@ public class ByteStreamSourceTests {
ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
MessageChannel channel = new QueueChannel();
ByteStreamSource source = new ByteStreamSource(stream);
SourceEndpoint endpoint = new SourceEndpoint(source, channel);
SourceEndpoint endpoint = new SourceEndpoint(source);
endpoint.setOutputChannel(channel);
endpoint.afterPropertiesSet();
endpoint.send(new CommandMessage(new PollCommand()));
Message<?> message1 = channel.receive(500);
@@ -67,7 +68,8 @@ public class ByteStreamSourceTests {
source.setBytesPerMessage(4);
PollingSchedule schedule = new PollingSchedule(1000);
schedule.setInitialDelay(10000);
SourceEndpoint endpoint = new SourceEndpoint(source, channel);
SourceEndpoint endpoint = new SourceEndpoint(source);
endpoint.setOutputChannel(channel);
endpoint.afterPropertiesSet();
endpoint.send(new CommandMessage(new PollCommand()));
Message<?> message1 = channel.receive(0);
@@ -89,7 +91,8 @@ public class ByteStreamSourceTests {
source.setShouldTruncate(false);
PollingSchedule schedule = new PollingSchedule(1000);
schedule.setInitialDelay(10000);
SourceEndpoint endpoint = new SourceEndpoint(source, channel);
SourceEndpoint endpoint = new SourceEndpoint(source);
endpoint.setOutputChannel(channel);
endpoint.afterPropertiesSet();
endpoint.send(new CommandMessage(new PollCommand()));
Message<?> message1 = channel.receive(0);

View File

@@ -43,7 +43,8 @@ public class CharacterStreamSourceTests {
CharacterStreamSource source = new CharacterStreamSource(reader);
PollingSchedule schedule = new PollingSchedule(1000);
schedule.setInitialDelay(10000);
SourceEndpoint endpoint = new SourceEndpoint(source, channel);
SourceEndpoint endpoint = new SourceEndpoint(source);
endpoint.setOutputChannel(channel);
endpoint.afterPropertiesSet();
endpoint.send(new CommandMessage(new PollCommand()));
Message<?> message1 = channel.receive(0);