diff --git a/spring-integration-mail/src/main/java/org/springframework/integration/mail/dsl/ImapMailInboundChannelAdapterSpec.java b/spring-integration-mail/src/main/java/org/springframework/integration/mail/dsl/ImapMailInboundChannelAdapterSpec.java index a6ab944049..280d3cc2c9 100644 --- a/spring-integration-mail/src/main/java/org/springframework/integration/mail/dsl/ImapMailInboundChannelAdapterSpec.java +++ b/spring-integration-mail/src/main/java/org/springframework/integration/mail/dsl/ImapMailInboundChannelAdapterSpec.java @@ -65,4 +65,19 @@ public class ImapMailInboundChannelAdapterSpec return this; } + /** + * How often to recycle the idle task (in case of a silently dropped connection). + * Seconds; default 120 (2 minutes). + * @param interval the interval. + * @return the spec. + * @see ImapMailReceiver#setCancelIdleInterval(long) + * @since 5.0.10 + */ + public ImapMailInboundChannelAdapterSpec cancelIdleInterval(long interval) { + assertReceiver(); + this.receiver.setCancelIdleInterval(interval); + return this; + } + + }