
com.cookingfox.eventbus.adapter.GreenRobotEventBusAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eventbus-adapter-java Show documentation
Show all versions of eventbus-adapter-java Show documentation
The EventBus Adapter wraps various EventBus implementations for Java and Android.
package com.cookingfox.eventbus.adapter;
import com.cookingfox.eventbus.EventBus;
/**
* Adapter for the GreenRobot EventBus. Don't forget to add the library to your dependencies.
*
* @see com.cookingfox.eventbus.EventBus
* @see de.greenrobot.event.EventBus
*/
public class GreenRobotEventBusAdapter implements EventBus {
private de.greenrobot.event.EventBus eventBus;
public GreenRobotEventBusAdapter(de.greenrobot.event.EventBus eventBus) {
this.eventBus = eventBus;
}
@Override
public void post(Object event) {
eventBus.post(event);
}
@Override
public void register(Object subscriber) {
eventBus.register(subscriber);
}
@Override
public void unregister(Object subscriber) {
eventBus.unregister(subscriber);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy