Search in sources :

Example 1 with GitOverHttpServletModule

use of com.google.gerrit.httpd.GitOverHttpServlet.GitOverHttpServletModule in project gerrit by GerritCodeReview.

the class WebModule method configure.

@Override
protected void configure() {
    bind(RequestScopePropagator.class).to(GuiceRequestScopePropagator.class);
    bind(HttpRequestContext.class);
    installAuthModule();
    if (options.enableMasterFeatures()) {
        install(new UrlModule(authConfig));
    }
    install(new GerritRequestModule());
    install(new GitOverHttpServletModule(options.enableMasterFeatures()));
    if (gitwebCgiConfig.getGitwebCgi() != null) {
        install(new GitwebModule());
    }
    install(new AsyncReceiveCommitsModule());
    bind(SocketAddress.class).annotatedWith(RemotePeer.class).toProvider(HttpRemotePeerProvider.class).in(RequestScoped.class);
    bind(ProxyProperties.class).toProvider(ProxyPropertiesProvider.class);
    listener().toInstance(registerInParentInjectors());
    install(UniversalWebLoginFilter.module());
    // Static injection was unfortunately the best solution in this place. However, it is to be
    // avoided if possible.
    requestStaticInjection(WebSessionManager.Val.class);
}
Also used : GerritRequestModule(com.google.gerrit.server.config.GerritRequestModule) RequestScopePropagator(com.google.gerrit.server.util.RequestScopePropagator) GuiceRequestScopePropagator(com.google.gerrit.server.util.GuiceRequestScopePropagator) GitOverHttpServletModule(com.google.gerrit.httpd.GitOverHttpServlet.GitOverHttpServletModule) AsyncReceiveCommitsModule(com.google.gerrit.server.git.receive.AsyncReceiveCommits.AsyncReceiveCommitsModule) GitwebModule(com.google.gerrit.httpd.gitweb.GitwebModule) SocketAddress(java.net.SocketAddress)

Aggregations

GitOverHttpServletModule (com.google.gerrit.httpd.GitOverHttpServlet.GitOverHttpServletModule)1 GitwebModule (com.google.gerrit.httpd.gitweb.GitwebModule)1 GerritRequestModule (com.google.gerrit.server.config.GerritRequestModule)1 AsyncReceiveCommitsModule (com.google.gerrit.server.git.receive.AsyncReceiveCommits.AsyncReceiveCommitsModule)1 GuiceRequestScopePropagator (com.google.gerrit.server.util.GuiceRequestScopePropagator)1 RequestScopePropagator (com.google.gerrit.server.util.RequestScopePropagator)1 SocketAddress (java.net.SocketAddress)1