Interface EventPubSub<E>
-
- All Known Implementing Classes:
AbstractEventPubSub
public interface EventPubSub<E>发布及广播事件。 广播指发布到当前ApplicationContext之外。
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCustomApplicationEventChannelstatic java.lang.StringDefaultEventChannel
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<java.lang.String>getListeningChannels()voidpublish(E event)发布事件。被ShouldBroadcast标注的事件将通过其指定的频道发送广播。voidpublishToLocalOnly(E event)仅在本地(当前ApplicationContext)发布事件,不对外广播。
-
-
-
Field Detail
-
DefaultEventChannel
static final java.lang.String DefaultEventChannel
- See Also:
- Constant Field Values
-
CustomApplicationEventChannel
static final java.lang.String CustomApplicationEventChannel
- See Also:
- Constant Field Values
-
-
Method Detail
-
publishToLocalOnly
void publishToLocalOnly(E event)
仅在本地(当前ApplicationContext)发布事件,不对外广播。
-
publish
void publish(E event)
发布事件。被ShouldBroadcast标注的事件将通过其指定的频道发送广播。
-
getListeningChannels
java.util.Set<java.lang.String> getListeningChannels()
-
-