Package javax.enterprise.inject.se
Interface SeContainer
-
public interface SeContainer extends Instance<Object>, AutoCloseable
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 toInstance.select(java.lang.annotation.Annotation...)
method, the @Default qualifier is assumed.- Since:
- 2.0
- Author:
- Antoine Sabot-Durand, John D. Ament
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Shuts down this SeContainer instance when it is no longer in scope.BeanManager
getBeanManager()
Get the CDI BeanManager for this containerboolean
isRunning()
Check if the container is running or was shut down-
Methods inherited from interface javax.enterprise.inject.Instance
destroy, isAmbiguous, isResolvable, isUnsatisfied, select, select, select, stream
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
close
void close()
Shuts down this SeContainer instance when it is no longer in scope. Implemented from
AutoCloseable
,- Specified by:
close
in interfaceAutoCloseable
- Throws:
IllegalStateException
- if the container is already shutdown
-
isRunning
boolean isRunning()
Check if the container is running or was shut down- Returns:
- true if called before container shutdown
-
getBeanManager
BeanManager getBeanManager()
Get the CDI BeanManager for this container- Returns:
- the BeanManager
- Throws:
IllegalStateException
- if called when the container is already shutdown
-
-