Example usage for com.google.common.eventbus ReentrantEventBus ReentrantEventBus

List of usage examples for com.google.common.eventbus ReentrantEventBus ReentrantEventBus

Introduction

In this page you can find the example usage for com.google.common.eventbus ReentrantEventBus ReentrantEventBus.

Prototype

public ReentrantEventBus(final SubscriberExceptionHandler subscriberExceptionHandler) 

Source Link

Usage

From source file:org.sonatype.nexus.common.event.EventBusImpl.java

private static com.google.common.eventbus.EventBus createEventBus(final String type) {
    checkNotNull(type);/*from   ww w.j  a v  a  2  s .  c o  m*/

    switch (type) {
    case "standard":
        return new com.google.common.eventbus.EventBus(new Slf4jSubscriberExceptionHandler(type));

    case "reentrant":
        return new ReentrantEventBus(new Slf4jSubscriberExceptionHandler(type));

    default:
        throw new RuntimeException("Invalid EventBus type: " + type);
    }
}