当前位置: 首页>>代码示例>>Java>>正文


Java EnvHelp.filterAttributes方法代码示例

本文整理汇总了Java中com.sun.jmx.remote.util.EnvHelp.filterAttributes方法的典型用法代码示例。如果您正苦于以下问题:Java EnvHelp.filterAttributes方法的具体用法?Java EnvHelp.filterAttributes怎么用?Java EnvHelp.filterAttributes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.jmx.remote.util.EnvHelp的用法示例。


在下文中一共展示了EnvHelp.filterAttributes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:46,代码来源:RMIConnectorServer.java

示例2: getAttributes

import com.sun.jmx.remote.util.EnvHelp; //导入方法依赖的package包/类
public Map<String,?> getAttributes() {
    Map<String, ?> map = EnvHelp.filterAttributes(attributes);
    return Collections.unmodifiableMap(map);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:RMIConnectorServer.java


注:本文中的com.sun.jmx.remote.util.EnvHelp.filterAttributes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。