Interface WebSocketMapping

  • All Superinterfaces:
    ContextRelated

    public interface WebSocketMapping
    extends ContextRelated

    WebSocket mapping contains all the information required to register a WebSocket. Because the WebSockets (JSR-356) don't have to implement any specific interface or extend any specific class, we have much more flexibility and responsibility here.

    On purpose, we don't allow registration of other objects that usually can be passed (by means of HandlesTypes annotation on a ServletContainerInitializer related to WebSockets) by users. Only annontated classes or actual instances are handled and we don't support:

    • javax.websocket.server.ServerApplicationConfig
    • javax.websocket.Endpoint

    • Method Detail

      • getWebSocketClass

        Class<?> getWebSocketClass()
        Returns a Class of the WebSocket endpoint that should be annotated with @javax.websocket.server.ServerEndpoint annotation. If both the object (getWebSocketAnnotatedEndpoint()) and the class is specified, the class takes precedence.
        Returns:
      • getWebSocketAnnotatedEndpoint

        Object getWebSocketAnnotatedEndpoint()
        Returns an instance of a class annotated with @javax.websocket.server.ServerEndpoint. If both the object and the class (getWebSocketClass()) is specified, the class takes precedence.
        Returns: