1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| class Receiver implements MicroBus.BusEventReceiver {
public onCreate() { bus.register(this, String.class); }
public onDestroy() { bus.unregister(this, String.class); }
@Override public void onBusEvent(Object event) { if (event instanceof String) System.out.println("Hello, " + event); } }
|