summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/manager/RuntimeManager.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-06-16 17:36:12 -0400
committerJames Moger <james.moger@gitblit.com>2014-06-16 17:36:12 -0400
commit6b18b0761b726fd9aef1ebcc21b760378f7d4b5c (patch)
tree4bdb208cede00e637ce4704d942aa045f5af5ed9 /src/main/java/com/gitblit/manager/RuntimeManager.java
parent07eb0963cae3a403f8774f65afa20c940ce7124f (diff)
parent9b575e8fac8d5e17e77cc284092abd856ddec8ac (diff)
downloadgitblit-6b18b0761b726fd9aef1ebcc21b760378f7d4b5c.tar.gz
gitblit-6b18b0761b726fd9aef1ebcc21b760378f7d4b5c.zip
Merge release 1.6.0
Diffstat (limited to 'src/main/java/com/gitblit/manager/RuntimeManager.java')
-rw-r--r--src/main/java/com/gitblit/manager/RuntimeManager.java39
1 files changed, 36 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/manager/RuntimeManager.java b/src/main/java/com/gitblit/manager/RuntimeManager.java
index 52f4d67b..9cdc64eb 100644
--- a/src/main/java/com/gitblit/manager/RuntimeManager.java
+++ b/src/main/java/com/gitblit/manager/RuntimeManager.java
@@ -119,9 +119,42 @@ public class RuntimeManager implements IRuntimeManager {
*/
@Override
public boolean isServingRepositories() {
- return settings.getBoolean(Keys.git.enableGitServlet, true)
- || (settings.getInteger(Keys.git.daemonPort, 0) > 0)
- || (settings.getInteger(Keys.git.sshPort, 0) > 0);
+ 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;
}
/**