com.instantbank.lettertemplate.control.web
Class ModelUpdateNotifier
java.lang.Object
|
+--com.instantbank.lettertemplate.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:
- Instant-bank (Consuelo Franky)
- See Also:
- Serialized Form
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, registerNatives, toString, wait, wait, wait |
listenerMap
private java.util.HashMap listenerMap
debug
private Debug debug
ModelUpdateNotifier
public ModelUpdateNotifier()
- constructor
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 typelistener
- view javabean