Prevayler™
The Free Software
Prevalence Layer

org.prevayler.implementation.publishing
Class AbstractPublisher

java.lang.Object
  extended byorg.prevayler.implementation.publishing.AbstractPublisher
All Implemented Interfaces:
TransactionPublisher
Direct Known Subclasses:
CentralPublisher

public abstract class AbstractPublisher
extends java.lang.Object
implements TransactionPublisher

This class provides basic subscriber addition and notification.


Field Summary
protected  Clock _clock
           
 
Constructor Summary
AbstractPublisher(Clock clock)
           
 
Method Summary
 void addSubscriber(TransactionSubscriber subscriber)
           
 Clock clock()
          Returns a Clock which is consistent with the Transaction publishing time.
protected  void notifySubscribers(Transaction transaction, java.util.Date timestamp)
           
 void removeSubscriber(TransactionSubscriber subscriber)
          Stops publishing future transactions to the given subscriber.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.prevayler.implementation.publishing.TransactionPublisher
addSubscriber, close, publish
 

Field Detail

_clock

protected final Clock _clock
Constructor Detail

AbstractPublisher

public AbstractPublisher(Clock clock)
Method Detail

clock

public Clock clock()
Description copied from interface: TransactionPublisher
Returns a Clock which is consistent with the Transaction publishing time.

Specified by:
clock in interface TransactionPublisher

addSubscriber

public void addSubscriber(TransactionSubscriber subscriber)

removeSubscriber

public void removeSubscriber(TransactionSubscriber subscriber)
Description copied from interface: TransactionPublisher
Stops publishing future transactions to the given subscriber.

Specified by:
removeSubscriber in interface TransactionPublisher

notifySubscribers

protected void notifySubscribers(Transaction transaction,
                                 java.util.Date timestamp)


'Prevayler' is a trademark of Klaus Wuestefeld.
Copyleft 2001-2004 Klaus Wuestefeld.