SkillAgentSearch skills...

TinyEventBus

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

Install / Use

/learn @nothub/TinyEventBus
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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 .

View on GitHub
GitHub Stars14
CategoryDevelopment
Updated1y ago
Forks0

Languages

Java

Security Score

80/100

Audited on Sep 2, 2024

No findings