本文整理汇总了Java中org.sonatype.sisu.goodies.eventbus.EventBus类的典型用法代码示例。如果您正苦于以下问题:Java EventBus类的具体用法?Java EventBus怎么用?Java EventBus使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EventBus类属于org.sonatype.sisu.goodies.eventbus包,在下文中一共展示了EventBus类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ReplicationPlugin
import org.sonatype.sisu.goodies.eventbus.EventBus; //导入依赖的package包/类
/**
* Initializes plugin and registers deploy event handler
* @param eventBus Global nexus event bus
* @param uploadEventListener Deploy event handler
*/
@Inject
public ReplicationPlugin(EventBus eventBus, @Named(UploadEventListenerImpl.ID) UploadEventListener uploadEventListener) throws Exception {
super(GROUP_ID, ARTIFACT_ID);
eventBus.register(Preconditions.checkNotNull(uploadEventListener));
}
示例2: VictimsNexusScannerProcessor
import org.sonatype.sisu.goodies.eventbus.EventBus; //导入依赖的package包/类
@Inject
public VictimsNexusScannerProcessor(final EventBus eventBus,
final List<VictimsNexusScanner> scanners) {
VictimsConfig.configureVictimsOptions();
this.eventBus = Preconditions.checkNotNull(eventBus);
this.scanners = Preconditions.checkNotNull(scanners);
for (VictimsNexusScanner scanner : scanners) {
log.debug("Scanner: {}", scanner);
}
}