Package jakarta.enterprise.inject.se
Interface SeContainer
- All Superinterfaces:
- AutoCloseable,- Instance<Object>,- Iterable<Object>,- jakarta.inject.Provider<Object>
Provides access to the current container in Java SE.
 
 SeContainer implements Instance and therefore might be used to perform programmatic lookup.
 If no qualifier is passed to Instance.select(java.lang.annotation.Annotation...) method, the @Default qualifier is assumed.
 
CDI Lite implementations are not required to provide support for CDI in Java SE.
- Since:
- 2.0
- Author:
- Antoine Sabot-Durand, John D. Ament, Graeme Rocher
- 
Nested Class SummaryNested classes/interfaces inherited from interface jakarta.enterprise.inject.InstanceInstance.Handle<T>
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Shuts down this SeContainer instance when it is no longer in scope.default BeanContainerGet the CDIBeanContainerfor this container.Get the CDI BeanManager for this containerbooleanCheck if the container is running or was shut downMethods inherited from interface jakarta.enterprise.inject.Instancedestroy, getHandle, handles, handlesStream, isAmbiguous, isResolvable, isUnsatisfied, select, select, select, streamMethods inherited from interface java.lang.IterableforEach, iterator, spliteratorMethods inherited from interface jakarta.inject.Providerget
- 
Method Details- 
closevoid close()Shuts down this SeContainer instance when it is no longer in scope. Implemented from AutoCloseable,- Specified by:
- closein interface- AutoCloseable
- Throws:
- IllegalStateException- if the container is already shutdown
 
- 
isRunningboolean isRunning()Check if the container is running or was shut down- Returns:
- true if called before container shutdown
 
- 
getBeanManagerBeanManager getBeanManager()Get the CDI BeanManager for this container- Returns:
- the BeanManager
- Throws:
- IllegalStateException- if called when the container is already shutdown
 
- 
getBeanContainerGet the CDIBeanContainerfor this container. Default implementation just forwards the call togetBeanManager().- Returns:
- the BeanContainer
- Since:
- 4.0
 
 
-