Uses of Class
cloud.opencode.base.event.Event
Packages that use Event
Package
Description
-
Uses of Event in cloud.opencode.base.event
Classes in cloud.opencode.base.event with type parameters of type EventModifier and TypeInterfaceDescriptioninterfaceEventListener<E extends Event>Event Listener Interface 事件监听器接口Subclasses of Event in cloud.opencode.base.eventModifier and TypeClassDescriptionclassDataEvent<T>Generic Data Event 泛型数据事件final classDead Event - Wraps events that have no subscribers 死事件 - 包装没有订阅者的事件classWaitable Event Wrapper 可等待事件包装器Methods in cloud.opencode.base.event with type parameters of type EventModifier and TypeMethodDescription<E extends Event>
EOpenEvent.getStickyEvent(Class<E> eventType) Get the last sticky event of the given type 获取指定类型的最后一个粘性事件<E extends Event>
voidOpenEvent.on(Class<E> eventType, EventListener<E> listener) Register a lambda listener for an event type (legacy void return) 为事件类型注册Lambda监听器(兼容旧接口,无返回值)<E extends Event>
voidOpenEvent.on(Class<E> eventType, EventListener<E> listener, boolean async) Register a lambda listener with async option (legacy void return) 使用异步选项注册Lambda监听器(兼容旧接口,无返回值)<E extends Event>
voidOpenEvent.on(Class<E> eventType, EventListener<E> listener, boolean async, int priority) Register a lambda listener with async and priority options (legacy void return) 使用异步和优先级选项注册Lambda监听器(兼容旧接口,无返回值)<E extends Event>
EOpenEvent.removeStickyEvent(Class<E> eventType) Remove and return the sticky event of the given type 移除并返回指定类型的粘性事件<E extends Event>
SubscriptionOpenEvent.subscribe(Class<E> eventType, EventListener<E> listener) Subscribe a listener and return a Subscription handle 订阅监听器并返回订阅句柄<E extends Event>
SubscriptionOpenEvent.subscribe(Class<E> eventType, EventListener<E> listener, Predicate<E> filter) Subscribe a listener with a filter predicate 使用过滤谓词订阅监听器<E extends Event>
SubscriptionOpenEvent.subscribe(Class<E> eventType, EventListener<E> listener, Predicate<E> filter, boolean async, int priority) Subscribe a listener with full configuration 使用完整配置订阅监听器Methods in cloud.opencode.base.event that return EventModifier and TypeMethodDescriptionDeadEvent.getOriginalEvent()Get the original event that had no subscribers 获取没有订阅者的原始事件WaitableEvent.getWrappedEvent()Get the wrapped event 获取被包装的事件Methods in cloud.opencode.base.event that return types with arguments of type EventModifier and TypeMethodDescriptionSubscription.getEventType()Get the event type this subscription is for 获取此订阅的事件类型Methods in cloud.opencode.base.event with parameters of type EventModifier and TypeMethodDescriptionvoidPublish an event synchronously 同步发布事件booleanOpenEvent.publishAndWait(Event event, Duration timeout) Publish and wait for processing to complete 发布并等待处理完成OpenEvent.publishAsync(Event event) Publish an event asynchronously 异步发布事件voidOpenEvent.publishSticky(Event event) Publish a sticky event (stored and replayed to future subscribers) 发布粘性事件(存储并重放给未来的订阅者)Constructors in cloud.opencode.base.event with parameters of type EventModifierConstructorDescriptionCreate a dead event wrapping the original unhandled event 创建包装原始未处理事件的死事件WaitableEvent(Event event) Create waitable event with new latch 创建带新锁存器的可等待事件WaitableEvent(Event event, CountDownLatch latch) Create waitable event wrapper 创建可等待事件包装器 -
Uses of Event in cloud.opencode.base.event.dispatcher
Methods in cloud.opencode.base.event.dispatcher with parameters of type EventModifier and TypeMethodDescriptionvoidDispatch event to listeners asynchronously 异步将事件分发到监听器voidDispatch event to listeners 将事件分发到监听器voidDispatch event to listeners synchronously 同步将事件分发到监听器AsyncDispatcher.dispatchAsync(Event event, List<Consumer<Event>> listeners) Dispatch event and return a future for completion 分发事件并返回完成的FutureMethod parameters in cloud.opencode.base.event.dispatcher with type arguments of type EventModifier and TypeMethodDescriptionvoidDispatch event to listeners asynchronously 异步将事件分发到监听器voidDispatch event to listeners 将事件分发到监听器voidDispatch event to listeners synchronously 同步将事件分发到监听器AsyncDispatcher.dispatchAsync(Event event, List<Consumer<Event>> listeners) Dispatch event and return a future for completion 分发事件并返回完成的Future -
Uses of Event in cloud.opencode.base.event.exception
Methods in cloud.opencode.base.event.exception that return EventModifier and TypeMethodDescriptionEventException.getEvent()Get the related event (if available) 获取相关事件(如果可用)Constructors in cloud.opencode.base.event.exception with parameters of type EventModifierConstructorDescriptionEventException(String message, Throwable cause, Event event, EventErrorCode errorCode) Create exception with all parameters 使用所有参数创建异常EventListenerException(String message, Throwable cause, Event event, EventErrorCode errorCode) Create listener exception with all parameters 使用所有参数创建监听器异常EventPublishException(String message, Throwable cause, Event event, EventErrorCode errorCode) Create publish exception with all parameters 使用所有参数创建发布异常EventSecurityException(String message, Throwable cause, Event event, EventErrorCode errorCode) Create security exception with all parameters 使用所有参数创建安全异常EventStoreException(String message, Throwable cause, Event event, EventErrorCode errorCode) Create store exception with all parameters 使用所有参数创建存储异常 -
Uses of Event in cloud.opencode.base.event.handler
Methods in cloud.opencode.base.event.handler that return EventModifier and TypeMethodDescriptionRetryExceptionHandler.FailedEvent.event()Returns the value of theeventrecord component.Methods in cloud.opencode.base.event.handler with parameters of type EventModifier and TypeMethodDescriptionvoidEventExceptionHandler.handleException(Event event, Throwable exception, String listenerName) Handle an exception that occurred during event processing 处理事件处理过程中发生的异常voidLoggingExceptionHandler.handleException(Event event, Throwable exception, String listenerName) Handle exception by logging it 通过记录日志处理异常voidRetryExceptionHandler.handleException(Event event, Throwable exception, String listenerName) Handle exception with retry logic 使用重试逻辑处理异常Method parameters in cloud.opencode.base.event.handler with type arguments of type EventModifier and TypeMethodDescriptionvoidRetryExceptionHandler.setRetryAction(Consumer<Event> retryAction) Set the retry action 设置重试动作Constructors in cloud.opencode.base.event.handler with parameters of type EventModifierConstructorDescriptionFailedEvent(Event event, Throwable exception, String listenerName, int attempts) Creates an instance of aFailedEventrecord class. -
Uses of Event in cloud.opencode.base.event.interceptor
Methods in cloud.opencode.base.event.interceptor with parameters of type EventModifier and TypeMethodDescriptiondefault voidEventInterceptor.afterPublish(Event event, boolean dispatched) Called after an event has been dispatched to listeners 在事件分发给监听器之后调用booleanEventInterceptor.beforePublish(Event event) Called before an event is dispatched to listeners 在事件分发给监听器之前调用 -
Uses of Event in cloud.opencode.base.event.security
Subclasses of Event in cloud.opencode.base.event.securityMethods in cloud.opencode.base.event.security with type parameters of type EventModifier and TypeMethodDescription<E extends Event>
voidSecureEventBus.on(Class<E> eventType, EventListener<E> listener) Register a lambda listener with security checks 使用安全检查注册Lambda监听器Methods in cloud.opencode.base.event.security with parameters of type EventModifier and TypeMethodDescriptionbooleanEventRateLimiter.allowPublish(Event event) Check if publishing is allowed 检查是否允许发布voidPublish an event with security checks 使用安全检查发布事件Method parameters in cloud.opencode.base.event.security with type arguments of type EventModifier and TypeMethodDescriptionintEventRateLimiter.getCurrentCount(Class<? extends Event> eventType) Get current count for an event type 获取事件类型的当前计数voidReset rate limit for a specific event type 重置特定事件类型的频率限制voidSet rate limit for a specific event type 为特定事件类型设置频率限制 -
Uses of Event in cloud.opencode.base.event.serialization
Methods in cloud.opencode.base.event.serialization with type parameters of type EventModifier and TypeMethodDescriptionstatic <T extends Event>
TEventSerializer.deserialize(byte[] data, Class<T> eventType) Deserializes bytes to an event.static <T extends Event>
TEventSerializer.deserializeFromString(String base64, Class<T> eventType) Deserializes a Base64 string to an event.static <T extends Event>
byte[]EventSerializer.serialize(T event) Serializes an event to bytes.EventSerializer.serializeToString(T event) Serializes an event to a Base64 string. -
Uses of Event in cloud.opencode.base.event.store
Methods in cloud.opencode.base.event.store that return EventModifier and TypeMethodDescriptionEventRecord.event()Returns the value of theeventrecord component.Methods in cloud.opencode.base.event.store with parameters of type EventModifier and TypeMethodDescriptionstatic EventRecordCreate event record from an event 从事件创建事件记录Save an event to the store 将事件保存到存储Method parameters in cloud.opencode.base.event.store with type arguments of type EventModifier and TypeMethodDescriptionEventStore.findByType(Class<? extends Event> eventType) Find all event records by event type 根据事件类型查找所有事件记录InMemoryEventStore.findByType(Class<? extends Event> eventType) booleanCheck if the event is of a specific type 检查事件是否为特定类型voidReplay events of a specific type 重放特定类型的事件voidReplay events of a specific type 重放特定类型的事件voidvoidvoidEventStore.replayByTimeRange(Instant from, Instant to, Consumer<Event> handler) Replay events within a time range 在时间范围内重放事件voidInMemoryEventStore.replayByTimeRange(Instant from, Instant to, Consumer<Event> handler) Constructors in cloud.opencode.base.event.store with parameters of type Event -
Uses of Event in cloud.opencode.base.event.testing
Classes in cloud.opencode.base.event.testing with type parameters of type EventModifier and TypeClassDescriptionclassEventCaptor<E extends Event>Event Captor - Test utility for capturing and asserting events 事件捕获器 - 用于捕获和断言事件的测试工具