Class OpenEvent.Builder
java.lang.Object
cloud.opencode.base.event.OpenEvent.Builder
- Enclosing class:
OpenEvent
Builder for OpenEvent
OpenEvent构建器
- Since:
- JDK 25, opencode-base-event V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasyncDispatcher(EventDispatcher dispatcher) Set the async dispatcher 设置异步分发器asyncExecutor(ExecutorService executor) Set the async executor 设置异步执行器build()Build the OpenEvent instance 构建OpenEvent实例eventStore(EventStore store) Set the event store 设置事件存储exceptionHandler(EventExceptionHandler handler) Set the exception handler 设置异常处理器interceptor(EventInterceptor interceptor) Add an event interceptor 添加事件拦截器syncDispatcher(EventDispatcher dispatcher) Set the sync dispatcher 设置同步分发器
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
asyncExecutor
Set the async executor 设置异步执行器- Parameters:
executor- the executor service | 执行器服务- Returns:
- this builder | 此构建器
-
syncDispatcher
Set the sync dispatcher 设置同步分发器- Parameters:
dispatcher- the sync dispatcher | 同步分发器- Returns:
- this builder | 此构建器
-
asyncDispatcher
Set the async dispatcher 设置异步分发器- Parameters:
dispatcher- the async dispatcher | 异步分发器- Returns:
- this builder | 此构建器
-
eventStore
Set the event store 设置事件存储- Parameters:
store- the event store | 事件存储- Returns:
- this builder | 此构建器
-
exceptionHandler
Set the exception handler 设置异常处理器- Parameters:
handler- the exception handler | 异常处理器- Returns:
- this builder | 此构建器
-
interceptor
Add an event interceptor 添加事件拦截器- Parameters:
interceptor- the interceptor to add | 要添加的拦截器- Returns:
- this builder | 此构建器
-
build
Build the OpenEvent instance 构建OpenEvent实例- Returns:
- new OpenEvent instance | 新的OpenEvent实例
-