1. /*
  2. * @(#)SunJmxMBeanServer.java 1.28 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.jmx.mbeanserver;
  8. import javax.management.MBeanServer;
  9. import javax.management.MBeanServerDelegate;
  10. import com.sun.jmx.interceptor.MBeanServerInterceptor;
  11. /**
  12. * Extends the MBeanServer and MBeanServerInterceptor interface to
  13. * provide methods for getting the MetaData and MBeanServerInstantiator
  14. * objects associated with an MBeanServer.
  15. *
  16. * @since 1.5
  17. * @since.unbundled JMX RI 1.2
  18. */
  19. public interface SunJmxMBeanServer
  20. extends MBeanServerInterceptor, MBeanServer {
  21. /**
  22. * Return the MBeanInstantiator associated to this MBeanServer.
  23. * @exception UnsupportedOperationException if
  24. * {@link MBeanServerInterceptor}s
  25. * are not enabled on this object.
  26. * @see #interceptorsEnabled
  27. */
  28. public MBeanInstantiator getMBeanInstantiator();
  29. /**
  30. * Return the MetaData associated to this MBeanServer.
  31. */
  32. public MetaData getMetaData();
  33. /**
  34. * Tell whether {@link MBeanServerInterceptor}s are enabled on this
  35. * object.
  36. * @return <code>true</code> if {@link MBeanServerInterceptor}s are
  37. * enabled.
  38. * @see #getMBeanServerInterceptor
  39. * @see #setMBeanServerInterceptor
  40. * @see #getMBeanInstantiator
  41. * @see com.sun.jmx.mbeanserver.JmxMBeanServerBuilder
  42. **/
  43. public boolean interceptorsEnabled();
  44. /**
  45. * Return the MBeanServerInterceptor.
  46. * @exception UnsupportedOperationException if
  47. * {@link MBeanServerInterceptor}s
  48. * are not enabled on this object.
  49. * @see #interceptorsEnabled
  50. **/
  51. public MBeanServerInterceptor getMBeanServerInterceptor();
  52. /**
  53. * Set the MBeanServerInterceptor.
  54. * @exception UnsupportedOperationException if
  55. * {@link MBeanServerInterceptor}s
  56. * are not enabled on this object.
  57. * @see #interceptorsEnabled
  58. **/
  59. public void setMBeanServerInterceptor(MBeanServerInterceptor interceptor);
  60. /**
  61. * <p>Return the MBeanServerDelegate representing the MBeanServer.
  62. * Notifications can be sent from the MBean server delegate using
  63. * the method {@link MBeanServerDelegate#sendNotification}
  64. * in the returned object.</p>
  65. *
  66. * @since.unbundled JMX RI 1.2
  67. */
  68. public MBeanServerDelegate getMBeanServerDelegate();
  69. }