trait
Publisher extends Reactor
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
deafTo(ps: Publisher*): Unit
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
listenTo(ps: Publisher*): Unit
-
val
listeners: RefSet[Reaction] { val underlying: scala.collection.mutable.HashSet[scala.ref.Reference[scala.swing.Reactions.Reaction]] }
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
publish(e: Event): Unit
-
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Notifies 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.