org.jvnet.hk2.component
Class HabitatListenerWeakProxy

java.lang.Object
  extended by org.jvnet.hk2.component.HabitatListenerWeakProxy
All Implemented Interfaces:
EventListener, HabitatListener

public class HabitatListenerWeakProxy
extends Object
implements HabitatListener

A proxy where the underlying HabitatListener is held as a weak proxy and is automatically removed from the habitat if the proxy is GC'ed.

Author:
Jeff Trent

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jvnet.hk2.component.HabitatListener
HabitatListener.EventType
 
Constructor Summary
HabitatListenerWeakProxy(HabitatListener proxy)
           
 
Method Summary
 boolean inhabitantChanged(HabitatListener.EventType eventType, Habitat habitat, Inhabitant<?> inhabitant)
          Called when the habitat has changed.
 boolean inhabitantIndexChanged(HabitatListener.EventType eventType, Habitat habitat, Inhabitant<?> inhabitant, String index, String name, Object service)
          Called when the habitat index has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HabitatListenerWeakProxy

public HabitatListenerWeakProxy(HabitatListener proxy)
Method Detail

inhabitantChanged

public boolean inhabitantChanged(HabitatListener.EventType eventType,
                                 Habitat habitat,
                                 Inhabitant<?> inhabitant)
Description copied from interface: HabitatListener
Called when the habitat has changed.

Specified by:
inhabitantChanged in interface HabitatListener
Returns:
callee should return true to continue receiving notification, false otherwise

inhabitantIndexChanged

public boolean inhabitantIndexChanged(HabitatListener.EventType eventType,
                                      Habitat habitat,
                                      Inhabitant<?> inhabitant,
                                      String index,
                                      String name,
                                      Object service)
Description copied from interface: HabitatListener
Called when the habitat index has changed.

Specified by:
inhabitantIndexChanged in interface HabitatListener
Returns:
callee should return true to continue receiving notification, false otherwise


Copyright © 2011 Oracle Corporation. All Rights Reserved.