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


Java JMXServiceURL.getProtocol方法代码示例

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


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

示例1: newJMXConnectorServer

import javax.management.remote.JMXServiceURL; //导入方法依赖的package包/类
public JMXConnectorServer newJMXConnectorServer(JMXServiceURL serviceURL,
                                                Map<String,?> environment,
                                                MBeanServer mbeanServer)
        throws IOException {
    if (!serviceURL.getProtocol().equals("rmi")) {
        throw new MalformedURLException("Protocol not rmi: " +
                                        serviceURL.getProtocol());
    }
    return new RMIConnectorServer(serviceURL, environment, mbeanServer);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:ServerProvider.java

示例2: newJMXConnector

import javax.management.remote.JMXServiceURL; //导入方法依赖的package包/类
public JMXConnector newJMXConnector(JMXServiceURL serviceURL,
                                    Map<String,?> environment)
        throws IOException {
    if (!serviceURL.getProtocol().equals("rmi")) {
        throw new MalformedURLException("Protocol not rmi: " +
                                        serviceURL.getProtocol());
    }
    return new RMIConnector(serviceURL, environment);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:ClientProvider.java

示例3: newJMXConnectorServer

import javax.management.remote.JMXServiceURL; //导入方法依赖的package包/类
public JMXConnectorServer newJMXConnectorServer(JMXServiceURL serviceURL,
                                                Map<String,?> environment,
                                                MBeanServer mbeanServer)
        throws IOException {
    if (!serviceURL.getProtocol().equals("iiop")) {
        throw new MalformedURLException("Protocol not iiop: " +
                                        serviceURL.getProtocol());
    }
    return new RMIConnectorServer(serviceURL, environment, mbeanServer);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:ServerProvider.java

示例4: newJMXConnector

import javax.management.remote.JMXServiceURL; //导入方法依赖的package包/类
public JMXConnector newJMXConnector(JMXServiceURL serviceURL,
                                    Map<String,?> environment)
        throws IOException {
    if (!serviceURL.getProtocol().equals("iiop")) {
        throw new MalformedURLException("Protocol not iiop: " +
                                        serviceURL.getProtocol());
    }
    return new RMIConnector(serviceURL, environment);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:ClientProvider.java

示例5: isIiopURL

import javax.management.remote.JMXServiceURL; //导入方法依赖的package包/类
static boolean isIiopURL(JMXServiceURL directoryURL, boolean strict)
    throws MalformedURLException {
    String protocol = directoryURL.getProtocol();
    if (protocol.equals("rmi"))
        return false;
    else if (protocol.equals("iiop"))
        return true;
    else if (strict) {

        throw new MalformedURLException("URL must have protocol " +
                                        "\"rmi\" or \"iiop\": \"" +
                                        protocol + "\"");
    }
    return false;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:RMIConnectorServer.java

示例6: newJMXConnector

import javax.management.remote.JMXServiceURL; //导入方法依赖的package包/类
@Override
public JMXConnector newJMXConnector(final JMXServiceURL url, final Map<String, ?> environment)
        throws MalformedURLException {
    final String protocol = url.getProtocol();
    if (!SimpleJmx.PROTOCOL.equals(protocol)) {
        throw new MalformedURLException(
                "Invalid protocol '" + protocol + "' for provider " + this.getClass().getName());
    }

    return new ClientConnector(url, environment);
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:12,代码来源:ClientProvider.java

示例7: newJMXConnectorServer

import javax.management.remote.JMXServiceURL; //导入方法依赖的package包/类
@Override
public JMXConnectorServer newJMXConnectorServer(final JMXServiceURL url, final Map<String, ?> environment,
                                                final MBeanServer server) throws MalformedURLException {
    final String protocol = url.getProtocol();
    if (!SimpleJmx.PROTOCOL.equals(protocol)) {
        throw new MalformedURLException(
                "Invalid protocol '" + protocol + "' for provider " + this.getClass().getName());
    }
    return new ServerConnector(url, environment, server);
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:11,代码来源:ServerProvider.java

示例8: updateAddress

import javax.management.remote.JMXServiceURL; //导入方法依赖的package包/类
void updateAddress(final int localPort) {
    try {
        url = new JMXServiceURL(url.getProtocol(), url.getHost(), localPort);
    } catch (final MalformedURLException e) {
        LOGGER.log(Level.INFO, "Could not update url in JMXConnectorServer to reflect bound port", e);
    }
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:8,代码来源:ServerConnector.java

示例9: newJMXConnectorServer

import javax.management.remote.JMXServiceURL; //导入方法依赖的package包/类
public JMXConnectorServer newJMXConnectorServer(JMXServiceURL url,
                                                Map<String,?> map,
                                                MBeanServer mbeanServer)
    throws IOException {
    final String protocol = url.getProtocol();
    called = true;
    System.out.println("JMXConnectorServerProviderImpl called");
    if(protocol.equals("rmi"))
        return new RMIConnectorServer(url, map, mbeanServer);
    if(protocol.equals("throw-provider-exception"))
        throw new JMXProviderException("I have been asked to throw");

    throw new IllegalArgumentException("UNKNOWN PROTOCOL");
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:15,代码来源:JMXConnectorServerProviderImpl.java

示例10: newJMXConnector

import javax.management.remote.JMXServiceURL; //导入方法依赖的package包/类
public JMXConnector newJMXConnector(JMXServiceURL url,
                                    Map<String,?> map)
    throws IOException {
    final String protocol = url.getProtocol();
    called = true;
    System.out.println("JMXConnectorProviderImpl called");

    if(protocol.equals("rmi"))
        return new RMIConnector(url, map);
    if(protocol.equals("throw-provider-exception"))
        throw new JMXProviderException("I have been asked to throw");

    throw new IllegalArgumentException("UNKNOWN PROTOCOL");
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:15,代码来源:JMXConnectorProviderImpl.java


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