summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/manager/RuntimeManager.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-07-02 16:21:16 -0400
committerJames Moger <james.moger@gitblit.com>2014-07-03 17:00:40 -0400
commit7d3a31514afbe88664081b4ea57cd7939de99014 (patch)
treebf8eb7ad49fef5da6085dce33d2c293c1a9890a8 /src/main/java/com/gitblit/manager/RuntimeManager.java
parente6ae536d3a5ec04eea1421f3f5422f7ea5011e33 (diff)
downloadgitblit-7d3a31514afbe88664081b4ea57cd7939de99014.tar.gz
gitblit-7d3a31514afbe88664081b4ea57cd7939de99014.zip
Extract services manager into a top-level injectable manager
Diffstat (limited to 'src/main/java/com/gitblit/manager/RuntimeManager.java')
-rw-r--r--src/main/java/com/gitblit/manager/RuntimeManager.java51
1 files changed, 3 insertions, 48 deletions
diff --git a/src/main/java/com/gitblit/manager/RuntimeManager.java b/src/main/java/com/gitblit/manager/RuntimeManager.java
index 383b1dce..95a363f6 100644
--- a/src/main/java/com/gitblit/manager/RuntimeManager.java
+++ b/src/main/java/com/gitblit/manager/RuntimeManager.java
@@ -22,8 +22,6 @@ import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
-import com.google.inject.Inject;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -34,8 +32,11 @@ import com.gitblit.models.ServerSettings;
import com.gitblit.models.ServerStatus;
import com.gitblit.models.SettingModel;
import com.gitblit.utils.StringUtils;
+import com.google.inject.Inject;
import com.google.inject.Injector;
+import com.google.inject.Singleton;
+@Singleton
public class RuntimeManager implements IRuntimeManager {
private final Logger logger = LoggerFactory.getLogger(getClass());
@@ -124,52 +125,6 @@ public class RuntimeManager implements IRuntimeManager {
}
/**
- * Determine if this Gitblit instance is actively serving git repositories
- * or if it is merely a repository viewer.
- *
- * @return true if Gitblit is serving repositories
- */
- @Override
- public boolean isServingRepositories() {
- return isServingHTTP()
- || isServingGIT()
- || isServingSSH();
- }
-
- /**
- * Determine if this Gitblit instance is actively serving git repositories
- * over the HTTP protocol.
- *
- * @return true if Gitblit is serving repositories over the HTTP protocol
- */
- @Override
- public boolean isServingHTTP() {
- return settings.getBoolean(Keys.git.enableGitServlet, true);
- }
-
- /**
- * Determine if this Gitblit instance is actively serving git repositories
- * over the Git Daemon protocol.
- *
- * @return true if Gitblit is serving repositories over the Git Daemon protocol
- */
- @Override
- public boolean isServingGIT() {
- return settings.getInteger(Keys.git.daemonPort, 0) > 0;
- }
-
- /**
- * Determine if this Gitblit instance is actively serving git repositories
- * over the SSH protocol.
- *
- * @return true if Gitblit is serving repositories over the SSH protocol
- */
- @Override
- public boolean isServingSSH() {
- return settings.getInteger(Keys.git.sshPort, 0) > 0;
- }
-
- /**
* Returns the preferred timezone for the Gitblit instance.
*
* @return a timezone