public class CdiTestOpenWebBeansContainer extends Object implements CdiTestContainer
CdiTestContainer.| Constructor and Description |
|---|
CdiTestOpenWebBeansContainer() |
| 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 name)
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() |
public void bootContainer()
throws Exception
CdiTestContainerbootContainer in interface CdiTestContainerExceptionpublic void shutdownContainer()
throws Exception
CdiTestContainershutdownContainer in interface CdiTestContainerExceptionpublic void startContexts()
throws Exception
CdiTestContainerstartContexts in interface CdiTestContainerExceptionpublic void startApplicationScope()
throws Exception
startApplicationScope in interface CdiTestContainerExceptionpublic void startConversationScope()
throws Exception
startConversationScope in interface CdiTestContainerExceptionpublic void startCustomScope(Class<? extends Annotation> scopeClass) throws Exception
startCustomScope in interface CdiTestContainerExceptionpublic void startRequestScope()
throws Exception
startRequestScope in interface CdiTestContainerExceptionpublic void startSessionScope()
throws Exception
startSessionScope in interface CdiTestContainerExceptionpublic void stopContexts()
throws Exception
CdiTestContainerstopContexts in interface CdiTestContainerExceptionpublic void stopApplicationScope()
throws Exception
stopApplicationScope in interface CdiTestContainerExceptionpublic void stopConversationScope()
throws Exception
stopConversationScope in interface CdiTestContainerExceptionpublic void stopCustomScope(Class<? extends Annotation> scopeClass) throws Exception
stopCustomScope in interface CdiTestContainerExceptionpublic void stopRequestScope()
throws Exception
stopRequestScope in interface CdiTestContainerExceptionpublic void stopSessionScope()
throws Exception
stopSessionScope in interface CdiTestContainerExceptionpublic javax.enterprise.inject.spi.BeanManager getBeanManager()
getBeanManager in interface CdiTestContainerBeanManager or null it not availablepublic <T> T getInstance(Class<T> type, Annotation... qualifiers) throws javax.enterprise.inject.ResolutionException
CdiTestContainergetInstance in interface CdiTestContainerT - 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 foundpublic Object getInstance(String name) throws javax.enterprise.inject.ResolutionException
CdiTestContainergetInstance in interface CdiTestContainerjavax.enterprise.inject.ResolutionException - if not exactly 1 Bean<T> got foundCopyright © 2008–2022 The Apache Software Foundation. All rights reserved.