1. /*
  2. * @(#)MBeanServerForwarder.java 1.9 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 javax.management.remote;
  8. import javax.management.MBeanServer;
  9. /**
  10. * <p>An object of this class implements the MBeanServer interface and
  11. * wraps another object that also implements that interface.
  12. * Typically, an implementation of this interface performs some action
  13. * in some or all methods of the <code>MBeanServer</code> interface
  14. * before and/or after forwarding the method to the wrapped object.
  15. * Examples include security checking and logging.</p>
  16. *
  17. * @since 1.5
  18. * @since.unbundled 1.0
  19. */
  20. public interface MBeanServerForwarder extends MBeanServer {
  21. /**
  22. * Returns the MBeanServer object to which requests will be forwarded.
  23. *
  24. * @return the MBeanServer object to which requests will be forwarded,
  25. * or null if there is none.
  26. *
  27. * @see #setMBeanServer
  28. */
  29. public MBeanServer getMBeanServer();
  30. /**
  31. * Sets the MBeanServer object to which requests will be forwarded
  32. * after treatment by this object.
  33. *
  34. * @param mbs the MBeanServer object to which requests will be forwarded.
  35. *
  36. * @exception IllegalArgumentException if this object is already
  37. * forwarding to an MBeanServer object or if <code>mbs</code> is
  38. * null or if <code>mbs</code> is identical to this object.
  39. *
  40. * @see #getMBeanServer
  41. */
  42. public void setMBeanServer(MBeanServer mbs);
  43. }