Class AsyncEmailSender.Builder
java.lang.Object
cloud.opencode.base.email.sender.AsyncEmailSender.Builder
- Enclosing class:
AsyncEmailSender
Builder for AsyncEmailSender
AsyncEmailSender构建器
- 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 sender 构建异步发送器config(EmailConfig config) Set delegate sender from config 从配置设置代理发送器corePoolSize(int corePoolSize) Set core pool size (for platform threads) 设置核心线程池大小(用于平台线程)executor(ExecutorService executor) Set custom executor 设置自定义执行器maxPoolSize(int maxPoolSize) Set max pool size (for platform threads) 设置最大线程池大小(用于平台线程)queueCapacity(int queueCapacity) Set queue capacity (for platform threads) 设置队列容量(用于平台线程)retryExecutor(EmailRetryExecutor retryExecutor) Set retry executor 设置重试执行器sender(cloud.opencode.base.email.internal.EmailSender sender) Set delegate sender 设置代理发送器threadNamePrefix(String prefix) Set thread name prefix 设置线程名称前缀useVirtualThreads(boolean useVirtualThreads) Use virtual threads (default: true) 使用虚拟线程(默认: true)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
sender
Set delegate sender 设置代理发送器- Parameters:
sender- the sender | 发送器- Returns:
- this builder | 构建器
-
config
Set delegate sender from config 从配置设置代理发送器- Parameters:
config- the email config | 邮件配置- Returns:
- this builder | 构建器
-
executor
Set custom executor 设置自定义执行器- Parameters:
executor- the executor | 执行器- Returns:
- this builder | 构建器
-
retryExecutor
Set retry executor 设置重试执行器- Parameters:
retryExecutor- the retry executor | 重试执行器- Returns:
- this builder | 构建器
-
corePoolSize
Set core pool size (for platform threads) 设置核心线程池大小(用于平台线程)- Parameters:
corePoolSize- core pool size | 核心线程池大小- Returns:
- this builder | 构建器
-
maxPoolSize
Set max pool size (for platform threads) 设置最大线程池大小(用于平台线程)- Parameters:
maxPoolSize- max pool size | 最大线程池大小- Returns:
- this builder | 构建器
-
queueCapacity
Set queue capacity (for platform threads) 设置队列容量(用于平台线程)- Parameters:
queueCapacity- queue capacity | 队列容量- Returns:
- this builder | 构建器
-
threadNamePrefix
Set thread name prefix 设置线程名称前缀- Parameters:
prefix- the prefix | 前缀- Returns:
- this builder | 构建器
-
useVirtualThreads
Use virtual threads (default: true) 使用虚拟线程(默认: true)- Parameters:
useVirtualThreads- true to use virtual threads | true使用虚拟线程- Returns:
- this builder | 构建器
-
build
-