本文整理汇总了Java中com.sun.jmx.remote.util.EnvHelp.checkAttributes方法的典型用法代码示例。如果您正苦于以下问题:Java EnvHelp.checkAttributes方法的具体用法?Java EnvHelp.checkAttributes怎么用?Java EnvHelp.checkAttributes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.jmx.remote.util.EnvHelp
的用法示例。
在下文中一共展示了EnvHelp.checkAttributes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RMIConnector
import com.sun.jmx.remote.util.EnvHelp; //导入方法依赖的package包/类
private RMIConnector(RMIServer rmiServer, JMXServiceURL address,
Map<String, ?> environment) {
if (rmiServer == null && address == null) throw new
IllegalArgumentException("rmiServer and jmxServiceURL both null");
initTransients();
this.rmiServer = rmiServer;
this.jmxServiceURL = address;
if (environment == null) {
this.env = Collections.emptyMap();
} else {
EnvHelp.checkAttributes(environment);
this.env = Collections.unmodifiableMap(environment);
}
}
示例2: RMIConnector
import com.sun.jmx.remote.util.EnvHelp; //导入方法依赖的package包/类
private RMIConnector(RMIServer rmiServer, JMXServiceURL address,
Map<String, ?> environment) {
if (rmiServer == null && address == null) throw new
IllegalArgumentException("rmiServer and jmxServiceURL both null");
initTransients();
this.rmiServer = rmiServer;
this.jmxServiceURL = address;
if (environment == null) {
this.env = Collections.emptyMap();
} else {
EnvHelp.checkAttributes(environment);
this.env = Collections.unmodifiableMap(environment);
}
}
示例3: toJMXConnector
import com.sun.jmx.remote.util.EnvHelp; //导入方法依赖的package包/类
/**
* <p>Returns a client stub for this connector server. A client
* stub is a serializable object whose {@link
* JMXConnector#connect(Map) connect} method can be used to make
* one new connection to this connector server.</p>
*
* @param env client connection parameters of the same sort that
* could be provided to {@link JMXConnector#connect(Map)
* JMXConnector.connect(Map)}. Can be null, which is equivalent
* to an empty map.
*
* @return a client stub that can be used to make a new connection
* to this connector server.
*
* @exception UnsupportedOperationException if this connector
* server does not support the generation of client stubs.
*
* @exception IllegalStateException if the JMXConnectorServer is
* not started (see {@link #isActive()}).
*
* @exception IOException if a communications problem means that a
* stub cannot be created.
**/
public JMXConnector toJMXConnector(Map<String,?> env) throws IOException {
// The serialized for of rmiServerImpl is automatically
// a RMI server stub.
if (!isActive()) throw new
IllegalStateException("Connector is not active");
// Merge maps
Map<String, Object> usemap = new HashMap<String, Object>(
(this.attributes==null)?Collections.<String, Object>emptyMap():
this.attributes);
if (env != null) {
EnvHelp.checkAttributes(env);
usemap.putAll(env);
}
usemap = EnvHelp.filterAttributes(usemap);
final RMIServer stub=(RMIServer)rmiServerImpl.toStub();
return new RMIConnector(stub, usemap);
}