1. /*
  2. * @(#)RelationSupportMBean.java 1.19 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.relation;
  8. /**
  9. * A RelationSupport object is used internally by the Relation Service to
  10. * represent simple relations (only roles, no properties or methods), with an
  11. * unlimited number of roles, of any relation type. As internal representation,
  12. * it is not exposed to the user.
  13. * <P>RelationSupport class conforms to the design patterns of standard MBean. So
  14. * the user can decide to instantiate a RelationSupport object himself as
  15. * a MBean (as it follows the MBean design patterns), to register it in the
  16. * MBean Server, and then to add it in the Relation Service.
  17. * <P>The user can also, when creating his own MBean relation class, have it
  18. * extending RelationSupport, to retrieve the implementations of required
  19. * interfaces (see below).
  20. * <P>It is also possible to have in a user relation MBean class a member
  21. * being a RelationSupport object, and to implement the required interfaces by
  22. * delegating all to this member.
  23. * <P> RelationSupport implements the Relation interface (to be handled by the
  24. * Relation Service).
  25. *
  26. * @since 1.5
  27. */
  28. public interface RelationSupportMBean
  29. extends Relation {
  30. /**
  31. * Returns an internal flag specifying if the object is still handled by
  32. * the Relation Service.
  33. *
  34. * @return a Boolean equal to {@link Boolean#TRUE} if the object
  35. * is still handled by the Relation Service and {@link
  36. * Boolean#FALSE} otherwise.
  37. */
  38. public Boolean isInRelationService();
  39. /**
  40. * <p>Specifies whether this relation is handled by the Relation
  41. * Service.</p>
  42. * <P>BEWARE, this method has to be exposed as the Relation Service will
  43. * access the relation through its management interface. It is RECOMMENDED
  44. * NOT to use this method. Using it does not affect the registration of the
  45. * relation object in the Relation Service, but will provide wrong
  46. * information about it!
  47. *
  48. * @param theFlg whether the relation is handled by the Relation Service.
  49. *
  50. * @exception IllegalArgumentException if null parameter
  51. */
  52. public void setRelationServiceManagementFlag(Boolean theFlg)
  53. throws IllegalArgumentException;
  54. }