public class GraphQlWebSocketHandler
extends org.springframework.web.socket.handler.TextWebSocketHandler
implements org.springframework.web.socket.SubProtocolCapable
spring-websocket.| Constructor and Description |
|---|
GraphQlWebSocketHandler(WebGraphQlHandler graphQlHandler,
org.springframework.http.converter.HttpMessageConverter<?> converter,
java.time.Duration connectionInitTimeout)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterConnectionClosed(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.CloseStatus closeStatus) |
void |
afterConnectionEstablished(org.springframework.web.socket.WebSocketSession session) |
java.util.List<java.lang.String> |
getSubProtocols() |
protected void |
handleTextMessage(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.TextMessage message) |
void |
handleTransportError(org.springframework.web.socket.WebSocketSession session,
java.lang.Throwable exception) |
boolean |
supportsPartialMessages() |
handleBinaryMessagepublic GraphQlWebSocketHandler(WebGraphQlHandler graphQlHandler, org.springframework.http.converter.HttpMessageConverter<?> converter, java.time.Duration connectionInitTimeout)
graphQlHandler - common handler for GraphQL over WebSocket requestsconverter - for JSON encoding and decodingconnectionInitTimeout - the time within which the CONNECTION_INIT type
message must be received.public java.util.List<java.lang.String> getSubProtocols()
getSubProtocols in interface org.springframework.web.socket.SubProtocolCapablepublic void afterConnectionEstablished(org.springframework.web.socket.WebSocketSession session)
afterConnectionEstablished in interface org.springframework.web.socket.WebSocketHandlerafterConnectionEstablished in class org.springframework.web.socket.handler.AbstractWebSocketHandlerprotected void handleTextMessage(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.TextMessage message)
throws java.lang.Exception
handleTextMessage in class org.springframework.web.socket.handler.AbstractWebSocketHandlerjava.lang.Exceptionpublic void handleTransportError(org.springframework.web.socket.WebSocketSession session,
java.lang.Throwable exception)
handleTransportError in interface org.springframework.web.socket.WebSocketHandlerhandleTransportError in class org.springframework.web.socket.handler.AbstractWebSocketHandlerpublic void afterConnectionClosed(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.CloseStatus closeStatus)
afterConnectionClosed in interface org.springframework.web.socket.WebSocketHandlerafterConnectionClosed in class org.springframework.web.socket.handler.AbstractWebSocketHandlerpublic boolean supportsPartialMessages()
supportsPartialMessages in interface org.springframework.web.socket.WebSocketHandlersupportsPartialMessages in class org.springframework.web.socket.handler.AbstractWebSocketHandler