Example usage for org.springframework.web.socket.client.standard StandardWebSocketClient StandardWebSocketClient

List of usage examples for org.springframework.web.socket.client.standard StandardWebSocketClient StandardWebSocketClient

Introduction

In this page you can find the example usage for org.springframework.web.socket.client.standard StandardWebSocketClient StandardWebSocketClient.

Prototype

public StandardWebSocketClient(WebSocketContainer webSocketContainer) 

Source Link

Document

Constructor accepting an existing WebSocketContainer instance.

Usage

From source file:ymanv.forex.SockJsClientTest.java

private static StandardWebSocketClient createWebSocketClient() throws Exception {
    return new StandardWebSocketClient(createWebSocketContainer());
}

From source file:com.codeveo.lago.bot.stomp.client.AbstractHttpLagoBot.java

protected AbstractHttpLagoBot() {
    objectMapper = new ObjectMapper();
    objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
    objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

    /* jaxb only */
    JaxbAnnotationModule module = new JaxbAnnotationModule();
    objectMapper.registerModule(module);

    taskExecutor = new ThreadPoolTaskExecutor();
    taskExecutor.setMaxPoolSize(THREAD_POOL_SIZE);
    taskExecutor.initialize();//from  ww w  . j ava2 s  .c  o m

    WebSocketContainer webSocketContainer = ContainerProvider.getWebSocketContainer();
    webSocketContainer.setDefaultMaxSessionIdleTimeout(CLIENT_MAX_IDLE_TIMEOUT);

    webSocketClient = new StandardWebSocketClient(webSocketContainer);
    webSocketClient.setTaskExecutor(taskExecutor);
}