本文整理汇总了Java中javax.management.remote.JMXAddressable类的典型用法代码示例。如果您正苦于以下问题:Java JMXAddressable类的具体用法?Java JMXAddressable怎么用?Java JMXAddressable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JMXAddressable类属于javax.management.remote包,在下文中一共展示了JMXAddressable类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addressable
import javax.management.remote.JMXAddressable; //导入依赖的package包/类
/**
* 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);
}