inus is a abbreviation to Interface Event Bus.
Based on Otto by Square.
Use of the library is similar to Otto, except that for each producer may be several Event.
###Event interface generation
Create a new event class and add @Event
annotation.
@Event
public final class SomeEvent {
public final int someField;
public SomeEvent(int someField) {
this.someField = someField;
}
}
After project rebuild, annotation processor generates interface with two suffixes: Producer and Listener.
public interface SomeEventProducer {
@Produce
public SomeEvent produceSomeEvent();
}
public interface SomeEventListener {
@Subscribe
public void onSomeEvent();
}
Implements his in your classes and using.