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.Type Summary | |
type
|
Filter |
type
|
SubThis |
Method Summary | |
def
|
activateSubscription (sub : Subscriber) : Unit |
override def
|
equals
(obj : Any) : Boolean
Checks if two publishers are structurally identical.
|
protected def
|
publish (event : A) : Unit |
def
|
removeSubscription (sub : Subscriber) : Unit |
def
|
removeSubscriptions : Unit |
def
|
subscribe (sub : Subscriber) : Unit |
def
|
subscribe (sub : Subscriber, filter : Function1) : Unit |
def
|
suspendSubscription (sub : Subscriber) : Unit |
Methods inherited from AnyRef | |
getClass, hashCode, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Type Details |
Method Details |
def
subscribe(sub : Subscriber) : Unit
def
subscribe(sub : Subscriber, filter : Function1) : Unit
def
suspendSubscription(sub : Subscriber) : Unit
def
activateSubscription(sub : Subscriber) : Unit
def
removeSubscription(sub : Subscriber) : Unit
def
removeSubscriptions : Unit
Scala Library
|
|