List of usage examples for com.google.common.eventbus EventBus EventBus
public EventBus()
From source file:tech.codemaster.bat50question.guava.EventBusExample.java
public static void main(String... args) { EventBus eventBus = new EventBus(); eventBus.register(new EventBusChangeRecorder()); eventBus.post("tomdeng"); }
From source file:name.yumao.douyu.http.PlaylistDownloader33333.java
public static void main(String[] args) { JTextField inNum = new JTextField(10); inNum.setText("212689"); EventBus eventBus = new EventBus(); new PlaylistDownloader33333(inNum, eventBus).go(); }
From source file:com.kamike.watch.EventInst.java
private EventInst() { eventBus = new EventBus(); asyncEventBus = new AsyncEventBus(Executors.newFixedThreadPool(5)); }
From source file:com.notes.listen.EventInst.java
private EventInst() { eventBus = new EventBus(); asyncEventBus = new AsyncEventBus(Executors.newFixedThreadPool(50)); asyncEventBus.register(fs); }
From source file:simplephotoviewer.data.centerpane.FilesData.java
public void currentDirectoryChange(File e) { System.out.println("Got file... " + e.getAbsolutePath()); EventBus eventBus = new EventBus(); // somewhere during initialization eventBus.register(filesHandler);/*ww w . j a v a 2s . c om*/ File tf = new File(e.getAbsolutePath()); eventBus.post(tf); }
From source file:pl.iz.cubicrl.model.core.GameEventBus.java
public GameEventBus() { eventBus = new EventBus(); subscribers = new ArrayList<>(); }
From source file:com.morevaadin.eventbus.ui.AggregateView.java
public AggregateView() { EventBus bus = new EventBus(); FormLayout layout = new FormLayout(); FirstComponent first = new FirstComponent(bus); SecondComponent second = new SecondComponent(); bus.register(second);/* ww w . ja va2s . c o m*/ layout.addComponent(first); layout.addComponent(second); setCompositionRoot(layout); }
From source file:com.webbfontaine.valuewebb.irms.eventbus.VWEventBus.java
protected VWEventBus(String name, ExecutorService executorService) { eventBus = new EventBus(); registerDeadEventHandler(eventBus);/* w w w . j a va 2 s .c o m*/ asyncEventBus = new AsyncEventBus(name, executorService); registerDeadEventHandler(asyncEventBus); this.executorService = executorService; }
From source file:com.imag.nespros.network.routing.PubSubService.java
/** * publish an event to the event bus associated to his topic * * @param evt the event to publish//from w ww.j a va 2 s.c om * @param topic the topic to publish to * @return * */ public long publish(Object evt, String topic) { EventBus eBus; if (!_topicBus.containsKey(topic)) { eBus = new EventBus(); _topicBus.put(topic, eBus); } else { eBus = _topicBus.get(topic); } if (evt != null) { eBus.post(evt); } return System.currentTimeMillis(); }
From source file:org.openhab.binding.ekozefir.internal.EkozefirBus.java
public EkozefirBus() { this.bus = new EventBus(); }