1. /*
  2. * @(#)file DescriptorAccess.java
  3. * @(#)author IBM Corp.
  4. * @(#)version 1.17
  5. * @(#)lastedit 03/12/19
  6. */
  7. /*
  8. * Copyright IBM Corp. 1999-2000. All rights reserved.
  9. *
  10. * The program is provided "as is" without any warranty express or implied,
  11. * including the warranty of non-infringement and the implied warranties of
  12. * merchantibility and fitness for a particular purpose. IBM will not be
  13. * liable for any damages suffered by you or any third party claim against
  14. * you regarding the Program.
  15. *
  16. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  17. * This software is the proprietary information of Sun Microsystems, Inc.
  18. * Use is subject to license terms.
  19. *
  20. * Copyright 2004 Sun Microsystems, Inc. Tous droits reserves.
  21. * Ce logiciel est propriete de Sun Microsystems, Inc.
  22. * Distribue par des licences qui en restreignent l'utilisation.
  23. *
  24. */
  25. package javax.management;
  26. /**
  27. * This interface is used to gain access to descriptors of the Descriptor class
  28. * which are associated with a JMX component, i.e. MBean, MBeanInfo,
  29. * MBeanAttributeInfo, MBeanNotificationInfo,
  30. * MBeanOperationInfo, MBeanParameterInfo.
  31. * <P>
  32. * ModelMBeans make extensive use of this interface in ModelMBeanInfo classes.
  33. *
  34. * @since 1.5
  35. */
  36. public interface DescriptorAccess
  37. {
  38. /**
  39. * Returns a copy of Descriptor.
  40. *
  41. * @return Descriptor associated with the component implementing this interface.
  42. * Null should never be returned. At a minimum a default descriptor with the
  43. * descriptor name and descriptorType should be returned.
  44. *
  45. * @see #setDescriptor
  46. */
  47. public Descriptor getDescriptor();
  48. /**
  49. * Sets Descriptor (full replace).
  50. *
  51. * @param inDescriptor replaces the Descriptor associated with the
  52. * component implementing this interface. If the inDescriptor is invalid for the
  53. * type of Info object it is being set for, an exception is thrown. If the
  54. * inDescriptor is null, then the Descriptor will revert to its default value
  55. * which should contain, at a minimum, the descriptor name and descriptorType.
  56. *
  57. * @see #getDescriptor
  58. */
  59. public void setDescriptor(Descriptor inDescriptor);
  60. }