1 7 8 package com.sun.jmx.remote.protocol.rmi; 9 10 import java.io.IOException ; 11 import java.net.MalformedURLException ; 12 import java.util.Map ; 13 14 import javax.management.MBeanServer ; 15 import javax.management.remote.JMXConnectorServer ; 16 import javax.management.remote.JMXConnectorServerProvider ; 17 import javax.management.remote.JMXServiceURL ; 18 import javax.management.remote.rmi.RMIConnectorServer ; 19 20 public class ServerProvider implements JMXConnectorServerProvider { 21 22 public JMXConnectorServer newJMXConnectorServer(JMXServiceURL serviceURL, 23 Map <String ,?> environment, 24 MBeanServer mbeanServer) 25 throws IOException { 26 if (!serviceURL.getProtocol().equals("rmi")) { 27 throw new MalformedURLException ("Protocol not rmi: " + 28 serviceURL.getProtocol()); 29 } 30 return new RMIConnectorServer (serviceURL, environment, mbeanServer); 31 } 32 33 } 34 | Popular Tags |