org.apache.lenya.cms.observation
Class ObservationManager

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.cms.observation.ObservationManager
All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.thread.ThreadSafe, org.apache.lenya.cms.observation.ObservationRegistry, org.apache.lenya.cms.observation.RepositoryListener

public class ObservationManager
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements org.apache.lenya.cms.observation.ObservationRegistry, org.apache.avalon.framework.thread.ThreadSafe

Observation manager. Works as an observation registry and sends the notifications.


Field Summary
 
Fields inherited from interface org.apache.lenya.cms.observation.ObservationRegistry
ROLE
 
Constructor Summary
ObservationManager()
           
 
Method Summary
 void eventFired(org.apache.lenya.cms.observation.RepositoryEvent event)
           
protected  java.util.Set getAllListeners(org.apache.lenya.cms.publication.DocumentIdentifier doc)
           
protected  org.apache.lenya.cms.publication.DocumentIdentifier getIdentifier(org.apache.lenya.cms.observation.DocumentEvent event)
           
protected  java.util.Set getListeners(org.apache.lenya.cms.publication.DocumentIdentifier doc)
           
protected  void notify(java.util.Set listeners, org.apache.lenya.cms.observation.RepositoryEvent event)
           
 void registerListener(org.apache.lenya.cms.observation.RepositoryListener listener)
           
 void registerListener(org.apache.lenya.cms.observation.RepositoryListener listener, org.apache.lenya.cms.publication.Document doc)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObservationManager

public ObservationManager()
Method Detail

registerListener

public void registerListener(org.apache.lenya.cms.observation.RepositoryListener listener,
                             org.apache.lenya.cms.publication.Document doc)
                      throws org.apache.lenya.cms.observation.ObservationException
Specified by:
registerListener in interface org.apache.lenya.cms.observation.ObservationRegistry
Throws:
org.apache.lenya.cms.observation.ObservationException

getListeners

protected java.util.Set getListeners(org.apache.lenya.cms.publication.DocumentIdentifier doc)

registerListener

public void registerListener(org.apache.lenya.cms.observation.RepositoryListener listener)
                      throws org.apache.lenya.cms.observation.ObservationException
Specified by:
registerListener in interface org.apache.lenya.cms.observation.ObservationRegistry
Throws:
org.apache.lenya.cms.observation.ObservationException

getIdentifier

protected org.apache.lenya.cms.publication.DocumentIdentifier getIdentifier(org.apache.lenya.cms.observation.DocumentEvent event)

getAllListeners

protected java.util.Set getAllListeners(org.apache.lenya.cms.publication.DocumentIdentifier doc)

notify

protected void notify(java.util.Set listeners,
                      org.apache.lenya.cms.observation.RepositoryEvent event)

eventFired

public void eventFired(org.apache.lenya.cms.observation.RepositoryEvent event)
Specified by:
eventFired in interface org.apache.lenya.cms.observation.RepositoryListener


Copyright $ Apache Software Foundation. All Rights Reserved.