From b0df6b0f4776d8a21459cab265c8a729f63ae2e6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 3 Nov 2017 10:44:32 +0300 Subject: server-ws: code cleanup --- .../com/juick/ws/configuration/WebsocketConfiguration.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'juick-ws/src/main/java/com/juick') diff --git a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java index b76545b8..194a75a5 100644 --- a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java +++ b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java @@ -18,7 +18,6 @@ package com.juick.ws.configuration; import com.juick.server.configuration.BaseWebConfiguration; -import com.juick.server.protocol.JuickProtocol; import com.juick.ws.WebsocketComponent; import com.juick.ws.XMPPConnection; import org.springframework.context.annotation.Bean; @@ -35,6 +34,8 @@ import org.springframework.web.socket.config.annotation.WebSocketConfigurer; import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry; import org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean; +import javax.annotation.Nonnull; + /** * Created by aalexeev on 11/24/16. */ @@ -54,13 +55,8 @@ public class WebsocketConfiguration extends BaseWebConfiguration implements WebS return new WebsocketComponent(); } - @Bean - public JuickProtocol protocol() { - return new JuickProtocol("https://juick.com/"); - } - @Override - public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { + public void registerWebSocketHandlers(@Nonnull WebSocketHandlerRegistry registry) { ((ServletWebSocketHandlerRegistry) registry).setOrder(Ordered.LOWEST_PRECEDENCE); registry.addHandler(wsHandler(), "/**").setAllowedOrigins("*"); } -- cgit v1.2.3