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

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

Introduction

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

Prototype

public BinaryMessage(byte[] payload, boolean isLast) 

Source Link

Document

Create a new binary WebSocket message with the given byte[] payload representing the full or partial message content.

Usage

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

private void handleBinaryMessage(javax.websocket.Session session, ByteBuffer payload, boolean isLast) {
    BinaryMessage binaryMessage = new BinaryMessage(payload, isLast);
    try {/*  w  w  w .j  ava2 s  . c  om*/
        this.handler.handleMessage(this.wsSession, binaryMessage);
    } catch (Throwable ex) {
        ExceptionWebSocketHandlerDecorator.tryCloseWithError(this.wsSession, ex, logger);
    }
}

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

private void handleBinaryMessage(javax.websocket.Session session, ByteBuffer payload, boolean isLast) {
    BinaryMessage binaryMessage = new BinaryMessage(payload, isLast);
    try {/*  ww w .  j a va2 s  . c o  m*/
        this.handler.handleMessage(this.wsSession, binaryMessage);
    } catch (Throwable t) {
        ExceptionWebSocketHandlerDecorator.tryCloseWithError(this.wsSession, t, logger);
    }
}