From 2e9beada0bf7752cc7aa7a11c8bb54d3e388aa48 Mon Sep 17 00:00:00 2001 From: freyan929 <67872794+freyan929@users.noreply.github.com> Date: Mon, 25 Jul 2022 18:46:14 -0700 Subject: [PATCH] GH-3858: Add ImapIdleChASpec.reconnectDelay() Fixes https://github.com/spring-projects/spring-integration/issues/3858 --- .../mail/dsl/ImapIdleChannelAdapterSpec.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/spring-integration-mail/src/main/java/org/springframework/integration/mail/dsl/ImapIdleChannelAdapterSpec.java b/spring-integration-mail/src/main/java/org/springframework/integration/mail/dsl/ImapIdleChannelAdapterSpec.java index 91f814fcee..03bc494309 100644 --- a/spring-integration-mail/src/main/java/org/springframework/integration/mail/dsl/ImapIdleChannelAdapterSpec.java +++ b/spring-integration-mail/src/main/java/org/springframework/integration/mail/dsl/ImapIdleChannelAdapterSpec.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2021 the original author or authors. + * Copyright 2014-2022 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. @@ -52,6 +52,7 @@ import org.springframework.util.Assert; * * @author Gary Russell * @author Artem Bilan + * @author Freya Nair * * @since 5.0 */ @@ -383,6 +384,17 @@ public class ImapIdleChannelAdapterSpec return this; } + /** + * The time between connection attempts in milliseconds (default 10 seconds). + * @param reconnectDelay the reconnectDelay to set. + * @return the spec. + * @since 6.0 + */ + public ImapIdleChannelAdapterSpec reconnectDelay(long reconnectDelay) { + this.target.setReconnectDelay(reconnectDelay); + return this; + } + /** * Determine how the content is rendered. * @param simpleContent true for simple content.