Split ChangeHookRunner along new interface lines

Create a new EventBroker class that can post and fire Events to
listeners. Make ChangeHookRunner use this new class to post events.

Change-Id: I308a61cc53f102a76265d1f318c7f42983d5599f
This commit is contained in:
Martin Fick
2014-12-12 13:04:02 -07:00
committed by Hugo Arès
parent be61959313
commit f58c3c94cb
4 changed files with 202 additions and 152 deletions

View File

@@ -19,6 +19,7 @@ import static com.google.inject.Stage.PRODUCTION;
import com.google.common.base.Splitter;
import com.google.gerrit.common.ChangeHookRunner;
import com.google.gerrit.common.EventBroker;
import com.google.gerrit.gpg.GpgModule;
import com.google.gerrit.httpd.auth.oauth.OAuthModule;
import com.google.gerrit.httpd.auth.openid.OpenIdModule;
@@ -294,6 +295,7 @@ public class WebAppInitializer extends GuiceServletContextListener
private Injector createSysInjector() {
final List<Module> modules = new ArrayList<>();
modules.add(new DropWizardMetricMaker.RestModule());
modules.add(new EventBroker.Module());
modules.add(new ChangeHookRunner.Module());
modules.add(new ReceiveCommitsExecutorModule());
modules.add(new DiffExecutorModule());