Created
August 12, 2018 22:40
-
-
Save Oziomajnr/f1beea451f78083a25569356876a2bdb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.eventbus.AsyncEventBus; | |
import com.google.common.eventbus.EventBus; | |
import java.util.concurrent.Executors; | |
public class EventBusFactory { | |
//hold the instance of the event bus here | |
private static EventBus eventBus = new AsyncEventBus(Executors.newCachedThreadPool()); | |
public static EventBus getEventBus() { | |
return eventBus; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment