1 8 9 package mx4j.remote.provider.iiop; 10 11 import java.io.IOException ; 12 import java.net.MalformedURLException ; 13 import java.util.Map ; 14 15 import javax.management.MBeanServer ; 16 import javax.management.remote.JMXConnectorServer ; 17 import javax.management.remote.JMXConnectorServerProvider ; 18 import javax.management.remote.JMXServiceURL ; 19 import javax.management.remote.rmi.RMIConnectorServer ; 20 21 24 public class ServerProvider implements JMXConnectorServerProvider 25 { 26 public JMXConnectorServer newJMXConnectorServer(JMXServiceURL url, Map environment, MBeanServer server) throws IOException 27 { 28 String protocol = url.getProtocol(); 29 if (!"iiop".equals(protocol)) throw new MalformedURLException ("Wrong protocol " + protocol + " for provider " + this); 30 return new RMIConnectorServer (url, environment, server); 31 } 32 } 33 | Popular Tags |