INT-847 Upgrading to Spring 3.0 snapshot (CI-475 from 2009/11/25).
This commit is contained in:
@@ -41,8 +41,6 @@ public class ImapIdleChannelAdapter extends MessageProducerSupport {
|
||||
|
||||
private final IdleTask idleTask = new IdleTask();
|
||||
|
||||
private volatile boolean autoStartup = true;
|
||||
|
||||
private volatile boolean shouldReconnectAutomatically = true;
|
||||
|
||||
private volatile TaskExecutor taskExecutor;
|
||||
@@ -65,10 +63,6 @@ public class ImapIdleChannelAdapter extends MessageProducerSupport {
|
||||
this.shouldReconnectAutomatically = shouldReconnectAutomatically;
|
||||
}
|
||||
|
||||
public void setAutoStartup(boolean autoStartup) {
|
||||
this.autoStartup = autoStartup;
|
||||
}
|
||||
|
||||
public void setTaskExecutor(TaskExecutor taskExecutor) {
|
||||
this.taskExecutor = taskExecutor;
|
||||
}
|
||||
@@ -79,16 +73,6 @@ public class ImapIdleChannelAdapter extends MessageProducerSupport {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onInit() {
|
||||
if (this.autoStartup) {
|
||||
this.setStartupMode(StartupMode.ON_CONTEXT_REFRESH);
|
||||
}
|
||||
else {
|
||||
this.setStartupMode(StartupMode.MANUAL);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Lifecycle implementation
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,6 @@ import org.springframework.beans.DirectFieldAccessor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
|
||||
import org.springframework.integration.endpoint.AbstractEndpoint.StartupMode;
|
||||
import org.springframework.integration.mail.ImapMailReceiver;
|
||||
import org.springframework.integration.mail.MailReceivingMessageSource;
|
||||
import org.springframework.integration.mail.Pop3MailReceiver;
|
||||
@@ -53,7 +52,7 @@ public class PollingMailSourceParserTests {
|
||||
Object adapter = context.getBean("imapAdapter");
|
||||
assertEquals(SourcePollingChannelAdapter.class, adapter.getClass());
|
||||
DirectFieldAccessor adapterAccessor = new DirectFieldAccessor(adapter);
|
||||
assertEquals(StartupMode.MANUAL, adapterAccessor.getPropertyValue("startupMode"));
|
||||
assertEquals(Boolean.FALSE, adapterAccessor.getPropertyValue("autoStartup"));
|
||||
Object channel = context.getBean("channel");
|
||||
assertEquals(channel, adapterAccessor.getPropertyValue("outputChannel"));
|
||||
Object source = adapterAccessor.getPropertyValue("source");
|
||||
@@ -72,7 +71,7 @@ public class PollingMailSourceParserTests {
|
||||
Object adapter = context.getBean("pop3Adapter");
|
||||
assertEquals(SourcePollingChannelAdapter.class, adapter.getClass());
|
||||
DirectFieldAccessor adapterAccessor = new DirectFieldAccessor(adapter);
|
||||
assertEquals(StartupMode.MANUAL, adapterAccessor.getPropertyValue("startupMode"));
|
||||
assertEquals(Boolean.FALSE, adapterAccessor.getPropertyValue("autoStartup"));
|
||||
Object channel = context.getBean("channel");
|
||||
assertEquals(channel, adapterAccessor.getPropertyValue("outputChannel"));
|
||||
Object source = adapterAccessor.getPropertyValue("source");
|
||||
|
||||
Reference in New Issue
Block a user