1. /*
  2. * @(#)JMXConnectorServerProvider.java 1.6 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. import javax.management.MBeanServer;
  11. /**
  12. * <p>A provider for creating JMX API connector servers using a given
  13. * protocol. Instances of this interface are created by {@link
  14. * JMXConnectorServerFactory} as part of its {@link
  15. * JMXConnectorServerFactory#newJMXConnectorServer(JMXServiceURL,Map,MBeanServer)
  16. * newJMXConnectorServer} method.</p>
  17. *
  18. * @since 1.5
  19. * @since.unbundled 1.0
  20. */
  21. public interface JMXConnectorServerProvider {
  22. /**
  23. * <p>Creates a new connector server at the given address. Each
  24. * successful call to this method produces a different
  25. * <code>JMXConnectorServer</code> object.</p>
  26. *
  27. * @param serviceURL the address of the new connector server. The
  28. * actual address of the new connector server, as returned by its
  29. * {@link JMXConnectorServer#getAddress() getAddress} method, will
  30. * not necessarily be exactly the same. For example, it might
  31. * include a port number if the original address did not.
  32. *
  33. * @param environment a read-only Map containing named attributes
  34. * to control the new connector server's behaviour. Keys in this
  35. * map must be Strings. The appropriate type of each associated
  36. * value depends on the attribute.
  37. *
  38. * @param mbeanServer the MBean server that this connector server
  39. * is attached to. Null if this connector server will be attached
  40. * to an MBean server by being registered in it.
  41. *
  42. * @return a <code>JMXConnectorServer</code> representing the new
  43. * connector server. Each successful call to this method produces
  44. * a different object.
  45. *
  46. * @exception NullPointerException if <code>serviceURL</code> or
  47. * <code>environment</code> is null.
  48. *
  49. * @exception IOException if the connector server cannot be
  50. * created.
  51. */
  52. public JMXConnectorServer newJMXConnectorServer(JMXServiceURL serviceURL,
  53. Map<String,?> environment,
  54. MBeanServer mbeanServer)
  55. throws IOException;
  56. }