From dc2b86e2dbcc4c0ff94b88327ba4b7f3c5876346 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Sat, 13 Mar 2021 11:32:37 +0200 Subject: [PATCH] Apply tiny polish to web socket classes --- ...bsocketProcessor.java => WebsocketProcessor.java} | 8 ++++---- ...WebsocketRecorder.java => WebsocketRecorder.java} | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) rename extensions/websockets/deployment/src/main/java/io/quarkus/undertow/websockets/deployment/{UndertowWebsocketProcessor.java => WebsocketProcessor.java} (96%) rename extensions/websockets/runtime/src/main/java/io/quarkus/undertow/websockets/runtime/{UndertowWebsocketRecorder.java => WebsocketRecorder.java} (94%) diff --git a/extensions/websockets/deployment/src/main/java/io/quarkus/undertow/websockets/deployment/UndertowWebsocketProcessor.java b/extensions/websockets/deployment/src/main/java/io/quarkus/undertow/websockets/deployment/WebsocketProcessor.java similarity index 96% rename from extensions/websockets/deployment/src/main/java/io/quarkus/undertow/websockets/deployment/UndertowWebsocketProcessor.java rename to extensions/websockets/deployment/src/main/java/io/quarkus/undertow/websockets/deployment/WebsocketProcessor.java index b9f93f4b18656..4f57ffdcc2117 100644 --- a/extensions/websockets/deployment/src/main/java/io/quarkus/undertow/websockets/deployment/UndertowWebsocketProcessor.java +++ b/extensions/websockets/deployment/src/main/java/io/quarkus/undertow/websockets/deployment/WebsocketProcessor.java @@ -37,12 +37,12 @@ import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem; import io.quarkus.netty.deployment.EventLoopSupplierBuildItem; import io.quarkus.runtime.annotations.ConfigRoot; -import io.quarkus.undertow.websockets.runtime.UndertowWebsocketRecorder; +import io.quarkus.undertow.websockets.runtime.WebsocketRecorder; import io.quarkus.vertx.http.deployment.FilterBuildItem; import io.undertow.websockets.DefaultContainerConfigurator; import io.undertow.websockets.UndertowContainerProvider; -public class UndertowWebsocketProcessor { +public class WebsocketProcessor { private static final DotName SERVER_ENDPOINT = DotName.createSimple(ServerEndpoint.class.getName()); private static final DotName CLIENT_ENDPOINT = DotName.createSimple(ClientEndpoint.class.getName()); @@ -91,7 +91,7 @@ void scanForAnnotatedEndpoints(CombinedIndexBuildItem indexBuildItem, @BuildStep @Record(ExecutionTime.RUNTIME_INIT) public FilterBuildItem deploy(final CombinedIndexBuildItem indexBuildItem, - UndertowWebsocketRecorder recorder, + WebsocketRecorder recorder, BuildProducer reflection, EventLoopSupplierBuildItem eventLoopSupplierBuildItem, List annotatedEndpoints, @@ -165,7 +165,7 @@ private void registerForReflection(BuildProducer refle @BuildStep @Record(ExecutionTime.RUNTIME_INIT) - ServiceStartBuildItem setupWorker(UndertowWebsocketRecorder recorder, ExecutorBuildItem exec) { + ServiceStartBuildItem setupWorker(WebsocketRecorder recorder, ExecutorBuildItem exec) { recorder.setupWorker(exec.getExecutorProxy()); return new ServiceStartBuildItem("Websockets"); } diff --git a/extensions/websockets/runtime/src/main/java/io/quarkus/undertow/websockets/runtime/UndertowWebsocketRecorder.java b/extensions/websockets/runtime/src/main/java/io/quarkus/undertow/websockets/runtime/WebsocketRecorder.java similarity index 94% rename from extensions/websockets/runtime/src/main/java/io/quarkus/undertow/websockets/runtime/UndertowWebsocketRecorder.java rename to extensions/websockets/runtime/src/main/java/io/quarkus/undertow/websockets/runtime/WebsocketRecorder.java index f648cd001bcd2..fc5c834d8acd1 100644 --- a/extensions/websockets/runtime/src/main/java/io/quarkus/undertow/websockets/runtime/UndertowWebsocketRecorder.java +++ b/extensions/websockets/runtime/src/main/java/io/quarkus/undertow/websockets/runtime/WebsocketRecorder.java @@ -30,9 +30,9 @@ import io.vertx.ext.web.RoutingContext; @Recorder -public class UndertowWebsocketRecorder { +public class WebsocketRecorder { - private static final Logger log = Logger.getLogger(UndertowWebsocketRecorder.class); + private static final Logger log = Logger.getLogger(WebsocketRecorder.class); public void setupWorker(Executor executor) { ExecutorSupplier.executor = executor; @@ -62,7 +62,7 @@ public WebSocketDeploymentInfo createDeploymentInfo(Set annotatedEndpoin log.error("Could not initialize websocket class " + i, e); } } - Set> newAnnotatatedEndpoints = new HashSet<>(); + Set> newAnnotatedEndpoints = new HashSet<>(); Set serverEndpointConfigurations = new HashSet<>(); final Set configInstances = new HashSet<>(); @@ -79,7 +79,7 @@ public WebSocketDeploymentInfo createDeploymentInfo(Set annotatedEndpoin for (ServerApplicationConfig config : configInstances) { Set> returnedEndpoints = config.getAnnotatedEndpointClasses(allScannedAnnotatedEndpoints); if (returnedEndpoints != null) { - newAnnotatatedEndpoints.addAll(returnedEndpoints); + newAnnotatedEndpoints.addAll(returnedEndpoints); } Set endpointConfigs = config.getEndpointConfigs(allScannedEndpointImplementations); if (endpointConfigs != null) { @@ -87,11 +87,11 @@ public WebSocketDeploymentInfo createDeploymentInfo(Set annotatedEndpoin } } } else { - newAnnotatatedEndpoints.addAll(allScannedAnnotatedEndpoints); + newAnnotatedEndpoints.addAll(allScannedAnnotatedEndpoints); } //annotated endpoints first - for (Class endpoint : newAnnotatatedEndpoints) { + for (Class endpoint : newAnnotatedEndpoints) { if (endpoint != null) { container.addEndpoint(endpoint); }