Scala Library
|
|
scala/collection/mutable/Publisher.scala
]
trait
Publisher[Evt]
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 abstract type Pub
models the type of the publisher itself.Type Summary | |
type
|
Filter |
abstract type
|
Pub <: Publisher[Evt] |
type
|
Sub |
Value Summary | |
protected val
|
self
: Pub
The publisher itself of type `Pub'. Implemented by a cast from `this' here.
Needs to be overridden if the actual publisher is different from `this'.
|
Method Summary | |
def
|
activateSubscription (sub : Subscriber) : Unit |
override def
|
equals
(obj : Any) : Boolean
Checks if two publishers are structurally identical.
|
protected def
|
publish (event : Evt) : Unit |
def
|
removeSubscription (sub : Subscriber) : Unit |
def
|
removeSubscriptions : Unit |
def
|
subscribe (sub : Subscriber, filter : Function1) : Unit |
def
|
subscribe (sub : Subscriber) : 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 |
Value Details |
protected
val
self : Pub
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
|
|