use of com.google.gerrit.server.config.GerritRequestModule in project gerrit by GerritCodeReview.
the class InProcessProtocol method module.
static Module module() {
return new AbstractModule() {
@Override
public void configure() {
install(new GerritRequestModule());
bind(RequestScopePropagator.class).to(Propagator.class);
bindScope(RequestScoped.class, InProcessProtocol.REQUEST);
}
@Provides
@RemotePeer
SocketAddress getSocketAddress() {
// something.
throw new OutOfScopeException("No remote peer in acceptance tests");
}
};
}
use of com.google.gerrit.server.config.GerritRequestModule 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(options, authConfig));
install(new UiRpcModule());
}
install(new GerritRequestModule());
install(new GitOverHttpServlet.Module(options.enableMasterFeatures()));
if (gitwebCgiConfig.getGitwebCgi() != null) {
install(new GitwebModule());
}
install(new AsyncReceiveCommits.Module());
bind(SocketAddress.class).annotatedWith(RemotePeer.class).toProvider(HttpRemotePeerProvider.class).in(RequestScoped.class);
bind(ProxyProperties.class).toProvider(ProxyPropertiesProvider.class);
listener().toInstance(registerInParentInjectors());
install(UniversalWebLoginFilter.module());
}
use of com.google.gerrit.server.config.GerritRequestModule in project gerrit by GerritCodeReview.
the class SshModule method configureRequestScope.
private void configureRequestScope() {
bind(SshScope.Context.class).toProvider(SshScope.ContextProvider.class);
bind(SshSession.class).toProvider(SshScope.SshSessionProvider.class).in(SshScope.REQUEST);
bind(SocketAddress.class).annotatedWith(RemotePeer.class).toProvider(SshRemotePeerProvider.class).in(SshScope.REQUEST);
bind(WorkQueue.Executor.class).annotatedWith(CommandExecutor.class).toProvider(CommandExecutorProvider.class).in(SshScope.REQUEST);
install(new GerritRequestModule());
}
Aggregations