public abstract class AbstractEventPublisher<E> extends java.lang.Object implements EventPublisher<E>, org.springframework.context.ApplicationEventPublisherAware
CustomApplicationEventChannel, DefaultEventChannel| Constructor and Description |
|---|
AbstractEventPublisher(FrameworkAutoConfiguration.EventProperties properties) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
broadcast(E event,
java.lang.String[] channels)
广播事件。
|
void |
publish(E event)
发布事件。被
ShouldBroadcast标注的事件将通过其指定的频道发送广播。 |
void |
publishToLocalOnly(E event)
仅在本地(当前ApplicationContext)发布事件,不对外广播。
|
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) |
public AbstractEventPublisher(FrameworkAutoConfiguration.EventProperties properties)
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAwarepublic void publishToLocalOnly(E event)
EventPublisherpublishToLocalOnly in interface EventPublisher<E>public void publish(E event)
EventPublisherShouldBroadcast标注的事件将通过其指定的频道发送广播。publish in interface EventPublisher<E>protected abstract void broadcast(E event, java.lang.String[] channels)
event - 事件channels - 频道