Package org.apache.solr.util
Class JmxUtil
- java.lang.Object
-
- org.apache.solr.util.JmxUtil
-
public final class JmxUtil extends Object
Utility methods to find a MBeanServer.
-
-
Constructor Summary
Constructors Constructor Description JmxUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MBeanServer
findFirstMBeanServer()
Retrieve the first MBeanServer found and if not found return the platform mbean serverstatic MBeanServer
findMBeanServerForAgentId(String agentId)
Find a MBeanServer given an agent id.static MBeanServer
findMBeanServerForServiceUrl(String serviceUrl)
Find a MBeanServer given a service url.
-
-
-
Method Detail
-
findFirstMBeanServer
public static MBeanServer findFirstMBeanServer()
Retrieve the first MBeanServer found and if not found return the platform mbean server- Returns:
- the first MBeanServer found
-
findMBeanServerForServiceUrl
public static MBeanServer findMBeanServerForServiceUrl(String serviceUrl) throws IOException
Find a MBeanServer given a service url.- Parameters:
serviceUrl
- the service url- Returns:
- a MBeanServer
- Throws:
IOException
-
findMBeanServerForAgentId
public static MBeanServer findMBeanServerForAgentId(String agentId)
Find a MBeanServer given an agent id.- Parameters:
agentId
- the agent id- Returns:
- a MBeanServer
-
-