Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
/ TinyEventBus Public archive

Tiny and fast pubsub implementation with subscriber priorities and event canceling for Java 8, 11 and 17.

License

Notifications You must be signed in to change notification settings

nothub/TinyEventBus

Repository files navigation

TinyEventBus

maven central

Tiny and fast pubsub implementation with subscriber priorities and event canceling for Java.


usage
void run() {
    Bus bus = new Bus();
    bus.reg(Sub.of(String.class, System.out::println));
    bus.pub("Hello World!");
}
class Listenable {
    Sub<Long> sub = Sub.of(Long.class, l -> Foo.bar(l));
    void run() {
        Bus bus = new Bus();
        bus.reg(this);
        bus.pub(42L);
    }
}

For more explanation, check the example .

About

Tiny and fast pubsub implementation with subscriber priorities and event canceling for Java 8, 11 and 17.

Topics

Resources

License

Stars

Watchers

Forks