Annotation Interface WebSocket


@Documented @Retention(RUNTIME) @Inherited @Target(TYPE) public @interface WebSocket

Annotation for classes to be WebSocket endpoints.

  • Element Details

    • autoDemand

      boolean autoDemand

      Returns whether demand for WebSocket frames is automatically performed upon successful return from methods annotated with OnWebSocketOpen, OnWebSocketFrame and OnWebSocketMessage.

      If the demand is not automatic, then Session.demand() must be explicitly invoked to receive more WebSocket frames (both control and data frames, including CLOSE frames).

      Returns:
      whether demand for WebSocket frames is automatic
      Default:
      true