1. /*
  2. * @(#)RowSetListener.java 1.8 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.sql;
  8. /**
  9. * An interface that must be implemented by a
  10. * component that wants to be notified when a significant
  11. * event happens in the life of a <code>RowSet</code> object.
  12. * A component becomes a listener by being registered with a
  13. * <code>RowSet</code> object via the method <code>RowSet.addRowSetListener</code>.
  14. * How a registered component implements this interface determines what it does
  15. * when it is notified of an event.
  16. *
  17. * @since 1.4
  18. */
  19. public interface RowSetListener extends java.util.EventListener {
  20. /**
  21. * Notifies registered listeners that a <code>RowSet</code> object
  22. * in the given <code>RowSetEvent</code> object has changed its entire contents.
  23. * <P>
  24. * The source of the event can be retrieved with the method
  25. * <code>event.getSource</code>.
  26. *
  27. * @param event a <code>RowSetEvent</code> object that contains
  28. * the <code>RowSet</code> object that is the source of the event
  29. */
  30. void rowSetChanged(RowSetEvent event);
  31. /**
  32. * Notifies registered listeners that a <code>RowSet</code> object
  33. * has had a change in one of its rows.
  34. * <P>
  35. * The source of the event can be retrieved with the method
  36. * <code>event.getSource</code>.
  37. *
  38. * @param event a <code>RowSetEvent</code> object that contains
  39. * the <code>RowSet</code> object that is the source of the event
  40. */
  41. void rowChanged(RowSetEvent event);
  42. /**
  43. * Notifies registered listeners that a <code>RowSet</code> object's
  44. * cursor has moved.
  45. * <P>
  46. * The source of the event can be retrieved with the method
  47. * <code>event.getSource</code>.
  48. *
  49. * @param event a <code>RowSetEvent</code> object that contains
  50. * the <code>RowSet</code> object that is the source of the event
  51. */
  52. void cursorMoved(RowSetEvent event);
  53. }