001 package util; 002 003 import java.util.EventListener; 004 005 /** 006 * A listener that can be helped by ListenerHelper. HelpableListeners must use a ListenerHelper to maintain 007 * their list of listeners. Whenever a query is performed on the HelpableListener it must assure 008 * up-to-date-ness of its model by calling (@link ListenerHelper#needModelUpdate}. 009 * 010 * @see ListenerHelper 011 * 012 * @author Steffen Zschaler 013 * @version 2.0 02/06/1999 014 * @since v2.0 015 */ 016 public interface HelpableListener extends EventListener { 017 018 /** 019 * Called when the listener should subscribe to its own event source. 020 * 021 * @override Always 022 */ 023 public void subscribe(); 024 025 /** 026 * Called when the listener should unsubscribe from its own event source. 027 * 028 * @override Always 029 */ 030 public void unsubscribe(); 031 032 /** 033 * Called to update the listeners own model representation. 034 * 035 * @override Always 036 */ 037 public void updateModel(); 038 039 }