Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 862 Bytes

README.md

File metadata and controls

49 lines (35 loc) · 862 Bytes

Cerberus

A Single-Thread EventBus

Add Cerberus to your project

add the jar to your project. Click to download the jar

Start

  1. Prepare subscribers,Declare and annotate your subscribing method
@Subscribe
public void sayHello(String message) {
    System.out.println(message);
}
  1. Register your subscriber

In Java

Cerberus.Companion.getDefault().register(this);

In Kotlin

Cerberus.getDefault().register(this)
  1. Post Event

In Java

Cerberus.Companion.getDefault().post("HelloWorld");

In Kotlin

Cerberus.getDefault().post("HelloWorld")

Attention

The event in Cerberus dont't support the intfloat... in java,but support IntegerStringFloat... And it don't support the IntFloat in Kotlin.

中文介绍