de.nava.informa.utils.cleaner
Class PersistenceObserver

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

public class PersistenceObserver
extends Object
implements CleanerObserverIF

Watches for events about unwanted items and removes them from channel using given manager.

Author:
Aleksey Gureev (spyromus@noizeramp.com)

Constructor Summary
PersistenceObserver(PersistenceManagerIF manager)
          Creates observer.
 
Method Summary
 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 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

PersistenceObserver

public PersistenceObserver(PersistenceManagerIF manager)
Creates observer.

Parameters:
manager - manager to use for persistent changes.
Throws:
IllegalArgumentException - if manager isn't specified.
Method Detail

unwantedItem

public final 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.


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