Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

πŸš€ Lightweight Kotlin/Java event bus with lambda and annotation support, prioritisation, and cancellation.

License

Notifications You must be signed in to change notification settings

Dani-error/flux

Repository files navigation

Flux logo

Features

  • Lightweight event bus with zero dependencies
  • Lambda and annotation listener support
  • Prioritisation and cancellation system
  • Kotlin-first, with Java interop
  • Full unit test coverage
  • Single module: simple to use and integrate

Usage

Gradle
repositories {
 mavenCentral()
}
dependencies {
 implementation("io.github.dani-error:flux:1.0.0")
}
Maven
<dependency>
 <groupId>io.github.dani-error</groupId>
 <artifactId>flux</artifactId>
 <version>1.0.0</version>
</dependency>

Example

class ExampleEvent : Event
val bus = EventBus()
bus.register<ExampleEvent> { event ->
 println("Received event")
}
bus.post(ExampleEvent())

Or using annotations:

class Listener {
 @Subscribe
 fun handle(event: ExampleEvent) {
 println("Event received")
 }
}
val bus = EventBus()
bus.register(Listener())
bus.post(ExampleEvent())

Documentation

Javadocs and examples can be found on the GitHub wiki.


Contributing

Contributions welcome!

  1. Fork the repo.
  2. Create a feature branch:
git checkout -b feature/<your-feature>
  1. Commit your changes and open a Pull Request to main.

Open an issue first for major changes.


License

Flux is licensed under the MIT License.

About

πŸš€ Lightweight Kotlin/Java event bus with lambda and annotation support, prioritisation, and cancellation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /