當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。