@Override
    protected void handleTextMessage(final WebSocketSession session, final TextMessage message) throws Exception {
        // Get the message from the client.
        String payload = message.getPayload();
        Object token = session.getAttributes().get("token");
        LOG.info("server received {}, sent {}", token, payload);
        boolean isTestClose = Objects.nonNull(token) && Objects.equals(token, "testCloseStatus")
            || Objects.nonNull(payload) && Objects.equals(payload, "testCloseStatus");
        if (isTestClose) {
            session.close(new CloseStatus(4400, "test:apache shenyu server close, return closeStatus"));
        } else {
            session.sendMessage(new TextMessage("apache shenyu server send to " + token + " message : -> " + payload));
        }
    }
Receive message events.

@param session session
@param message message
@throws Exception exception
shenyu-examples/shenyu-examples-websocket/shenyu-example-spring-native-websocket/src/main/java/org/apache/shenyu/examples/websocket/handler/HttpAuthHandler.java