Package org.springframework.web.socket.sockjs.frame

Examples of org.springframework.web.socket.sockjs.frame.Jackson2SockJsMessageCodec


  public SockJsClient(List<Transport> transports) {
    Assert.notEmpty(transports, "No transports provided");
    this.infoReceiver = initInfoReceiver(transports);
    this.transports = new ArrayList<Transport>(transports);
    if (jackson2Present) {
      this.messageCodec = new Jackson2SockJsMessageCodec();
    }
  }
View Full Code Here


        this.handlers.put(handler.getTransportType(), handler);
      }
    }

    if (jackson2Present) {
      this.messageCodec = new Jackson2SockJsMessageCodec();
    }
  }
View Full Code Here

    accessor.setDestination("/destination");
    MessageHeaders headers = accessor.getMessageHeaders();
    Message<byte[]> message = MessageBuilder.createMessage("body".getBytes(Charset.forName("UTF-8")), headers);
    byte[] bytes = new StompEncoder().encode(message);
    TextMessage textMessage = new TextMessage(bytes);
    SockJsFrame frame = SockJsFrame.messageFrame(new Jackson2SockJsMessageCodec(), textMessage.getPayload());

    String body = "o\n" + frame.getContent() + "\n" + "c[3000,\"Go away!\"]";
    ClientHttpResponse response = response(HttpStatus.OK, body);
    connect(response);
View Full Code Here

TOP

Related Classes of org.springframework.web.socket.sockjs.frame.Jackson2SockJsMessageCodec

Copyright © 2018 www.massapicom. 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.