Package org.glassfish.tyrus.gf.ejb
Class EjbComponentProvider
java.lang.Object
org.glassfish.tyrus.core.ComponentProvider
org.glassfish.tyrus.gf.ejb.EjbComponentProvider
Provides the instance for the supported EJB classes.
- Author:
- Stepan Kopriva, Pavel Bucek
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> Object
Create new instance.boolean
Destroys the given managed instance.getInvocableMethod
(Method method) Get the method which should be invoked instead provided one.boolean
isApplicable
(Class<?> c) Checks whether this component provider is able to provide an instance of givenClass
.
-
Constructor Details
-
EjbComponentProvider
public EjbComponentProvider()
-
-
Method Details
-
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.
-
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
.
-
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.
-
getInvocableMethod
Description copied from class:ComponentProvider
Get the method which should be invoked instead provided one.Useful mainly for EJB container support, where methods from endpoint class cannot be invoked directly - Tyrus needs to use method declared on remote interface.
Default implementation returns method provided as parameter.
- Overrides:
getInvocableMethod
in classComponentProvider
- Parameters:
method
- method from endpoint class.- Returns:
- method which should be invoked.
-