Package org.apache.webbeans.spi
Interface ResourceInjectionService
-
public interface ResourceInjectionService
This service is responsible for injecting the Java EE injectable resources. Please see the Section 5 of the Java EE specification.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
clear()
Any clear functionality.<X,T extends Annotation>
XgetResourceReference(ResourceReference<X,T> resourceReference)
Gets resource for the given resource reference.void
injectJavaEEResources(Object managedBeanInstance)
Container where OWB is deployed must responsible for injecting Java EE resources defined by this managed bean.default <T> T
readExternal(jakarta.enterprise.inject.spi.Bean<T> bean, ObjectInput out)
Deprecated.has not been used since 1.1.x.default <T> void
writeExternal(jakarta.enterprise.inject.spi.Bean<T> bean, T actualResource, ObjectOutput out)
Deprecated.has not been used since 1.1.x.
-
-
-
Method Detail
-
injectJavaEEResources
void injectJavaEEResources(Object managedBeanInstance)
Container where OWB is deployed must responsible for injecting Java EE resources defined by this managed bean. This includes, field and method injections. How to inject those resources are defined by Java EE specification.This is only used for ManagedBean classes. It is not for injection Session Beans or any other Java EE components. Because those are already injected by the related container, for example EJB Container, Web Container etc.
- Parameters:
managedBeanInstance
- managed bean instance
-
getResourceReference
<X,T extends Annotation> X getResourceReference(ResourceReference<X,T> resourceReference)
Gets resource for the given resource reference.This method is used for getting individual resource references that are defined by the ManagedBean producer fields. For example;
- Type Parameters:
T
- resource type, @EJB, @Resource, @WebServiceRef, @PersistenceContext or @PersistenceUnit- Parameters:
resourceReference
-- Returns:
- resource for the given resource reference
-
clear
void clear()
Any clear functionality.This is called by the container at shutdown. Services may clear its caches or any other useful functionality.
-
writeExternal
default <T> void writeExternal(jakarta.enterprise.inject.spi.Bean<T> bean, T actualResource, ObjectOutput out) throws IOException
Deprecated.has not been used since 1.1.x. We can finally remove it some daydelegation of serialization behavior- Throws:
IOException
-
readExternal
default <T> T readExternal(jakarta.enterprise.inject.spi.Bean<T> bean, ObjectInput out) throws IOException, ClassNotFoundException
Deprecated.has not been used since 1.1.x. We can finally remove it some daydelegation of serialization behavior- Throws:
IOException
ClassNotFoundException
-
-