ppalaga commented on a change in pull request #226: Use MainSupport as base for 
running Camel
URL: https://github.com/apache/camel-quarkus/pull/226#discussion_r331415449
 
 

 ##########
 File path: 
extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelRecorder.java
 ##########
 @@ -16,88 +16,98 @@
  */
 package org.apache.camel.quarkus.core.runtime;
 
-import io.quarkus.arc.runtime.BeanContainerListener;
+import java.util.function.Supplier;
+
+import io.quarkus.arc.runtime.BeanContainer;
 import io.quarkus.runtime.RuntimeValue;
-import io.quarkus.runtime.ShutdownContext;
 import io.quarkus.runtime.annotations.Recorder;
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.quarkus.core.runtime.support.FastCamelRuntime;
+import org.apache.camel.CamelContext;
+import org.apache.camel.ExtendedCamelContext;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.quarkus.core.runtime.support.FastCamelContext;
+import org.apache.camel.quarkus.core.runtime.support.FastModel;
+import org.apache.camel.quarkus.core.runtime.support.RuntimeRegistry;
 import org.apache.camel.spi.Registry;
+import org.graalvm.nativeimage.ImageInfo;
 
 @Recorder
 public class CamelRecorder {
 
-    public RuntimeValue<CamelRuntime> create(Registry registry) {
-
-        FastCamelRuntime fcr = new FastCamelRuntime();
-        fcr.setRegistry(registry);
-
-        return new RuntimeValue<>(fcr);
-    }
-
-    public void init(
-            RuntimeValue<CamelRuntime> runtime,
-            CamelConfig.BuildTime buildTimeConfig) {
-
-        FastCamelRuntime fcr = (FastCamelRuntime) runtime.getValue();
-        fcr.init(buildTimeConfig);
+    public RuntimeValue<Registry> createRegistry() {
+        return new RuntimeValue<>(new RuntimeRegistry());
     }
 
-    public void start(
-            ShutdownContext shutdown,
-            RuntimeValue<CamelRuntime> runtime,
-            CamelConfig.Runtime runtimeConfig) throws Exception {
+    @SuppressWarnings("unchecked")
+    public RuntimeValue<CamelContext> createContext(RuntimeValue<Registry> 
registry, BeanContainer beanContainer, CamelConfig.BuildTime buildTimeConfig) {
 
 Review comment:
   A JavaDoc stating whether this is a invoked from a build time or a runtime 
BuildStep would be nice.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to