Skip to content

qiaoyunrui/Cerberus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

中文介绍

About

The imitator of the EventBus.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published