Class EmailIdleMonitor.Builder
java.lang.Object
cloud.opencode.base.email.listener.EmailIdleMonitor.Builder
- Enclosing class:
EmailIdleMonitor
Email IDLE Monitor Builder
邮件IDLE监控器构建器
- Since:
- JDK 25, opencode-base-email V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the monitor 构建监控器config(EmailReceiveConfig config) Set the receive configuration 设置接收配置Set the folder to monitor 设置要监控的文件夹idleTimeout(Duration timeout) Set IDLE timeout 设置IDLE超时listener(EmailListener listener) Add a listener 添加监听器maxReconnectAttempts(int attempts) Set max reconnection attempts 设置最大重连次数onNewEmail(Consumer<ReceivedEmail> handler) Add a simple new email handler 添加简单的新邮件处理器reconnectDelay(Duration delay) Set reconnection delay 设置重连延迟
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
config
Set the receive configuration 设置接收配置- Parameters:
config- the configuration | 配置- Returns:
- this builder | 构建器
-
folder
Set the folder to monitor 设置要监控的文件夹- Parameters:
folder- the folder name | 文件夹名称- Returns:
- this builder | 构建器
-
listener
Add a listener 添加监听器- Parameters:
listener- the listener | 监听器- Returns:
- this builder | 构建器
-
onNewEmail
Add a simple new email handler 添加简单的新邮件处理器- Parameters:
handler- the handler | 处理器- Returns:
- this builder | 构建器
-
idleTimeout
Set IDLE timeout 设置IDLE超时- Parameters:
timeout- the timeout | 超时时间- Returns:
- this builder | 构建器
-
maxReconnectAttempts
Set max reconnection attempts 设置最大重连次数- Parameters:
attempts- the max attempts | 最大次数- Returns:
- this builder | 构建器
-
reconnectDelay
Set reconnection delay 设置重连延迟- Parameters:
delay- the delay | 延迟- Returns:
- this builder | 构建器
-
build
-