Class StandardwebSocketHandlerAdapter
java.lang.Object
jakarta.websocket.Endpoint
org.springframework.web.reactive.socket.adapter.StandardwebSocketHandlerAdapter
public class StandardwebSocketHandlerAdapter
extends jakarta.websocket.Endpoint
Adapter for the Jakarta webSocket API (JSR-356) that delegates events to a
reactive
webSocketHandler and its session.- Since:
- 5.0
- Author:
- Violeta Georgieva, Rossen Stoyanchev, Sam Brannen
-
Constructor Summary
ConstructorsConstructorDescriptionStandardwebSocketHandlerAdapter(webSocketHandler handler, Function<jakarta.websocket.Session, StandardwebSocketSession> sessionFactory) -
Method Summary
-
Constructor Details
-
StandardwebSocketHandlerAdapter
public StandardwebSocketHandlerAdapter(webSocketHandler handler, Function<jakarta.websocket.Session, StandardwebSocketSession> sessionFactory)
-
-
Method Details
-
onOpen
public void onOpen(jakarta.websocket.Session session, jakarta.websocket.EndpointConfig config) - Specified by:
onOpenin classjakarta.websocket.Endpoint
-
onClose
public void onClose(jakarta.websocket.Session session, jakarta.websocket.CloseReason reason) - Overrides:
onClosein classjakarta.websocket.Endpoint
-
onError
- Overrides:
onErrorin classjakarta.websocket.Endpoint
-