use of com.google.gerrit.lifecycle.LifecycleModule in project gerrit by GerritCodeReview.
the class ServerPluginInfoModule method configure.
@Override
protected void configure() {
bind(PluginUser.class).toInstance(plugin.getPluginUser());
bind(String.class).annotatedWith(PluginName.class).toInstance(plugin.getName());
bind(String.class).annotatedWith(PluginCanonicalWebUrl.class).toInstance(plugin.getPluginCanonicalWebUrl());
install(new LifecycleModule() {
@Override
public void configure() {
PluginMetricMaker metrics = new PluginMetricMaker(serverMetrics, MoreObjects.firstNonNull(plugin.getMetricsPrefix(), String.format("plugins/%s/", plugin.getName())));
bind(MetricMaker.class).toInstance(metrics);
listener().toInstance(metrics);
}
});
}
Aggregations