From 5d8bd397f72b4098d7a4ee5d1d055c12586ce4ee Mon Sep 17 00:00:00 2001 From: nsingh Date: Mon, 16 Oct 2017 16:07:21 -0700 Subject: [PATCH] Code cleanup in SpringBootApp --- .../commons/boot/app/cli/SpringBootApp.java | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/SpringBootApp.java b/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/SpringBootApp.java index 722fe5455..5155f5c2f 100644 --- a/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/SpringBootApp.java +++ b/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/SpringBootApp.java @@ -89,6 +89,12 @@ public class SpringBootApp { return vmd.displayName(); } + public String getHost() throws Exception { + String jmxConnect = this.vm.startLocalManagementAgent(); + JMXServiceURL serviceUrl = new JMXServiceURL(jmxConnect); + return serviceUrl.getHost(); + } + public boolean isSpringBootApp() throws Exception { Properties props = this.vm.getSystemProperties(); @@ -169,19 +175,6 @@ public class SpringBootApp { return null; } - public Object getRequestMapping(String rawKey) throws Exception { - Object result = getActuatorDataFromAttribute("org.springframework.boot:type=Endpoint,name=requestMappingEndpoint", "Data"); - if (result == null) { - result = getActuatorDataFromOperation("org.springframework.boot:type=Endpoint,name=Mappings", "mappings"); - } - - if (result instanceof HashMap) { - return ((HashMap) result).get(rawKey); - } - - return null; - } - public String getAutoConfigReport() throws Exception { Object result = getActuatorDataFromAttribute("org.springframework.boot:type=Endpoint,name=autoConfigurationReportEndpoint", "Data"); if (result != null) { @@ -328,11 +321,4 @@ public class SpringBootApp { return null; } - - public String getHost() throws Exception { - String jmxConnect = this.vm.startLocalManagementAgent(); - JMXServiceURL serviceUrl = new JMXServiceURL(jmxConnect); - return serviceUrl.getHost(); - } - }