diff options
author | Luca Milanesio <luca.milanesio@gmail.com> | 2014-11-29 16:18:19 +0000 |
---|---|---|
committer | Luca Milanesio <luca.milanesio@gmail.com> | 2014-11-29 16:19:20 +0000 |
commit | b0501c33473771ba8c2f7404f6129aa65a8f203c (patch) | |
tree | b94864bec2eba7d71649376670dad79e9428593c /src/main/java/com | |
parent | 9f92fb94aa403928a2efe5e673e118b3b02ba291 (diff) | |
download | gitblit-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.java | 6 |
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()); |