Package com.vaadin.quarkus
Class EnableWebsockets
java.lang.Object
com.vaadin.quarkus.EnableWebsockets
- All Implemented Interfaces:
jakarta.websocket.server.ServerApplicationConfig
public class EnableWebsockets
extends Object
implements jakarta.websocket.server.ServerApplicationConfig
Only purpose of this class is to automatically enable quarkus WebSocket
deployment, in order to make Atmosphere JSR365Endpoint work.
Quarkus enables WebSocket deployment only if it finds annotated endpoints
(@
ServerEndpoint) or implementors of
ServerApplicationConfig interface.
Unfortunately, if at least one implementation of
ServerApplicationConfig is found, annotated endpoints are not
deployed automatically.
To circumvent this problem, implementation of
getAnnotatedEndpointClasses(Set) method will return all the provided
scanned annotated endpoints. Although Javadocs says that the passed set of
scanned classes contains all the annotated endpoint classes in the JAR or WAR
file containing the implementation of this interface, Quarkus will instead
provide all available annotated endpoints found at build time.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAnnotatedEndpointClasses(Set<Class<?>> scanned) Set<jakarta.websocket.server.ServerEndpointConfig> getEndpointConfigs(Set<Class<? extends jakarta.websocket.Endpoint>> endpointClasses)
-
Constructor Details
-
EnableWebsockets
public EnableWebsockets()
-
-
Method Details
-
getEndpointConfigs
public Set<jakarta.websocket.server.ServerEndpointConfig> getEndpointConfigs(Set<Class<? extends jakarta.websocket.Endpoint>> endpointClasses) - Specified by:
getEndpointConfigsin interfacejakarta.websocket.server.ServerApplicationConfig
-
getAnnotatedEndpointClasses
- Specified by:
getAnnotatedEndpointClassesin interfacejakarta.websocket.server.ServerApplicationConfig
-