You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/09/03 07:47:10 UTC

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #1681: Add vertx-websocket component extension

ppalaga commented on a change in pull request #1681:
URL: https://github.com/apache/camel-quarkus/pull/1681#discussion_r482766649



##########
File path: extensions/vertx-websocket/runtime/src/main/java/org/apache/camel/quarkus/component/vertx/websocket/VertxWebsocketRecorder.java
##########
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.vertx.websocket;
+
+import java.util.concurrent.ExecutionException;
+
+import io.quarkus.runtime.RuntimeValue;
+import io.quarkus.runtime.annotations.Recorder;
+import io.vertx.core.Vertx;
+import org.apache.camel.component.vertx.websocket.VertxWebsocketComponent;
+import org.apache.camel.component.vertx.websocket.VertxWebsocketHost;
+import org.apache.camel.component.vertx.websocket.VertxWebsocketHostConfiguration;
+import org.apache.camel.component.vertx.websocket.VertxWebsocketHostKey;
+import org.apache.camel.spi.annotations.Component;
+
+@Recorder
+public class VertxWebsocketRecorder {
+
+    public RuntimeValue<VertxWebsocketComponent> createVertxWebsocketComponent(RuntimeValue<Vertx> vertx) {
+        QuarkusVertxWebsocketComponent component = new QuarkusVertxWebsocketComponent();
+        component.setVertx(vertx.getValue());
+        return new RuntimeValue<>(component);
+    }
+
+    @Component("vertx-websocket")

Review comment:
       What is the purpose of this annotation?

##########
File path: extensions/vertx-websocket/runtime/src/main/resources/META-INF/quarkus-extension.yaml
##########
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# This is a generated file. Do not edit directly!
+# To re-generate, run the following command from the top level directory:
+#
+#   mvn -N cq:update-quarkus-metadata
+#
+---
+name: "Camel Vert.x WebSocket"
+description: "Camel WebSocket support with Vert.x"

Review comment:
       This description does not match the style we generally adhere to with extension and component descriptions. I see that it stems from Camel. Could you please re-word it there to match the "verb first" style informing the reader about what can be done with the given extension/component? It should also make clear whether this ws client, ws server or both. 
   
   Inspiration: 
   * For AHC client, we have `Exchange data with external Websocket servers using Async Http Client`
   * For JSR356 server, we have `Expose websocket endpoints using JSR356`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org