org.mmbase.core.event
Class WeakEventBroker

java.lang.Object
  extended by org.mmbase.core.event.EventBroker
      extended by org.mmbase.core.event.WeakEventBroker

public abstract class WeakEventBroker
extends EventBroker

An EventBroker which administrates the listeners in a WeakHashMap. This means that such listeners can be garbage collected, even if they are still brokered.

Since:
MMBase-1.8.5
Version:
$Id: WeakEventBroker.java 41744 2010-04-02 16:06:53Z michiel $
Author:
Michiel Meeuwissen

Constructor Summary
WeakEventBroker()
           
 
Method Summary
 boolean addListener(EventListener listener)
           
protected  Collection<EventListener> backing()
           
static void main(String[] argv)
           
 void notifyForEvent(Event event)
          Only adds synchronization, because backing is not concurrency proof.
 void removeListener(EventListener listener)
           
 String toString()
           
 
Methods inherited from class org.mmbase.core.event.EventBroker
canBrokerForEvent, canBrokerForListener, equals, getListeners, hashCode, notifyEventListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WeakEventBroker

public WeakEventBroker()
Method Detail

backing

protected Collection<EventListener> backing()
Specified by:
backing in class EventBroker

addListener

public boolean addListener(EventListener listener)
Specified by:
addListener in class EventBroker

removeListener

public void removeListener(EventListener listener)
Specified by:
removeListener in class EventBroker

notifyForEvent

public void notifyForEvent(Event event)
Only adds synchronization, because backing is not concurrency proof.

Overrides:
notifyForEvent in class EventBroker

toString

public String toString()
Specified by:
toString in class EventBroker

main

public static void main(String[] argv)


MMBase 2.0-SNAPSHOT - null