Remove createEndpoint method override in QuarkusVertxWebsocketComponent
Fixes
*/
package org.apache.camel.quarkus.component.vertx.websocket;
-import java.util.Map;
import java.util.concurrent.ExecutionException;
import io.quarkus.runtime.RuntimeValue;
import io.quarkus.runtime.annotations.Recorder;
import io.vertx.core.Vertx;
import io.vertx.ext.web.Router;
-import org.apache.camel.Endpoint;
import org.apache.camel.component.vertx.websocket.VertxWebsocketComponent;
-import org.apache.camel.component.vertx.websocket.VertxWebsocketEndpoint;
import org.apache.camel.component.vertx.websocket.VertxWebsocketHost;
import org.apache.camel.component.vertx.websocket.VertxWebsocketHostConfiguration;
import org.apache.camel.component.vertx.websocket.VertxWebsocketHostKey;
@@ -35,25 +32,13 @@ public class VertxWebsocketRecorder {
public RuntimeValue<VertxWebsocketComponent> createVertxWebsocketComponent(RuntimeValue<Vertx> vertx,
RuntimeValue<Router> router) {
- QuarkusVertxWebsocketComponent component = new QuarkusVertxWebsocketComponent(router.getValue());
+ QuarkusVertxWebsocketComponent component = new QuarkusVertxWebsocketComponent();
component.setVertx(vertx.getValue());
+ component.setRouter(router.getValue());
return new RuntimeValue<>(component);
}
static final class QuarkusVertxWebsocketComponent extends VertxWebsocketComponent {
- private final Router router;
-
- public QuarkusVertxWebsocketComponent(Router router) {
- this.router = router;
- }
-
- @Override
- protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
- VertxWebsocketEndpoint endpoint = (VertxWebsocketEndpoint) super.createEndpoint(uri, remaining, parameters);
- endpoint.getConfiguration().setRouter(router);
- return endpoint;
- }
-
@Override
protected VertxWebsocketHost createVertxWebsocketHost(VertxWebsocketHostConfiguration hostConfiguration,
VertxWebsocketHostKey hostKey) {
