org.springframework.web.reactive.socket.adapter

Class JettyWebSocketHandlerAdapter

  • java.lang.Object
    • org.springframework.web.reactive.socket.adapter.JettyWebSocketHandlerAdapter


  • @WebSocket
    public class JettyWebSocketHandlerAdapter
    extends java.lang.Object
    Jetty @WebSocket handler that delegates events to a reactive WebSocketHandler and its session.
    Since:
    5.0
    Author:
    Violeta Georgieva, Rossen Stoyanchev
    • Constructor Detail

      • JettyWebSocketHandlerAdapter

        public JettyWebSocketHandlerAdapter(WebSocketHandler handler,
                                            java.util.function.Function<org.eclipse.jetty.websocket.api.Session,JettyWebSocketSession> sessionFactory)
    • Method Detail

      • onWebSocketConnect

        @OnWebSocketConnect
        public void onWebSocketConnect(org.eclipse.jetty.websocket.api.Session session)
      • onWebSocketText

        @OnWebSocketMessage
        public void onWebSocketText(java.lang.String message)
      • onWebSocketBinary

        @OnWebSocketMessage
        public void onWebSocketBinary(byte[] message,
                                                          int offset,
                                                          int length)
      • onWebSocketFrame

        @OnWebSocketFrame
        public void onWebSocketFrame(org.eclipse.jetty.websocket.api.extensions.Frame frame)
      • onWebSocketClose

        @OnWebSocketClose
        public void onWebSocketClose(int statusCode,
                                                       java.lang.String reason)
      • onWebSocketError

        @OnWebSocketError
        public void onWebSocketError(java.lang.Throwable cause)