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 06:48:37 UTC

[GitHub] [camel-quarkus] jamesnetherton opened a new pull request #1681: Add vertx-websocket component extension

jamesnetherton opened a new pull request #1681:
URL: https://github.com/apache/camel-quarkus/pull/1681


   Fixes #1301


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on a change in pull request #1681:
URL: https://github.com/apache/camel-quarkus/pull/1681#discussion_r482781324



##########
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:
       > 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?
   
   Yes, no problem. I'll update the description to something better over at the main camel project.
   




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on a change in pull request #1681:
URL: https://github.com/apache/camel-quarkus/pull/1681#discussion_r482780101



##########
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:
       Ah, good spot. That was a leftover from some early experiments. I have removed it. 




----------------------------------------------------------------
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



[GitHub] [camel-quarkus] jamesnetherton commented on pull request #1681: Add vertx-websocket component extension

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on pull request #1681:
URL: https://github.com/apache/camel-quarkus/pull/1681#issuecomment-686380627


   Seems there's an issue resolving the Vert.x router. It doesn't happen for me locally so I need to dig into what the problem is.


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [camel-quarkus] jamesnetherton merged pull request #1681: Add vertx-websocket component extension

Posted by GitBox <gi...@apache.org>.
jamesnetherton merged pull request #1681:
URL: https://github.com/apache/camel-quarkus/pull/1681


   


----------------------------------------------------------------
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