Package | Description |
---|---|
org.dromara.hutool.core.lang.event |
发布订阅模式封装,发布/订阅是一种消息范式
消息的发送者(EventPublisher)将事件或消息(Event)广播出去,订阅者(Subscriber)接收到消息后处理。 |
Modifier and Type | Class and Description |
---|---|
class |
SimpleEventPublisher
简单的事件发布者实现,基于
Subscriber 和Event 实现 |
Modifier and Type | Method and Description |
---|---|
EventPublisher |
SimpleEventPublisher.register(Subscriber subscriber) |
EventPublisher |
EventPublisher.register(Subscriber subscriber)
注册订阅者,订阅者将接收到所有发布者发布的事件
|
Copyright © 2025. All rights reserved.