Example usage for org.springframework.web.socket TextMessage TextMessage

List of usage examples for org.springframework.web.socket TextMessage TextMessage

Introduction

In this page you can find the example usage for org.springframework.web.socket TextMessage TextMessage.

Prototype

public TextMessage(CharSequence payload, boolean isLast) 

Source Link

Document

Create a new text WebSocket message with the given payload representing the full or partial message content.

Usage

From source file:org.springframework.web.socket.adapter.standard.StandardWebSocketHandlerAdapter.java

private void handleTextMessage(javax.websocket.Session session, String payload, boolean isLast) {
    TextMessage textMessage = new TextMessage(payload, isLast);
    try {/*from w w  w.ja v  a2s .  co  m*/
        this.handler.handleMessage(this.wsSession, textMessage);
    } catch (Throwable ex) {
        ExceptionWebSocketHandlerDecorator.tryCloseWithError(this.wsSession, ex, logger);
    }
}

From source file:org.springframework.web.socket.adapter.StandardEndpointAdapter.java

private void handleTextMessage(javax.websocket.Session session, String payload, boolean isLast) {
    TextMessage textMessage = new TextMessage(payload, isLast);
    try {//from w  ww  .j  ava  2s.  c  om
        this.handler.handleMessage(this.wsSession, textMessage);
    } catch (Throwable t) {
        ExceptionWebSocketHandlerDecorator.tryCloseWithError(this.wsSession, t, logger);
    }
}