org.prevayler.implementation.publishing
Class AbstractPublisher

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

public abstract class AbstractPublisher
extends 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)
           
 void cancelSubscription(TransactionSubscriber subscriber)
          Stops publishing future transactions to the given subscriber.
 Clock clock()
          Returns a Clock which is consistent with the Transaction publishing time.
protected  void notifySubscribers(TransactionTimestamp transactionTimestamp)
           
 
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
close, publish, subscribe
 

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)

cancelSubscription

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

Specified by:
cancelSubscription in interface TransactionPublisher

notifySubscribers

protected void notifySubscribers(TransactionTimestamp transactionTimestamp)


Copyright © 2001-2013. All Rights Reserved.