Class EnableWebsockets

  • All Implemented Interfaces:
    javax.websocket.server.ServerApplicationConfig

    public class EnableWebsockets
    extends Object
    implements javax.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 Detail

      • EnableWebsockets

        public EnableWebsockets()
    • Method Detail

      • getEndpointConfigs

        public Set<javax.websocket.server.ServerEndpointConfig> getEndpointConfigs​(Set<Class<? extends javax.websocket.Endpoint>> endpointClasses)
        Specified by:
        getEndpointConfigs in interface javax.websocket.server.ServerApplicationConfig
      • getAnnotatedEndpointClasses

        public Set<Class<?>> getAnnotatedEndpointClasses​(Set<Class<?>> scanned)
        Specified by:
        getAnnotatedEndpointClasses in interface javax.websocket.server.ServerApplicationConfig