public interface CdiTestContainer
| Modifier and Type | Method and Description |
|---|---|
void |
bootContainer()
Booting the CdiTestContainer will scan the whole classpath
for Beans and extensions available.
|
javax.enterprise.inject.spi.BeanManager |
getBeanManager() |
<T> T |
getInstance(Class<T> type,
Annotation... qualifiers)
Provide a contextual reference via it's type and optional qualifier annotations.
|
Object |
getInstance(String elNname)
Provide a contextual reference via it's type and ExpressionLanguage name.
|
void |
shutdownContainer()
This will shutdown the underlying CDI container.
|
void |
startApplicationScope() |
void |
startContexts()
This will start all Contexts
|
void |
startConversationScope() |
void |
startCustomScope(Class<? extends Annotation> scopeClass) |
void |
startRequestScope() |
void |
startSessionScope() |
void |
stopApplicationScope() |
void |
stopContexts()
Stop all Contexts and destroy all beans properly
|
void |
stopConversationScope() |
void |
stopCustomScope(Class<? extends Annotation> scopeClass) |
void |
stopRequestScope() |
void |
stopSessionScope() |
void bootContainer()
throws Exception
Exceptionvoid shutdownContainer()
throws Exception
Exceptionvoid stopContexts()
throws Exception
Exceptionvoid startCustomScope(Class<? extends Annotation> scopeClass) throws Exception
Exceptionvoid stopCustomScope(Class<? extends Annotation> scopeClass) throws Exception
Exceptionjavax.enterprise.inject.spi.BeanManager getBeanManager()
BeanManager or null it not available<T> T getInstance(Class<T> type, Annotation... qualifiers) throws javax.enterprise.inject.ResolutionException
T - the Type of the contextual referencetype - the Type of the contextual referencequalifiers - optional qualifiers to restrict the searchjavax.enterprise.inject.ResolutionException - if not exactly 1 Bean<T> got foundObject getInstance(String elNname) throws javax.enterprise.inject.ResolutionException
T - the Type of the contextual referenceelName - the EL name to search for.javax.enterprise.inject.ResolutionException - if not exactly 1 Bean<T> got foundCopyright © 2008–2022 The Apache Software Foundation. All rights reserved.