public class ContainerTestContext extends Object implements javax.enterprise.context.spi.Context
If not running in a ContainerTest scope, the context will
| Modifier and Type | Class and Description |
|---|---|
static class |
ContainerTestContext.CustomScopeInstance<T> |
| Constructor and Description |
|---|
ContainerTestContext() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
get(javax.enterprise.context.spi.Contextual<T> contextual) |
<T> T |
get(javax.enterprise.context.spi.Contextual<T> contextual,
javax.enterprise.context.spi.CreationalContext<T> creationalContext) |
Class<? extends Annotation> |
getScope() |
boolean |
isActive() |
static boolean |
isContextActive()
Static method to evaluate if the context is active, i.e.
|
public Class<? extends Annotation> getScope()
getScope in interface javax.enterprise.context.spi.Contextpublic <T> T get(javax.enterprise.context.spi.Contextual<T> contextual,
javax.enterprise.context.spi.CreationalContext<T> creationalContext)
get in interface javax.enterprise.context.spi.Contextpublic <T> T get(javax.enterprise.context.spi.Contextual<T> contextual)
get in interface javax.enterprise.context.spi.Contextpublic boolean isActive()
isActive in interface javax.enterprise.context.spi.Contextpublic static boolean isContextActive()
Note that CDI will create the proxy in any case, but if the scope is not active, accessing it will throw a ContextNotActiveException.
Copyright © 2015. All rights reserved.