Java Code Examples for org.springframework.web.socket.config.annotation.WebSocketTransportRegistration

The following examples show how to use org.springframework.web.socket.config.annotation.WebSocketTransportRegistration. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
public void configureWebSocketTransport(WebSocketTransportRegistration registration) {
    registration.addDecoratorFactory(new WebSocketHandlerDecoratorFactory() {
        @Override
        public WebSocketHandler decorate(WebSocketHandler handler) {
            ProxyWebSocketHandler proxyWebSocketHandler = new ProxyWebSocketHandler(
                    handler, stompClient, webSocketHttpHeadersCallback,
                    messagingTemplate,
                    proxyTargetResolver,
                    zuulWebSocketProperties);
            proxyWebSocketHandler.errorHandler(proxyWebSocketErrorHandler);
            return proxyWebSocketHandler;
        }
    });
}
 
Example 2
Source Project: joal   Source File: WebSocketConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void configureWebSocketTransport(final WebSocketTransportRegistration registration) {
    registration
            .setMessageSizeLimit(5000 * 1024) // Max incoming message size => 5Mo
            .setSendBufferSizeLimit(5000 * 1024); // Max outgoing buffer size => 5Mo
}
 
Example 3
@Override
public void configureWebSocketTransport(WebSocketTransportRegistration registration) {
    registration.addDecoratorFactory(handler -> new SessionCacheWebSocketHandler(handler, webSocketSessionStore));
}
 
Example 4
@Override
public void configureWebSocketTransport(WebSocketTransportRegistration registration) {
	registration
		.setSendTimeLimit(15*1000) //max time allowed when sending
		.setSendBufferSizeLimit(512*1024); //set 0 to disable buffering
}
 
Example 5
Source Project: consensusj   Source File: WebSocketConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void configureWebSocketTransport(WebSocketTransportRegistration registration) {
    registration.setSendTimeLimit(15 * 1000).setSendBufferSizeLimit(512 * 1024);
}
 
Example 6
@Override
public void configureWebSocketTransport(WebSocketTransportRegistration registration) {
	registration.addDecoratorFactory(wsConnectHandlerDecoratorFactory());
}
 
Example 7
Source Project: bearchoke   Source File: WebSocketConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void configureWebSocketTransport(WebSocketTransportRegistration registration) {
    registration.setSendTimeLimit(15 * 1000).setSendBufferSizeLimit(512 * 1024);
    registration.setMessageSizeLimit(128 * 1024);
}
 
Example 8
Source Project: tutorials   Source File: WebSocketMessageBrokerConfig.java    License: MIT License 4 votes vote down vote up
@Override
public void configureWebSocketTransport(WebSocketTransportRegistration registry) {
    // TODO Auto-generated method stub

}