Examples of BufferingStompDecoder


Examples of org.springframework.messaging.simp.stomp.BufferingStompDecoder

      }
      else {
        throw new IllegalArgumentException("Unexpected WebSocket message type: " + webSocketMessage);
      }

      BufferingStompDecoder decoder = this.decoders.get(session.getId());
      if (decoder == null) {
        throw new IllegalStateException("No decoder for session id '" + session.getId() + "'");
      }

      messages = decoder.decode(byteBuffer);
      if (messages.isEmpty()) {
        if (logger.isTraceEnabled()) {
          logger.trace("Incomplete STOMP frame content received in session " +
              session + ", bufferSize=" + decoder.getBufferSize() +
              ", bufferSizeLimit=" + decoder.getBufferSizeLimit() + ".");
        }
        return;
      }
    }
    catch (Throwable ex) {
View Full Code Here

Examples of org.springframework.messaging.simp.stomp.BufferingStompDecoder

  @Override
  public void afterSessionStarted(WebSocketSession session, MessageChannel outputChannel) {
    if (session.getTextMessageSizeLimit() < MINIMUM_WEBSOCKET_MESSAGE_SIZE) {
      session.setTextMessageSizeLimit(MINIMUM_WEBSOCKET_MESSAGE_SIZE);
    }
    this.decoders.put(session.getId(), new BufferingStompDecoder(this.stompDecoder, getMessageSizeLimit()));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.