diff --git a/src/main/java/net/geedge/asw/common/config/websocket/EnvironmentWebSocketHandler.java b/src/main/java/net/geedge/asw/common/config/websocket/EnvironmentNovncWebSocketHandler.java similarity index 96% rename from src/main/java/net/geedge/asw/common/config/websocket/EnvironmentWebSocketHandler.java rename to src/main/java/net/geedge/asw/common/config/websocket/EnvironmentNovncWebSocketHandler.java index 13a0c6f..0227935 100644 --- a/src/main/java/net/geedge/asw/common/config/websocket/EnvironmentWebSocketHandler.java +++ b/src/main/java/net/geedge/asw/common/config/websocket/EnvironmentNovncWebSocketHandler.java @@ -22,7 +22,7 @@ import java.nio.ByteBuffer; import java.util.concurrent.CompletionStage; @Component -public class EnvironmentWebSocketHandler extends TextWebSocketHandler { +public class EnvironmentNovncWebSocketHandler extends TextWebSocketHandler { private static final Log log = Log.get(); /** @@ -45,7 +45,7 @@ public class EnvironmentWebSocketHandler extends TextWebSocketHandler { private IEnvironmentSessionService environmentSessionService; - public EnvironmentWebSocketHandler(IEnvironmentService environmentService, IEnvironmentSessionService environmentSessionService) { + public EnvironmentNovncWebSocketHandler(IEnvironmentService environmentService, IEnvironmentSessionService environmentSessionService) { this.environmentService = environmentService; this.environmentSessionService = environmentSessionService; } diff --git a/src/main/java/net/geedge/asw/common/config/websocket/WebSocketInterceptor.java b/src/main/java/net/geedge/asw/common/config/websocket/EnvironmentNovncWebSocketInterceptor.java similarity index 95% rename from src/main/java/net/geedge/asw/common/config/websocket/WebSocketInterceptor.java rename to src/main/java/net/geedge/asw/common/config/websocket/EnvironmentNovncWebSocketInterceptor.java index ef7b1e9..2b1316f 100644 --- a/src/main/java/net/geedge/asw/common/config/websocket/WebSocketInterceptor.java +++ b/src/main/java/net/geedge/asw/common/config/websocket/EnvironmentNovncWebSocketInterceptor.java @@ -15,7 +15,7 @@ import org.springframework.web.util.UriTemplate; import java.util.Map; @Component -public class WebSocketInterceptor extends HttpSessionHandshakeInterceptor { +public class EnvironmentNovncWebSocketInterceptor extends HttpSessionHandshakeInterceptor { private static final Log log = Log.get(); @Override diff --git a/src/main/java/net/geedge/asw/common/config/websocket/WebSocketConfig.java b/src/main/java/net/geedge/asw/common/config/websocket/WebSocketConfig.java index 1d9bd67..773875b 100644 --- a/src/main/java/net/geedge/asw/common/config/websocket/WebSocketConfig.java +++ b/src/main/java/net/geedge/asw/common/config/websocket/WebSocketConfig.java @@ -20,8 +20,8 @@ public class WebSocketConfig implements WebSocketConfigurer { @Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { - registry.addHandler(new EnvironmentWebSocketHandler(deviceService, environmentSessionService), "/api/v1/env/{envId}/session/{sessionId}/novnc") - .addInterceptors(new WebSocketInterceptor()) + registry.addHandler(new EnvironmentNovncWebSocketHandler(deviceService, environmentSessionService), "/api/v1/env/{envId}/session/{sessionId}/novnc") + .addInterceptors(new EnvironmentNovncWebSocketInterceptor()) .setAllowedOrigins("*"); } } diff --git a/src/main/java/net/geedge/asw/common/util/Constants.java b/src/main/java/net/geedge/asw/common/util/Constants.java index 42c2707..b5ab040 100644 --- a/src/main/java/net/geedge/asw/common/util/Constants.java +++ b/src/main/java/net/geedge/asw/common/util/Constants.java @@ -70,9 +70,9 @@ public class Constants { /** - * env api websocket path + * env api novnc websocket path */ - public static final String ENV_API_WEBSOCKET_PATH = "/api/v1/env/websocket"; + public static final String ENV_API_WEBSOCKET_PATH = "/api/v1/env/novnc"; public static final String ENV_API_TCPDUMP_PATH = "/api/v1/env/pcap";