Scala Library
|
|
scala/swing/Publisher.scala
]
trait
Publisher
extends
ReactorReactions.StronglyReferenced
. That way,
the lifetime of reactions are more easily bound to the registering object,
which are reactors in common client code and hold strong references to their
reactions. As a result, reactors can be garbage collected even though they
still have reactions registered at some publisher, but not vice versa
since reactors (strongly) reference publishers they are interested in.Value Summary | |
protected val
|
listeners : scala.swing.RefSet[PartialFunction] |
Values and Variables inherited from Reactor | |
reactions |
Method Summary | |
def
|
publish
(e : Event) : Unit
Notify all registered reactions.
|
def
|
subscribe (listener : PartialFunction) : Unit |
def
|
unsubscribe (listener : PartialFunction) : Unit |
Methods inherited from Reactor | |
listenTo, deafTo |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Value Details |
Method Details |
def
subscribe(listener : PartialFunction) : Unit
def
unsubscribe(listener : PartialFunction) : Unit
Scala Library
|
|