com.mmm.cms.homehealth
Class HomeHealthEventNotifier

java.lang.Object
  extended by com.mmm.cms.homehealth.HomeHealthEventNotifier
All Implemented Interfaces:
HomeHealthEventNotifierIF
Direct Known Subclasses:
GrouperVersion_v2308_1, GrouperVersion_v3210, GrouperVersion0203cAndPrior

public class HomeHealthEventNotifier
extends java.lang.Object
implements HomeHealthEventNotifierIF

This is a base class for providing event notification to event listeners.


Constructor Summary
HomeHealthEventNotifier()
          Constructor for initializing the list of listeners
 
Method Summary
 void addEventListener(HomeHealthEventListenerIF listener)
          Adds a scoring listener to this grouper
 java.util.Iterator<HomeHealthEventListenerIF> getEventListeners()
          gets an iterator for the event listenters
 int getListenerCount()
          This a useful when determine when to report events.
 void notifyEventListeners(HomeHealthEventIF event)
          If there are listenter, the send them the event and let them do what they want.
 void removeEventListener(HomeHealthEventListenerIF listener)
          Removes a listener from this Grouper.
 void removeEventListeners()
          Removes all the listenrs from this Grouper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HomeHealthEventNotifier

public HomeHealthEventNotifier()
Constructor for initializing the list of listeners

Method Detail

addEventListener

public void addEventListener(HomeHealthEventListenerIF listener)
Adds a scoring listener to this grouper

Specified by:
addEventListener in interface HomeHealthEventNotifierIF
Parameters:
listener -

getEventListeners

public java.util.Iterator<HomeHealthEventListenerIF> getEventListeners()
gets an iterator for the event listenters

Specified by:
getEventListeners in interface HomeHealthEventNotifierIF
Returns:
An iterator of the scoring listeners. Will not be null, but may not have any listeners to iterator over

notifyEventListeners

public void notifyEventListeners(HomeHealthEventIF event)
If there are listenter, the send them the event and let them do what they want.

Specified by:
notifyEventListeners in interface HomeHealthEventNotifierIF
Parameters:
event -

removeEventListener

public void removeEventListener(HomeHealthEventListenerIF listener)
Removes a listener from this Grouper.

Specified by:
removeEventListener in interface HomeHealthEventNotifierIF
Parameters:
listener -

removeEventListeners

public void removeEventListeners()
Removes all the listenrs from this Grouper

Specified by:
removeEventListeners in interface HomeHealthEventNotifierIF

getListenerCount

public int getListenerCount()
This a useful when determine when to report events. Since some reporting takes up processing time unrelated to actual scoring, determine if reporting is necessary (i.e. listeners count > 0) helps to cut down on any unnecessary processing/building of the detailed event information. See the fireScoring... methods for examples of this.

Specified by:
getListenerCount in interface HomeHealthEventNotifierIF
Returns:
the number of listeners for this Grouper