Scala Library
|
|
scala/swing/Publisher.scala
]
trait
Publisher
extends
ReactorNotifies registered reactions when an event is published. Publishers are also reactors and listen to themselves per default as a convenience.
In order to reduce memory leaks, reactions are weakly referenced by default,
unless they implement Reactions.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.
|
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 |
Scala Library
|
|