You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.2 KiB
52 lines
1.2 KiB
/*
|
|
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
|
|
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*/
|
|
|
|
package com.sun.jmx.remote.protocol.iiop;
|
|
|
|
import java.io.IOException;
|
|
import java.net.MalformedURLException;
|
|
import java.util.Map;
|
|
|
|
import javax.management.MBeanServer;
|
|
import javax.management.remote.JMXConnectorServer;
|
|
import javax.management.remote.JMXConnectorServerProvider;
|
|
import javax.management.remote.JMXServiceURL;
|
|
import javax.management.remote.rmi.RMIConnectorServer;
|
|
|
|
public class ServerProvider implements JMXConnectorServerProvider {
|
|
|
|
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);
|
|
}
|
|
|
|
}
|