org.jvnet.hk2.component
Interface HabitatListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
DefaultRunLevelService, HabitatListenerWeakProxy

@Contract
public interface HabitatListener
extends EventListener

For Listening to the Habitat.

Author:
Jeff Trent
See Also:
Habitat.addHabitatListener(HabitatListener), Habitat.removeHabitatListener(HabitatListener)

Nested Class Summary
static class HabitatListener.EventType
           
 
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.
 

Method Detail

inhabitantChanged

boolean inhabitantChanged(HabitatListener.EventType eventType,
                          Habitat habitat,
                          Inhabitant<?> inhabitant)
Called when the habitat has changed.

Parameters:
eventType -
habitat -
inhabitant -
Returns:
callee should return true to continue receiving notification, false otherwise

inhabitantIndexChanged

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

Parameters:
eventType -
habitat -
inhabitant -
Returns:
callee should return true to continue receiving notification, false otherwise


Copyright © 2011 Oracle Corporation. All Rights Reserved.