类 AbstractEventPublisher<E>
- java.lang.Object
-
- me.insidezhou.southernquiet.event.driver.AbstractEventPublisher<E>
-
- 所有已实现的接口:
EventPublisher<E>,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationEventPublisherAware
public abstract class AbstractEventPublisher<E> extends java.lang.Object implements EventPublisher<E>, org.springframework.context.ApplicationEventPublisherAware
-
-
字段概要
-
从接口继承的字段 me.insidezhou.southernquiet.event.EventPublisher
CustomApplicationEventChannel, DefaultEventChannel
-
-
构造器概要
构造器 构造器 说明 AbstractEventPublisher(FrameworkAutoConfiguration.EventProperties properties)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected abstract voidbroadcast(E event, java.lang.String[] channels)广播事件。voidpublish(E event)发布事件。voidpublishToLocalOnly(E event)仅在本地(当前ApplicationContext)发布事件,不对外广播。voidsetApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
-
-
-
构造器详细资料
-
AbstractEventPublisher
public AbstractEventPublisher(FrameworkAutoConfiguration.EventProperties properties)
-
-
方法详细资料
-
setApplicationEventPublisher
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
- 指定者:
setApplicationEventPublisher在接口中org.springframework.context.ApplicationEventPublisherAware
-
publishToLocalOnly
public void publishToLocalOnly(E event)
从接口复制的说明:EventPublisher仅在本地(当前ApplicationContext)发布事件,不对外广播。- 指定者:
publishToLocalOnly在接口中EventPublisher<E>
-
publish
public void publish(E event)
从接口复制的说明:EventPublisher发布事件。被ShouldBroadcast标注的事件将通过其指定的频道发送广播。- 指定者:
publish在接口中EventPublisher<E>
-
broadcast
protected abstract void broadcast(E event, java.lang.String[] channels)
广播事件。- 参数:
event- 事件channels- 频道
-
-