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.remote.JMXConnectorProvider ; 15 import javax.management.remote.JMXConnector ; 16 import javax.management.remote.JMXServiceURL ; 17 import javax.management.remote.rmi.RMIConnector ; 18 19 public class ClientProvider implements JMXConnectorProvider { 20 21 public JMXConnector newJMXConnector(JMXServiceURL serviceURL, 22 Map <String ,?> environment) 23 throws IOException { 24 if (!serviceURL.getProtocol().equals("rmi")) { 25 throw new MalformedURLException ("Protocol not rmi: " + 26 serviceURL.getProtocol()); 27 } 28 return new RMIConnector (serviceURL, environment); 29 } 30 } 31 | Popular Tags |