A fast, lightweight event bus with priority-based dispatch, annotation support, and built-in async modes.
- Fast Hot Path - Snapshot arrays, exact-type routing, and minimal overhead on
post(). - Hybrid Dispatch - Supports SYNC, ASYNC (single worker), and ASYNC_PARALLEL (ForkJoinPool).
- Priority System - Higher priority listeners run first inside their dispatch mode.
- Annotation Automation - Register handlers with
@CommandothroughFloraAutomation. - Thread-Safe Core - Subscribe/unsubscribe rebuilds snapshots, reads stay lock-free.
- Zero Dependencies - Pure Java with no external runtime libraries.
- Java 17+
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.evaware-dev:Flora:VERSION'
}<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.evaware-dev</groupId>
<artifactId>Flora</artifactId>
<version>VERSION</version>
</dependency>For a complete, compile-ready example with manual listeners, annotations, and async dispatch, see example.
- Events are dispatched by exact class.
ASYNClisteners run on a single dedicated worker thread.ASYNC_PARALLELlisteners are submitted toForkJoinPool.commonPool().- Async listeners may finish after
post()returns.
MIT License