|
rewrite-integration-cdi 1.0.5.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ocpsoft.rewrite.cdi.manager.BeanManagerLocator
public class BeanManagerLocator
A utility for use in non-managed classes, which are not able to obtain a reference to the BeanManager using
injection.
BeanManagerProvider is an SPI that may be implemented to allow third parties to register custom methods of
looking up the BeanManager in an external context. This class will consult implementations according to precedence.
**WARNING** This class is NOT a clever way to get the BeanManager, and should be avoided at all
costs. If you need a handle to the BeanManager you should probably register an Extension instead
of using this class; have you tried using @Inject?
If you think you need to use this class, chat to the community and make sure you aren't missing a trick!
BeanManagerProvider,
BeanManagerAware| Constructor Summary | |
|---|---|
BeanManagerLocator()
|
|
| Method Summary | |
|---|---|
javax.enterprise.inject.spi.BeanManager |
getBeanManager()
If a lookup has not yet been performed, consult registered BeanManagerProvider implementations to locate
the BeanManager and return the result. |
BeanManagerProvider |
getLocatingProvider()
Return the BeanManagerProvider that was used to locate the BeanManager. |
boolean |
isBeanManagerAvailable()
If a lookup has not yet been performed, consult registered BeanManagerProvider implementations to locate
the BeanManager and return whether it was found, caching the result. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanManagerLocator()
| Method Detail |
|---|
public javax.enterprise.inject.spi.BeanManager getBeanManager()
BeanManagerProvider implementations to locate
the BeanManager and return the result. If the BeanManager cannot be resolved, throw a
BeanManagerUnavailableException.
BeanManagerUnavailableException - if the BeanManager cannot be resolvedpublic boolean isBeanManagerAvailable()
BeanManagerProvider implementations to locate
the BeanManager and return whether it was found, caching the result.
true if the bean manager has been found, otherwise falsepublic BeanManagerProvider getLocatingProvider()
BeanManagerProvider that was used to locate the BeanManager. This method will not attempt a
lookup.
|
rewrite-integration-cdi 1.0.5.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||