summaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
authorLuca Milanesio <luca.milanesio@gmail.com>2014-11-29 16:18:19 +0000
committerLuca Milanesio <luca.milanesio@gmail.com>2014-11-29 16:19:20 +0000
commitb0501c33473771ba8c2f7404f6129aa65a8f203c (patch)
treeb94864bec2eba7d71649376670dad79e9428593c /src/main/java/com
parent9f92fb94aa403928a2efe5e673e118b3b02ba291 (diff)
downloadgitblit-b0501c33473771ba8c2f7404f6129aa65a8f203c.tar.gz
gitblit-b0501c33473771ba8c2f7404f6129aa65a8f203c.zip
Allows starting an already instantiated manager
When a manager is injected through other means, (e.g. using a different GuiceModule and injector in Gerrit) we need a way to start it without having to necessarily passing through the injection process again.
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/gitblit/servlet/GitblitContext.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/servlet/GitblitContext.java b/src/main/java/com/gitblit/servlet/GitblitContext.java
index fa0534db..85b47205 100644
--- a/src/main/java/com/gitblit/servlet/GitblitContext.java
+++ b/src/main/java/com/gitblit/servlet/GitblitContext.java
@@ -266,6 +266,12 @@ public class GitblitContext extends GuiceServletContextListener {
return x;
}
+ protected <X extends IManager> X startManager(X x) {
+ x.start();
+ managers.add(x);
+ return x;
+ }
+
protected void logManager(Class<? extends IManager> clazz) {
logger.info("");
logger.info("----[{}]----", clazz.getName());