|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sonatype.guice.bean.locators.DefaultBeanLocator
@Singleton public final class DefaultBeanLocator
Default BeanLocator
that locates qualified beans across a dynamic group of Injector
s.
Constructor Summary | |
---|---|
DefaultBeanLocator()
|
Method Summary | ||
---|---|---|
void |
add(com.google.inject.Injector injector)
Adds qualified beans belonging to the given injector to any exposed/watched sequences. |
|
void |
clear()
Removes all known qualified beans from any exposed/watched sequences. |
|
|
locate(com.google.inject.Key<T> key,
java.lang.Runnable notify)
Locates beans that match the given qualified binding Key . |
|
void |
remove(com.google.inject.Injector injector)
Removes qualified beans belonging to the given injector from any exposed/watched sequences. |
|
|
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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultBeanLocator()
Method Detail |
---|
public <Q extends java.lang.annotation.Annotation,T> java.lang.Iterable<QualifiedBean<Q,T>> locate(com.google.inject.Key<T> key, java.lang.Runnable notify)
BeanLocator
Key
.
locate
in interface BeanLocator
key
- The qualified keynotify
- Optional callback; called when the bean sequence changes
public <Q extends java.lang.annotation.Annotation,T,W> void watch(com.google.inject.Key<T> key, Mediator<Q,T,W> mediator, W watcher)
BeanLocator
Key
. Mediator
mediates bean events between locator and watcher.
watch
in interface BeanLocator
key
- The qualified keymediator
- The update mediatorwatcher
- The bean watcher@Inject public void add(com.google.inject.Injector injector)
MutableBeanLocator
add
in interface MutableBeanLocator
injector
- The new injectorpublic void remove(com.google.inject.Injector injector)
MutableBeanLocator
remove
in interface MutableBeanLocator
injector
- The old injectorpublic void clear()
MutableBeanLocator
clear
in interface MutableBeanLocator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |