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
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> ObjectCreate new instance.booleanDestroys the given managed instance.getInvocableMethod(Method method) Get the method which should be invoked instead provided one.booleanisApplicable(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: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.
-
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.
-
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.
-
getInvocableMethod
Description copied from class:ComponentProviderGet 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:
getInvocableMethodin classComponentProvider- Parameters:
method- method from endpoint class.- Returns:
- method which should be invoked.
-