Java Code Examples for org.springframework.web.socket.client.standard.AnnotatedEndpointConnectionManager

Following code examples demonstrate how to use org.springframework.web.socket.client.standard.AnnotatedEndpointConnectionManagerfrom spring-framework. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use org.springframework.web.socket.client.standard.AnnotatedEndpointConnectionManagerand various code implementation of this class.

    public AnnotatedEndpointConnectionManager connectionManager(GdaxWebsocketClient gdaxWebsocketClient) {
        AnnotatedEndpointConnectionManager connectionManager = new AnnotatedEndpointConnectionManager(gdaxWebsocketClient, wsUrl);
        WebSocketContainer container = connectionManager.getWebSocketContainer();
        container.setDefaultMaxSessionIdleTimeout(maxIdleTimeout);
        container.setDefaultMaxTextMessageBufferSize(maxTextMessageBufferSize);
        connectionManager.setAutoStartup(autoStartup);
        return connectionManager;
    } 


Advertisement
Javadoc
A WebSocket connection manager that is given a URI, a javax.websocket.ClientEndpoint-annotated endpo

int, connects to a WebSocket server through the #start() and #stop() methods. If #setAutoStartup(boolean) is set to true this will be done automatically when the Spring ApplicationContext is refreshed. @author Rossen Stoyanchev @since 4.0

Read More
Advertisement