All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cookingfox.eventbus.adapter.GuavaEventBusAdapter Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package com.cookingfox.eventbus.adapter;

import com.cookingfox.eventbus.EventBus;

/**
 * Adapter for the Google Guava EventBus. Don't forget to add the library to your dependencies.
 *
 * @see com.cookingfox.eventbus.EventBus
 * @see com.google.common.eventbus.EventBus
 */
public class GuavaEventBusAdapter implements EventBus {

    private com.google.common.eventbus.EventBus eventBus;

    public GuavaEventBusAdapter(com.google.common.eventbus.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