org.sonatype.guice.bean.locators
Interface BeanLocator

All Known Subinterfaces:
MutableBeanLocator
All Known Implementing Classes:
DefaultBeanLocator

public interface BeanLocator

Dynamic locator of beans annotated with Qualifier annotations.


Method Summary
<Q extends java.lang.annotation.Annotation,T>
java.lang.Iterable<QualifiedBean<Q,T>>
locate(com.google.inject.Key<T> key, java.lang.Runnable notify)
          Locates beans that match the given qualified binding Key.
<Q extends java.lang.annotation.Annotation,T,W>
void
watch(com.google.inject.Key<T> key, Mediator<Q,T,W> mediator, W watcher)
          Watches out for beans that match the given qualified binding Key.
 

Method Detail

locate

<Q extends java.lang.annotation.Annotation,T> java.lang.Iterable<QualifiedBean<Q,T>> locate(com.google.inject.Key<T> key,
                                                                                            java.lang.Runnable notify)
Locates beans that match the given qualified binding Key.

Parameters:
key - The qualified key
notify - Optional callback; called when the bean sequence changes
Returns:
Sequence of beans that match the given key

watch

<Q extends java.lang.annotation.Annotation,T,W> void watch(com.google.inject.Key<T> key,
                                                           Mediator<Q,T,W> mediator,
                                                           W watcher)
Watches out for beans that match the given qualified binding Key.
The Mediator mediates bean events between locator and watcher.

Parameters:
key - The qualified key
mediator - The update mediator
watcher - The bean watcher


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.