1 /* 2 * @(#)JMXConnectorProvider.java 1.14 04/05/05 3 * 4 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 */ 7 8 9 package javax.management.remote; 10 11 import java.io.IOException; 12 import java.util.Map; 13 14 /** 15 * <p>A provider for creating JMX API connector clients using a given 16 * protocol. Instances of this interface are created by {@link 17 * JMXConnectorFactory} as part of its {@link 18 * JMXConnectorFactory#newJMXConnector(JMXServiceURL, Map) 19 * newJMXConnector} method.</p> 20 * 21 * @since 1.5 22 * @since.unbundled 1.0 23 */ 24 public interface JMXConnectorProvider { 25 /** 26 * <p>Creates a new connector client that is ready to connect 27 * to the connector server at the given address. Each successful 28 * call to this method produces a different 29 * <code>JMXConnector</code> object.</p> 30 * 31 * @param serviceURL the address of the connector server to connect to. 32 * 33 * @param environment a read-only Map containing named attributes 34 * to determine how the connection is made. Keys in this map must 35 * be Strings. The appropriate type of each associated value 36 * depends on the attribute.</p> 37 * 38 * @return a <code>JMXConnector</code> representing the new 39 * connector client. Each successful call to this method produces 40 * a different object. 41 * 42 * @exception NullPointerException if <code>serviceURL</code> or 43 * <code>environment</code> is null. 44 * 45 * @exception IOException if the connection cannot be made because 46 * of a communication problem. 47 */ 48 public JMXConnector newJMXConnector(JMXServiceURL serviceURL, 49 Map<String,?> environment) 50 throws IOException; 51 } 52