de.nava.informa.utils.poller
Class CompositeObserver

java.lang.Object
  extended by de.nava.informa.utils.poller.CompositeObserver
All Implemented Interfaces:
PollerObserverIF

 class CompositeObserver
extends Object
implements PollerObserverIF

Composite observer delivers all received events to sub observers.

Author:
Aleksey Gureev (spyromus@noizeramp.com)

Constructor Summary
CompositeObserver()
           
 
Method Summary
 void add(PollerObserverIF observer)
          Adds new observer to the list.
 void channelChanged(ChannelIF channel)
          Invoked when Poller detected changes in channel information (title and etc).
 void channelErrored(ChannelIF channel, Exception e)
          Invoked by Poller when poller of the channel failed.
 void itemFound(ItemIF item, ChannelIF channel)
          Invoked by Poller when new item is approved for addition.
 void pollFinished(ChannelIF channel)
          Invoked by Poller when checking of the channel finished.
 void pollStarted(ChannelIF channel)
          Invoked by Poller when checking of the channel started.
 void remove(PollerObserverIF observer)
          Removes observer from the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeObserver

CompositeObserver()
Method Detail

itemFound

public final void itemFound(ItemIF item,
                            ChannelIF channel)
Invoked by Poller when new item is approved for addition. Item is transient and should be added to specified channel.

Specified by:
itemFound in interface PollerObserverIF
Parameters:
item - item added.
channel - destination channel.

channelErrored

public final void channelErrored(ChannelIF channel,
                                 Exception e)
Invoked by Poller when poller of the channel failed.

Specified by:
channelErrored in interface PollerObserverIF
Parameters:
channel - channel.
e - original cause of failure.

channelChanged

public final void channelChanged(ChannelIF channel)
Invoked when Poller detected changes in channel information (title and etc).

Specified by:
channelChanged in interface PollerObserverIF
Parameters:
channel - channel.

pollStarted

public final void pollStarted(ChannelIF channel)
Invoked by Poller when checking of the channel started.

Specified by:
pollStarted in interface PollerObserverIF
Parameters:
channel - channel.

pollFinished

public final void pollFinished(ChannelIF channel)
Invoked by Poller when checking of the channel finished.

Specified by:
pollFinished in interface PollerObserverIF
Parameters:
channel - channel.

add

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

Parameters:
observer - new observer.

remove

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

Parameters:
observer - registered observer.


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