Package org.springframework.web.socket.sockjs.transport.session

Examples of org.springframework.web.socket.sockjs.transport.session.StreamingSockJsSession


  @Test
  public void htmlFileTransport() throws Exception {

    HtmlFileTransportHandler transportHandler = new HtmlFileTransportHandler();
    transportHandler.initialize(this.sockJsConfig);
    StreamingSockJsSession session = transportHandler.createSession("1", this.webSocketHandler, null);

    transportHandler.handleRequest(this.request, this.response, this.webSocketHandler, session);

    assertEquals(500, this.servletResponse.getStatus());
    assertEquals("\"callback\" parameter required", this.servletResponse.getContentAsString());
View Full Code Here


  @Test
  public void eventSourceTransport() throws Exception {

    EventSourceTransportHandler transportHandler = new EventSourceTransportHandler();
    transportHandler.initialize(this.sockJsConfig);
    StreamingSockJsSession session = transportHandler.createSession("1", this.webSocketHandler, null);

    transportHandler.handleRequest(this.request, this.response, this.webSocketHandler, session);

    assertEquals("text/event-stream;charset=UTF-8", this.response.getHeaders().getContentType().toString());
    assertTrue("Streaming request not started", this.servletRequest.isAsyncStarted());
View Full Code Here

TOP

Related Classes of org.springframework.web.socket.sockjs.transport.session.StreamingSockJsSession

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.