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
-
Method Summary
Methods inherited from class org.glassfish.tyrus.core.ComponentProvider
getInvocableMethod
-
Constructor Details
-
CdiComponentProvider
Constructor.Looks up the
BeanManager
which is later used to provide the instance.- Throws:
NamingException
- when Bean Manager cannot be looked up.
-
-
Method Details
-
isApplicable
Description copied from class:ComponentProvider
Checks whether this component provider is able to provide an instance of givenClass
.- Specified by:
isApplicable
in classComponentProvider
- Parameters:
c
-Class
to be checked.- Returns:
true
iff thisComponentProvider
is able to create an instance of the givenClass
.
-
create
Description copied from class:ComponentProvider
Create new instance.- Specified by:
create
in classComponentProvider
- Type Parameters:
T
- type of the created object.- Parameters:
c
-Class
to be created.- Returns:
- instance, iff found,
null
otherwise.
-
destroy
Description copied from class:ComponentProvider
Destroys the given managed instance.- Specified by:
destroy
in classComponentProvider
- Parameters:
o
- instance to be destroyed.- Returns:
true
iff the instance was coupled to thisComponentProvider
, false otherwise.
-