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
Exception
void shutdownContainer() throws Exception
Exception
void stopContexts() throws Exception
Exception
void startCustomScope(Class<? extends Annotation> scopeClass) throws Exception
Exception
void stopCustomScope(Class<? extends Annotation> scopeClass) throws Exception
Exception
javax.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–2016 The Apache Software Foundation. All rights reserved.