com.github.dxee.dject.event.guava.GuavaEventRegistration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dject-event Show documentation
Show all versions of dject-event Show documentation
A collection of guice extensions, help to improve the developer experience of guice.
package com.github.dxee.dject.event.guava;
import com.github.dxee.dject.event.ApplicationEventRegistration;
import com.google.common.eventbus.EventBus;
class GuavaEventRegistration implements ApplicationEventRegistration {
private final EventBus eventBus;
private final GuavaSubscriberProxy subscriber;
public GuavaEventRegistration(EventBus eventBus, GuavaSubscriberProxy subscriber) {
this.eventBus = eventBus;
this.subscriber = subscriber;
}
public void unregister() {
this.eventBus.unregister(subscriber);
}
}