Skip to content

Commit e3c4175

Browse files
garyrussellartembilan
authored andcommitted
INT-4546: Expose IMAP cancel interval via DSL
JIRA: https://jira.spring.io/browse/INT-4546 (cherry picked from commit 743afaf)
1 parent ce78a26 commit e3c4175

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

spring-integration-mail/src/main/java/org/springframework/integration/mail/dsl/ImapMailInboundChannelAdapterSpec.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,19 @@ public ImapMailInboundChannelAdapterSpec shouldMarkMessagesAsRead(boolean should
6565
return this;
6666
}
6767

68+
/**
69+
* How often to recycle the idle task (in case of a silently dropped connection).
70+
* Seconds; default 120 (2 minutes).
71+
* @param interval the interval.
72+
* @return the spec.
73+
* @see ImapMailReceiver#setCancelIdleInterval(long)
74+
* @since 5.0.10
75+
*/
76+
public ImapMailInboundChannelAdapterSpec cancelIdleInterval(long interval) {
77+
assertReceiver();
78+
this.receiver.setCancelIdleInterval(interval);
79+
return this;
80+
}
81+
82+
6883
}

0 commit comments

Comments
 (0)