aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-search
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-03-31 12:20:55 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-04-05 09:58:04 +0200
commit975158a5a726aa67c093f85779ac2c97efd03bb8 (patch)
treef2feb4851f4a0e2a6723e20d182413a01aeffade /server/sonar-search
parent87d559b07cdc6727dafe0c9e1286b30c8e7867ea (diff)
downloadsonarqube-975158a5a726aa67c093f85779ac2c97efd03bb8.tar.gz
sonarqube-975158a5a726aa67c093f85779ac2c97efd03bb8.zip
SONAR-7436 replace JMX/RMI by HTTP
Diffstat (limited to 'server/sonar-search')
-rw-r--r--server/sonar-search/src/main/java/org/sonar/search/EsSettings.java1
-rw-r--r--server/sonar-search/src/main/java/org/sonar/search/EsSettingsMBean.java38
-rw-r--r--server/sonar-search/src/main/java/org/sonar/search/SearchServer.java3
3 files changed, 39 insertions, 3 deletions
diff --git a/server/sonar-search/src/main/java/org/sonar/search/EsSettings.java b/server/sonar-search/src/main/java/org/sonar/search/EsSettings.java
index 2f0986e1e45..50802429918 100644
--- a/server/sonar-search/src/main/java/org/sonar/search/EsSettings.java
+++ b/server/sonar-search/src/main/java/org/sonar/search/EsSettings.java
@@ -33,7 +33,6 @@ import org.slf4j.LoggerFactory;
import org.sonar.process.MessageException;
import org.sonar.process.ProcessProperties;
import org.sonar.process.Props;
-import org.sonar.process.jmx.EsSettingsMBean;
public class EsSettings implements EsSettingsMBean {
diff --git a/server/sonar-search/src/main/java/org/sonar/search/EsSettingsMBean.java b/server/sonar-search/src/main/java/org/sonar/search/EsSettingsMBean.java
new file mode 100644
index 00000000000..9d5d2a4e712
--- /dev/null
+++ b/server/sonar-search/src/main/java/org/sonar/search/EsSettingsMBean.java
@@ -0,0 +1,38 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.search;
+
+/**
+ * MBean registered in the Elasticsearch process
+ */
+public interface EsSettingsMBean {
+
+ String OBJECT_NAME = "SonarQube:name=ElasticsearchSettings";
+
+ /**
+ * @return the enabled HTTP port, -1 if disabled
+ */
+ int getHttpPort();
+
+ String getClusterName();
+
+ String getNodeName();
+
+}
diff --git a/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java b/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java
index 31541ad259f..eda960f22b3 100644
--- a/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java
+++ b/server/sonar-search/src/main/java/org/sonar/search/SearchServer.java
@@ -22,12 +22,11 @@ package org.sonar.search;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.node.internal.InternalNode;
+import org.sonar.process.Jmx;
import org.sonar.process.MinimumViableSystem;
import org.sonar.process.Monitored;
import org.sonar.process.ProcessEntryPoint;
import org.sonar.process.Props;
-import org.sonar.process.jmx.EsSettingsMBean;
-import org.sonar.process.jmx.Jmx;
public class SearchServer implements Monitored {