Package | Description |
---|---|
org.dromara.hutool.core.lang.event |
发布订阅模式封装,发布/订阅是一种消息范式
消息的发送者(EventPublisher)将事件或消息(Event)广播出去,订阅者(Subscriber)接收到消息后处理。 |
Modifier and Type | Class and Description |
---|---|
class |
SourceEvent
基于事件源的事件实现
|
Modifier and Type | Method and Description |
---|---|
void |
SimpleEventPublisher.publish(Event event) |
void |
EventPublisher.publish(Event event)
发布事件,事件发布者将事件发布给所有订阅者
|
void |
Subscriber.update(Event event)
当事件发生时的操作
|
Copyright © 2025. All rights reserved.