in scala/collection/mutable
class Publisher

abstract class Publisher[A,This<:Publisher[A,This]]()
extends Object
with ScalaObject
Implementing classes or objects:
class ObservableMap[A,B,This<:ObservableMap[A,B,This]]()
class ObservableBuffer[A,This<:ObservableBuffer[A,This]]()
class ObservableSet[A,This<:ObservableSet[A,This]]()

Publisher[A,This] objects publish events of type A to all registered subscribers. When subscribing, a subscriber may specify a filter which can be used to constrain the number of events sent to the subscriber. Subscribers may suspend their subscription, or reactivate a suspended subscription. Class Publisher is typically used as a mixin. The type variable This models self types.
Author:
Matthias Zenger
Version:
1.0, 08/07/2003

Method Summary
  def activateSubscription(sub: Subscriber[A,This]): Unit
protected def publish(event: A): Unit
  def removeSubscription(sub: Subscriber[A,This]): Unit
  def removeSubscriptions: Unit
  def subscribe(sub: Subscriber[A,This]): Unit
  def subscribe(sub: Subscriber[A,This], filter: (A) => Boolean): Unit
  def suspendSubscription(sub: Subscriber[A,This]): Unit

Methods inherited from java/lang/Object-class
clone, eq, equals, finalize, getClass, hashCode, ne, notify, notifyAll, synchronized, toString, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/ScalaObject-class
getScalaType

Method Detail

subscribe

  def subscribe(sub: Subscriber[A,This]): Unit

subscribe

  def subscribe(sub: Subscriber[A,This], filter: (A) => Boolean): Unit

suspendSubscription

  def suspendSubscription(sub: Subscriber[A,This]): Unit

activateSubscription

  def activateSubscription(sub: Subscriber[A,This]): Unit

removeSubscription

  def removeSubscription(sub: Subscriber[A,This]): Unit

removeSubscriptions

  def removeSubscriptions: Unit

publish

  protected def publish(event: A): Unit