diff options
author | Vitaly Takmazov | 2017-11-03 10:44:32 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-11-03 10:44:32 +0300 |
commit | b0df6b0f4776d8a21459cab265c8a729f63ae2e6 (patch) | |
tree | a45f9616bca3e568c38d974e5c6d0c7b3fe74edc /juick-ws/src/main/java/com/juick | |
parent | 24229d53cbbda68bb2becafb63ee5b1484f5ea75 (diff) |
server-ws: code cleanup
Diffstat (limited to 'juick-ws/src/main/java/com/juick')
-rw-r--r-- | juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java | 10 |
1 files changed, 3 insertions, 7 deletions
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("*"); } |