Package org.jboss.weld.inject
Interface WeldInstance.Handler<T>
-
- Type Parameters:
T- the required bean type
- All Superinterfaces:
AutoCloseable,jakarta.enterprise.inject.Instance.Handle<T>
- Enclosing interface:
- WeldInstance<T>
@Deprecated public static interface WeldInstance.Handler<T> extends jakarta.enterprise.inject.Instance.Handle<T>
Deprecated.This interface is deprecated. CDI 4.0 introducedInstance.Handleinterface that offers the same functionality and can be used in place of Weld specificWeldInstance.Handler. This interface represents a contextual reference handler.Allows to inspect the metadata of the relevant bean and also to destroy the underlying contextual instance.
- Author:
- Martin Kouba
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidclose()Deprecated.Delegates todestroy().voiddestroy()Deprecated.Destroy the contextual instance.Tget()Deprecated.The contextual reference is obtained lazily, i.e.jakarta.enterprise.inject.spi.Bean<T>getBean()Deprecated.
-
-
-
Method Detail
-
get
T get()
Deprecated.The contextual reference is obtained lazily, i.e. when first needed.- Specified by:
getin interfacejakarta.enterprise.inject.Instance.Handle<T>- Returns:
- the contextual reference
- Throws:
IllegalStateException- If the producingWeldInstancedoes not exist- See Also:
Provider.get()
-
getBean
jakarta.enterprise.inject.spi.Bean<T> getBean()
Deprecated.- Specified by:
getBeanin interfacejakarta.enterprise.inject.Instance.Handle<T>- Returns:
- the bean metadata
-
destroy
void destroy()
Deprecated.Destroy the contextual instance. It's a no-op if:- called multiple times
- if the producing
WeldInstancedoes not exist - if the handler does not hold a contextual reference, i.e.
get()was never called
- Specified by:
destroyin interfacejakarta.enterprise.inject.Instance.Handle<T>- See Also:
Instance.destroy(Object)
-
close
void close()
Deprecated.Delegates todestroy().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacejakarta.enterprise.inject.Instance.Handle<T>
-
-