1. package org.apache.commons.modeler.modules;
  2. import java.util.List;
  3. /**
  4. * This mbean will load an extended mlet file ( similar in syntax with jboss ).
  5. * It'll keep track of all attribute changes and update the file when attributes
  6. * change.
  7. */
  8. public interface MbeansSourceMBean
  9. {
  10. /** Set the source to be used to load the mbeans
  11. *
  12. * @param source File or URL
  13. */
  14. public void setSource( Object source );
  15. public Object getSource();
  16. /** Return the list of loaded mbeans names
  17. *
  18. * @return List of ObjectName
  19. */
  20. public List getMBeans();
  21. /** Load the mbeans from the source. Called automatically on init()
  22. *
  23. * @throws Exception
  24. */
  25. public void load() throws Exception;
  26. /** Call the init method on all mbeans. Will call load if not done already
  27. *
  28. * @throws Exception
  29. */
  30. public void init() throws Exception;
  31. /** Save the file.
  32. */
  33. public void save();
  34. }