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

The following examples show how to use org.springframework.web.socket.config.annotation.WebSocketTransportRegistration. 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
Source File: ZuulWebSocketConfiguration.java    From spring-cloud-netflix-zuul-websocket with Apache License 2.0 5 votes vote down vote up
@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 File: WebSocketConfig.java    From joal with 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
Source File: WebSocketConfig.java    From WebIDE-Backend with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void configureWebSocketTransport(WebSocketTransportRegistration registration) {
    registration.addDecoratorFactory(handler -> new SessionCacheWebSocketHandler(handler, webSocketSessionStore));
}
 
Example #4
Source File: WebSocketConfig.java    From cloudstreetmarket.com with GNU General Public License v3.0 4 votes vote down vote up
@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 File: WebSocketConfig.java    From consensusj with 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
Source File: AbstractSessionWebSocketMessageBrokerConfigurer.java    From spring-session with Apache License 2.0 4 votes vote down vote up
@Override
public void configureWebSocketTransport(WebSocketTransportRegistration registration) {
	registration.addDecoratorFactory(wsConnectHandlerDecoratorFactory());
}
 
Example #7
Source File: WebSocketConfig.java    From bearchoke with 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 File: WebSocketMessageBrokerConfig.java    From tutorials with MIT License 4 votes vote down vote up
@Override
public void configureWebSocketTransport(WebSocketTransportRegistration registry) {
    // TODO Auto-generated method stub

}