Top Description Methods
jakarta.enterprise.inject.se

public Interface SeContainer

extends Instance<Object>, AutoCloseable
Imports
jakarta.enterprise.inject.Instance, jakarta.enterprise.inject.spi.BeanContainer, .BeanManager

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 select method, the @Default qualifier is assumed.

CDI Lite implementations are not required to provide support for CDI in Java SE.

Authors
Antoine Sabot-Durand, John D. Ament, Graeme Rocher
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public void
close()

Redeclares java.lang.AutoCloseable.close.

Shuts down this SeContainer instance when it is no longer in scope.

public default BeanContainer

Returns:

the BeanContainer
getBeanContainer
()

Get the CDI BeanContainer for this container.

public BeanManager

Returns:

the BeanManager
getBeanManager
()

Get the CDI BeanManager for this container

public boolean

Returns:

true if called before container shutdown
isRunning
()

Check if the container is running or was shut down

Inherited from jakarta.enterprise.inject.Instance:
destroygetHandlehandleshandlesStreamisAmbiguousisResolvableisUnsatisfiedselectselectselectstream

Method Detail

closeback to summary
public void close()

Redeclares java.lang.AutoCloseable.close.

Shuts down this SeContainer instance when it is no longer in scope. Implemented from AutoCloseable,

Annotations
@Override
Exceptions
IllegalStateException:
if the container is already shutdown
getBeanContainerback to summary
public default BeanContainer getBeanContainer()

Get the CDI BeanContainer for this container. Default implementation just forwards the call to getBeanManager().

Returns:BeanContainer

the BeanContainer

Since
4.0
getBeanManagerback to summary
public BeanManager getBeanManager()

Get the CDI BeanManager for this container

Returns:BeanManager

the BeanManager

Exceptions
IllegalStateException:
if called when the container is already shutdown
isRunningback to summary
public boolean isRunning()

Check if the container is running or was shut down

Returns:boolean

true if called before container shutdown