Package org.glassfish.tyrus.gf.cdi
Class CdiComponentProvider
java.lang.Object
org.glassfish.tyrus.core.ComponentProvider
org.glassfish.tyrus.gf.cdi.CdiComponentProvider
Provides the instance for CDI class.
- Author:
- Stepan Kopriva
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.glassfish.tyrus.core.ComponentProvider
getInvocableMethod
-
Constructor Details
-
CdiComponentProvider
Constructor.Looks up the
BeanManagerwhich is later used to provide the instance.- Throws:
NamingException- when Bean Manager cannot be looked up.
-
-
Method Details
-
isApplicable
Description copied from class:ComponentProviderChecks whether this component provider is able to provide an instance of givenClass.- Specified by:
isApplicablein classComponentProvider- Parameters:
c-Classto be checked.- Returns:
trueiff thisComponentProvideris able to create an instance of the givenClass.
-
create
Description copied from class:ComponentProviderCreate new instance.- Specified by:
createin classComponentProvider- Type Parameters:
T- type of the created object.- Parameters:
c-Classto be created.- Returns:
- instance, iff found,
nullotherwise.
-
destroy
Description copied from class:ComponentProviderDestroys the given managed instance.- Specified by:
destroyin classComponentProvider- Parameters:
o- instance to be destroyed.- Returns:
trueiff the instance was coupled to thisComponentProvider, false otherwise.
-