类的使用
org.springframework.web.socket.CloseStatus
使用CloseStatus的程序包 程序包 说明 org.springframework.web.socket Common abstractions and Spring configuration support for WebSocket applications.org.springframework.web.socket.adapter Classes adapting Spring's WebSocket API to and from WebSocket providers.org.springframework.web.socket.adapter.jetty Adapter classes for the Jetty WebSocket API.org.springframework.web.socket.adapter.standard Adapter classes for the standard Java WebSocket API.org.springframework.web.socket.handler ConvenientWebSocketHandlerimplementations and decorators.org.springframework.web.socket.messaging WebSocket integration for Spring's messaging module.org.springframework.web.socket.sockjs.client SockJS client implementation ofWebSocketClient.org.springframework.web.socket.sockjs.transport.handler TransportHandlerimplementation classes as well as a concreteSockJsService.org.springframework.web.socket.sockjs.transport.session SockJS specific implementations ofWebSocketSession.org.springframework.web.socket中CloseStatus的使用
声明为CloseStatus的org.springframework.web.socket中的字段 修饰符和类型 字段 说明 static CloseStatusCloseStatus. BAD_DATA"1007 indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [RFC3629] data within a text message)."static CloseStatusCloseStatus. GOING_AWAY"1001 indicates that an endpoint is "going away", such as a server going down or a browser having navigated away from a page."static CloseStatusCloseStatus. NO_CLOSE_FRAME"1006 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint.static CloseStatusCloseStatus. NO_STATUS_CODE"1005 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint.static CloseStatusCloseStatus. NORMAL"1000 indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled."static CloseStatusCloseStatus. NOT_ACCEPTABLE"1003 indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message)."static CloseStatusCloseStatus. POLICY_VIOLATION"1008 indicates that an endpoint is terminating the connection because it has received a message that violates its policy.static CloseStatusCloseStatus. PROTOCOL_ERROR"1002 indicates that an endpoint is terminating the connection due to a protocol error."static CloseStatusCloseStatus. REQUIRED_EXTENSION"1010 indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake.static CloseStatusCloseStatus. SERVER_ERROR"1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request."static CloseStatusCloseStatus. SERVICE_OVERLOAD"1013 indicates that the service is experiencing overload.static CloseStatusCloseStatus. SERVICE_RESTARTED"1012 indicates that the service is restarted.static CloseStatusCloseStatus. SESSION_NOT_RELIABLEA status code for use within the framework the indicate a session has become unreliable (e.g. timed out while sending a message) and extra care should be exercised, e.g. avoid sending any further data to the client that may be done during normal shutdown.static CloseStatusCloseStatus. TLS_HANDSHAKE_FAILURE"1015 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint.static CloseStatusCloseStatus. TOO_BIG_TO_PROCESS"1009 indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process."返回CloseStatus的org.springframework.web.socket中的方法 修饰符和类型 方法 说明 CloseStatusCloseStatus. withReason(String reason)Create a newCloseStatusfrom this one with the specified reason.参数类型为CloseStatus的org.springframework.web.socket中的方法 修饰符和类型 方法 说明 voidWebSocketHandler. afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus)Invoked after the WebSocket connection has been closed by either side, or after a transport error has occurred.voidWebSocketSession. close(CloseStatus status)Close the WebSocket connection with the given close status.booleanCloseStatus. equalsCode(CloseStatus other)org.springframework.web.socket.adapter中CloseStatus的使用
参数类型为CloseStatus的org.springframework.web.socket.adapter中的方法 修饰符和类型 方法 说明 voidAbstractWebSocketSession. close(CloseStatus status)protected abstract voidAbstractWebSocketSession. closeInternal(CloseStatus status)org.springframework.web.socket.adapter.jetty中CloseStatus的使用
参数类型为CloseStatus的org.springframework.web.socket.adapter.jetty中的方法 修饰符和类型 方法 说明 protected voidJettyWebSocketSession. closeInternal(CloseStatus status)org.springframework.web.socket.adapter.standard中CloseStatus的使用
参数类型为CloseStatus的org.springframework.web.socket.adapter.standard中的方法 修饰符和类型 方法 说明 protected voidStandardWebSocketSession. closeInternal(CloseStatus status)org.springframework.web.socket.handler中CloseStatus的使用
返回CloseStatus的org.springframework.web.socket.handler中的方法 修饰符和类型 方法 说明 CloseStatusSessionLimitExceededException. getStatus()参数类型为CloseStatus的org.springframework.web.socket.handler中的方法 修饰符和类型 方法 说明 voidAbstractWebSocketHandler. afterConnectionClosed(WebSocketSession session, CloseStatus status)voidExceptionWebSocketHandlerDecorator. afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus)voidLoggingWebSocketHandlerDecorator. afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus)voidPerConnectionWebSocketHandler. afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus)voidWebSocketHandlerDecorator. afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus)voidConcurrentWebSocketSessionDecorator. close(CloseStatus status)voidWebSocketSessionDecorator. close(CloseStatus status)参数类型为CloseStatus的org.springframework.web.socket.handler中的构造器 构造器 说明 SessionLimitExceededException(String message, CloseStatus status)org.springframework.web.socket.messaging中CloseStatus的使用
返回CloseStatus的org.springframework.web.socket.messaging中的方法 修饰符和类型 方法 说明 CloseStatusSessionDisconnectEvent. getCloseStatus()Return the status with which the session was closed.参数类型为CloseStatus的org.springframework.web.socket.messaging中的方法 修饰符和类型 方法 说明 voidSubProtocolWebSocketHandler. afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus)voidStompSubProtocolHandler. afterSessionEnded(WebSocketSession session, CloseStatus closeStatus, MessageChannel outputChannel)voidSubProtocolHandler. afterSessionEnded(WebSocketSession session, CloseStatus closeStatus, MessageChannel outputChannel)Invoked after aWebSocketSessionhas ended.参数类型为CloseStatus的org.springframework.web.socket.messaging中的构造器 构造器 说明 SessionDisconnectEvent(Object source, Message<byte[]> message, String sessionId, CloseStatus closeStatus)Create a new SessionDisconnectEvent.SessionDisconnectEvent(Object source, Message<byte[]> message, String sessionId, CloseStatus closeStatus, Principal user)Create a new SessionDisconnectEvent.org.springframework.web.socket.sockjs.client中CloseStatus的使用
参数类型为CloseStatus的org.springframework.web.socket.sockjs.client中的方法 修饰符和类型 方法 说明 voidAbstractClientSockJsSession. afterTransportClosed(CloseStatus closeStatus)voidAbstractClientSockJsSession. close(CloseStatus status)protected voidAbstractClientSockJsSession. closeInternal(CloseStatus status)protected abstract voidAbstractClientSockJsSession. disconnect(CloseStatus status)protected voidWebSocketClientSockJsSession. disconnect(CloseStatus status)protected voidXhrClientSockJsSession. disconnect(CloseStatus status)org.springframework.web.socket.sockjs.transport.handler中CloseStatus的使用
参数类型为CloseStatus的org.springframework.web.socket.sockjs.transport.handler中的方法 修饰符和类型 方法 说明 voidSockJsWebSocketHandler. afterConnectionClosed(WebSocketSession wsSession, CloseStatus status)org.springframework.web.socket.sockjs.transport.session中CloseStatus的使用
参数类型为CloseStatus的org.springframework.web.socket.sockjs.transport.session中的方法 修饰符和类型 方法 说明 voidAbstractSockJsSession. close(CloseStatus status)Performs cleanup and notify theWebSocketHandler.voidAbstractSockJsSession. delegateConnectionClosed(CloseStatus status)Invoked when the underlying connection is closed.protected voidAbstractHttpSockJsSession. disconnect(CloseStatus status)protected abstract voidAbstractSockJsSession. disconnect(CloseStatus status)Actually close the underlying WebSocket session or in the case of HTTP transports complete the underlying request.protected voidWebSocketServerSockJsSession. disconnect(CloseStatus status)voidAbstractSockJsSession. tryCloseWithSockJsTransportError(Throwable error, CloseStatus closeStatus)Close due to error arising from SockJS transport handling.