/**
* Returns an addressable connector. If the passed connector implements {@link JMXAddressable}, it is simple returned.
* Otherwise it is wrapped and the {@link JMXAddressable} interface is implemented using the passed service URL.
* @param jmxConnector The JMXConnector to wrap
* @param jmxServiceURL The connector's known JMXServiceURL
* @return a {@link JMXAddressable} implementing JMXConnector
*/
public static JMXConnector addressable(final JMXConnector jmxConnector, final JMXServiceURL jmxServiceURL) {
if(jmxConnector==null) throw new IllegalArgumentException("The passed JMXConnector was null");
if(jmxConnector instanceof JMXAddressable) return jmxConnector;
if(jmxServiceURL==null) throw new IllegalArgumentException("The passed JMXConnector does not implement JMXAddressable, but the passed JMXServiceURL was null");
return new WrappedJMXConnector(jmxConnector, jmxServiceURL);
}
WrappedJMXConnector.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:jmxlocal
作者:
评论列表
文章目录