diff options
Diffstat (limited to 'juick-ws/src/main/java/com')
-rw-r--r-- | juick-ws/src/main/java/com/juick/ws/StatusController.java | 4 | ||||
-rw-r--r-- | juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/juick-ws/src/main/java/com/juick/ws/StatusController.java b/juick-ws/src/main/java/com/juick/ws/StatusController.java index 3f1de413..b212af19 100644 --- a/juick-ws/src/main/java/com/juick/ws/StatusController.java +++ b/juick-ws/src/main/java/com/juick/ws/StatusController.java @@ -14,10 +14,10 @@ import javax.inject.Inject; @ResponseBody public class StatusController { @Inject - WebsocketComponent websocketComponent; + WebsocketComponent wsHandler; @RequestMapping(method = RequestMethod.GET, headers = "Connection!=Upgrade", value = "/") public String status() { - return String.format("Clients: %d", websocketComponent.clients.size()); + return String.format("Clients: %d", wsHandler.clients.size()); } } diff --git a/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java b/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java index 78b946ed..e87b96a5 100644 --- a/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java +++ b/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java @@ -13,7 +13,6 @@ import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.handler.TextWebSocketHandler; import javax.inject.Inject; -import javax.inject.Singleton; import java.io.IOException; import java.net.URI; import java.util.ArrayList; @@ -26,7 +25,6 @@ import java.util.logging.Logger; * Created by vitalyster on 28.06.2016. */ @Component -@Singleton public class WebsocketComponent extends TextWebSocketHandler { @Inject |