Class AsyncEmailReceiver.Builder
java.lang.Object
cloud.opencode.base.email.receiver.AsyncEmailReceiver.Builder
- Enclosing class:
AsyncEmailReceiver
Async Email Receiver Builder
异步邮件接收器构建器
- 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 async receiver 构建异步接收器config(EmailReceiveConfig config) Set the configuration (creates receiver automatically) 设置配置(自动创建接收器)executor(ExecutorService executor) Set the executor for async operations 设置异步操作的执行器receiver(cloud.opencode.base.email.internal.EmailReceiver receiver) Set the underlying receiver 设置底层接收器useVirtualThreads(boolean useVirtualThreads) Use virtual threads (default: true) 使用虚拟线程(默认:true)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
receiver
public AsyncEmailReceiver.Builder receiver(cloud.opencode.base.email.internal.EmailReceiver receiver) Set the underlying receiver 设置底层接收器- Parameters:
receiver- the receiver | 接收器- Returns:
- this builder | 构建器
-
config
Set the configuration (creates receiver automatically) 设置配置(自动创建接收器)- Parameters:
config- the receive configuration | 接收配置- Returns:
- this builder | 构建器
-
executor
Set the executor for async operations 设置异步操作的执行器- Parameters:
executor- the executor | 执行器- Returns:
- this builder | 构建器
-
useVirtualThreads
Use virtual threads (default: true) 使用虚拟线程(默认:true)- Parameters:
useVirtualThreads- true to use virtual threads | true使用虚拟线程- Returns:
- this builder | 构建器
-
build
Build the async receiver 构建异步接收器- Returns:
- the async receiver | 异步接收器
-