Class JettyWebSocketHandlerAdapter
java.lang.Object
org.springframework.web.reactive.socket.adapter.JettyWebSocketHandlerAdapter
- All Implemented Interfaces:
org.eclipse.jetty.websocket.api.Session.Listener
public class JettyWebSocketHandlerAdapter
extends Object
implements org.eclipse.jetty.websocket.api.Session.Listener
Jetty
Session.Listener
handler that delegates events to a
reactive WebSocketHandler
and its session.- Since:
- 5.0
- Author:
- Violeta Georgieva, Rossen Stoyanchev
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.websocket.api.Session.Listener
org.eclipse.jetty.websocket.api.Session.Listener.Abstract, org.eclipse.jetty.websocket.api.Session.Listener.AbstractAutoDemanding, org.eclipse.jetty.websocket.api.Session.Listener.AutoDemanding
-
Constructor Summary
ConstructorDescriptionJettyWebSocketHandlerAdapter
(WebSocketHandler handler, Function<org.eclipse.jetty.websocket.api.Session, JettyWebSocketSession> sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
onWebSocketBinary
(ByteBuffer byteBuffer, org.eclipse.jetty.websocket.api.Callback callback) void
onWebSocketClose
(int statusCode, String reason) void
onWebSocketError
(Throwable cause) void
onWebSocketOpen
(org.eclipse.jetty.websocket.api.Session session) void
onWebSocketPong
(ByteBuffer payload) void
onWebSocketText
(String message) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.websocket.api.Session.Listener
onWebSocketFrame, onWebSocketPartialBinary, onWebSocketPartialText, onWebSocketPing
-
Constructor Details
-
JettyWebSocketHandlerAdapter
public JettyWebSocketHandlerAdapter(WebSocketHandler handler, Function<org.eclipse.jetty.websocket.api.Session, JettyWebSocketSession> sessionFactory)
-
-
Method Details
-
onWebSocketOpen
public void onWebSocketOpen(org.eclipse.jetty.websocket.api.Session session) - Specified by:
onWebSocketOpen
in interfaceorg.eclipse.jetty.websocket.api.Session.Listener
-
onWebSocketText
- Specified by:
onWebSocketText
in interfaceorg.eclipse.jetty.websocket.api.Session.Listener
-
onWebSocketBinary
public void onWebSocketBinary(ByteBuffer byteBuffer, org.eclipse.jetty.websocket.api.Callback callback) - Specified by:
onWebSocketBinary
in interfaceorg.eclipse.jetty.websocket.api.Session.Listener
-
onWebSocketPong
- Specified by:
onWebSocketPong
in interfaceorg.eclipse.jetty.websocket.api.Session.Listener
-
onWebSocketClose
- Specified by:
onWebSocketClose
in interfaceorg.eclipse.jetty.websocket.api.Session.Listener
-
onWebSocketError
- Specified by:
onWebSocketError
in interfaceorg.eclipse.jetty.websocket.api.Session.Listener
-