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