Scala Library
|
|
scala/collection/mutable/Publisher.scala
]
trait
Publisher[A, This <: Publisher[A, This]]
extends
AnyRefPublisher[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.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], filter : (A) => Boolean) : Unit |
def
|
subscribe (sub : Subscriber[A, This]) : Unit |
def
|
suspendSubscription (sub : Subscriber[A, This]) : Unit |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
def
subscribe(sub : Subscriber[A, This]) : Unit
def
suspendSubscription(sub : Subscriber[A, This]) : Unit
def
activateSubscription(sub : Subscriber[A, This]) : Unit
def
removeSubscription(sub : Subscriber[A, This]) : Unit
def
removeSubscriptions : Unit
Scala Library
|
|