1. /*
  2. * @(#)ObjectChangeListener.java 1.4 00/02/02
  3. *
  4. * Copyright 1999, 2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package javax.naming.event;
  11. /**
  12. * Specifies the method that a listener of a <tt>NamingEvent</tt>
  13. * with event type of <tt>OBJECT_CHANGED</tt> must implement.
  14. *<p>
  15. * An <tt>OBJECT_CHANGED</tt> event type is fired when (the contents of)
  16. * an object has changed. This might mean that its attributes have been modified,
  17. * added, or removed, and/or that the object itself has been replaced.
  18. * How the object has changed can be determined by examining the
  19. * <tt>NamingEvent</tt>'s old and new bindings.
  20. *<p>
  21. * A listener interested in <tt>OBJECT_CHANGED</tt> event types must:
  22. *<ol>
  23. *
  24. *<li>Implement this interface and its method (<tt>objectChanged()</tt>)
  25. *<li>Implement <tt>NamingListener.namingExceptionThrown()</tt> so that
  26. * it will be notified of exceptions thrown while attempting to
  27. * collect information about the events.
  28. *<li>Register with the source using the source's <tt>addNamingListener()</tt>
  29. * method.
  30. *</ol>
  31. * A listener that wants to be notified of namespace change events
  32. * should also implement the <tt>NamespaceChangeListener</tt>
  33. * interface.
  34. *
  35. * @author Rosanna Lee
  36. * @author Scott Seligman
  37. * @version 1.4 00/02/02
  38. *
  39. * @see NamingEvent
  40. * @see NamespaceChangeListener
  41. * @see EventContext
  42. * @see EventDirContext
  43. * @since 1.3
  44. */
  45. public interface ObjectChangeListener extends NamingListener {
  46. /**
  47. * Called when an object has been changed.
  48. *<p>
  49. * The binding of the changed object can be obtained using
  50. * <tt>evt.getNewBinding()</tt>. Its old binding (before the change)
  51. * can be obtained using <tt>evt.getOldBinding()</tt>.
  52. * @param evt The nonnull naming event.
  53. * @see NamingEvent#OBJECT_CHANGED
  54. */
  55. void objectChanged(NamingEvent evt);
  56. }