Package io.helidon.microprofile.tyrus
Class HelidonComponentProvider
java.lang.Object
org.glassfish.tyrus.core.ComponentProvider
io.helidon.microprofile.tyrus.HelidonComponentProvider
public class HelidonComponentProvider
extends org.glassfish.tyrus.core.ComponentProvider
A service provider for Tyrus to create and destroy beans using CDI. By default,
and according to the Jakarta WebSocket specification, beans are created and
destroyed for each client connection (in "connection scope"). However, this provider
also supports endpoints in
ApplicationScoped
. These endpoint instances
are not destroyed here but at a later time by the CDI container. No other scopes
are currently supported.-
Constructor Summary
-
Method Summary
Methods inherited from class org.glassfish.tyrus.core.ComponentProvider
getInvocableMethod
-
Constructor Details
-
HelidonComponentProvider
public HelidonComponentProvider()
-
-
Method Details
-
isApplicable
Checks if a bean is known to CDI.- Specified by:
isApplicable
in classorg.glassfish.tyrus.core.ComponentProvider
- Parameters:
c
-Class
to be checked- Returns:
- outcome of test
-
create
Create a new instance using CDI. Note that if the bean isApplicationScoped
the same instance will be returned every time this method is called.- Specified by:
create
in classorg.glassfish.tyrus.core.ComponentProvider
- Type Parameters:
T
- type of new instance- Parameters:
c
-Class
to be created- Returns:
- new instance
-
destroy
Beans are normally scoped to a client connection. However, if a bean is explicitly set to be inApplicationScoped
, it will not be destroyed here.- Specified by:
destroy
in classorg.glassfish.tyrus.core.ComponentProvider
- Parameters:
o
- instance to be destroyed- Returns:
- outcome of operation
-