de.nava.informa.utils.cleaner
Class CompositeObserver

java.lang.Object
  extended by de.nava.informa.utils.cleaner.CompositeObserver
All Implemented Interfaces:
CleanerObserverIF

 class CompositeObserver
extends Object
implements CleanerObserverIF

Composite observer follows Composite pattern to combine several observers. When it receives event it delivers this event to all of it's sub-observers.

Author:
Aleksey Gureev (spyromus@noizeramp.com)

Constructor Summary
CompositeObserver()
           
 
Method Summary
 void add(CleanerObserverIF observer)
          Adds new observer to the list.
 void cleaningFinished(ChannelIF channel)
          Invoked by cleanup engine when cleaning of the channel has finished.
 void cleaningStarted(ChannelIF channel)
          Invoked by cleanup engine when cleaning of the channel has started.
 void remove(CleanerObserverIF observer)
          Removes observer from the list.
 void unwantedItem(ItemIF item, ChannelIF channel)
          Invoked when cleanup engine finds unwanted item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeObserver

CompositeObserver()
Method Detail

unwantedItem

public void unwantedItem(ItemIF item,
                         ChannelIF channel)
Invoked when cleanup engine finds unwanted item.

Specified by:
unwantedItem in interface CleanerObserverIF
Parameters:
item - unwanted item.
channel - channel this item resides in.

cleaningStarted

public void cleaningStarted(ChannelIF channel)
Invoked by cleanup engine when cleaning of the channel has started.

Specified by:
cleaningStarted in interface CleanerObserverIF
Parameters:
channel - channel being cleaned.

cleaningFinished

public void cleaningFinished(ChannelIF channel)
Invoked by cleanup engine when cleaning of the channel has finished.

Specified by:
cleaningFinished in interface CleanerObserverIF
Parameters:
channel - channel being cleaned.

add

public final void add(CleanerObserverIF observer)
Adds new observer to the list.

Parameters:
observer - new observer.

remove

public final void remove(CleanerObserverIF observer)
Removes observer from the list.

Parameters:
observer - registered observer.


Copyright © 2002-2007 Niko Schmuck. All Rights Reserved.