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

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

Introduction

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

Prototype

TomcatWebSocketTestServer

Source Link

Usage

From source file:org.springframework.web.socket.messaging.WebSocketStompClientIntegrationTests.java

@Before
public void setUp() throws Exception {

    logger.debug("Setting up before '" + this.testName.getMethodName() + "'");

    this.wac = new AnnotationConfigWebApplicationContext();
    this.wac.register(TestConfig.class);
    this.wac.refresh();

    this.server = new TomcatWebSocketTestServer();
    this.server.setup();
    this.server.deployConfig(this.wac);
    this.server.start();

    WebSocketClient webSocketClient = new StandardWebSocketClient();
    this.stompClient = new WebSocketStompClient(webSocketClient);
    this.stompClient.setMessageConverter(new StringMessageConverter());
}