com.cinecolombia.cinecolombia.control.web
Class ModelUpdateNotifier

java.lang.Object
  |
  +--com.cinecolombia.cinecolombia.control.web.ModelUpdateNotifier
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ModelManager

public class ModelUpdateNotifier
extends java.lang.Object
implements java.io.Serializable

This class is responsible for providing methods to add objects as listeners for a particular model update event and for notifying the listeners when the event actually occurs.

Author:
CincoSOFT
See Also:
Serialized Form
Created:
Junio 2003

Field Summary
private  Debug debug
           
private  java.util.HashMap listenerMap
           
 
Constructor Summary
ModelUpdateNotifier()
          constructor
 
Method Summary
 void addListener(java.lang.String modelType, java.lang.Object listener)
          registers a javabean that is view of Model corresponding to an event type
 void notifyListeners(java.util.Collection updatedModelList)
          notify to javabeans that are view of Model for updating; only javabeans corresponding to processed event are notified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listenerMap

private java.util.HashMap listenerMap

debug

private Debug debug
Constructor Detail

ModelUpdateNotifier

public ModelUpdateNotifier()
constructor

Method Detail

notifyListeners

public void notifyListeners(java.util.Collection updatedModelList)
notify to javabeans that are view of Model for updating; only javabeans corresponding to processed event are notified.

Parameters:
updatedModelList - list of names of Model objects that changed

addListener

public void addListener(java.lang.String modelType,
                        java.lang.Object listener)
registers a javabean that is view of Model corresponding to an event type

Parameters:
modelType - event type
listener - view javabean