Decouple stream events from change hooks

Stream events are currently being dispatched from the change hooks
runner.

Both stream events and change hooks will eventually be evicted from
core Gerrit to plugins. Separating the stream events from hooks will
make it easier to move them to plugins separately.

Change-Id: I00c6728fbc52557a3360408272dc84c205c53b2f
This commit is contained in:
David Pursehouse
2016-06-20 17:54:09 +09:00
parent a392d04230
commit 1265695878
4 changed files with 546 additions and 291 deletions

View File

@@ -21,6 +21,7 @@ import com.google.common.base.Splitter;
import com.google.gerrit.common.ChangeHookApiListener;
import com.google.gerrit.common.ChangeHookRunner;
import com.google.gerrit.common.EventBroker;
import com.google.gerrit.common.StreamEventsApiListener;
import com.google.gerrit.gpg.GpgModule;
import com.google.gerrit.httpd.auth.oauth.OAuthModule;
import com.google.gerrit.httpd.auth.openid.OpenIdModule;
@@ -300,6 +301,7 @@ public class WebAppInitializer extends GuiceServletContextListener
modules.add(new AccountPatchReviewStoreImpl.Module());
modules.add(cfgInjector.getInstance(GitRepositoryManagerModule.class));
modules.add(new ChangeHookApiListener.Module());
modules.add(new StreamEventsApiListener.Module());
modules.add(new ChangeHookRunner.Module());
modules.add(new ReceiveCommitsExecutorModule());
modules.add(new DiffExecutorModule());