davsclaus commented on code in PR #12985: URL: https://github.com/apache/camel/pull/12985#discussion_r1477219154
########## core/camel-api/pom.xml: ########## @@ -56,6 +56,13 @@ <scope>compile</scope> </dependency> + <dependency> Review Comment: camel-api should NOT have any other dependencies, this must be removed ########## core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java: ########## @@ -370,6 +371,7 @@ protected void initPlugins() { camelContextExtension.lazyAddContextPlugin(AnnotationBasedProcessorFactory.class, this::createAnnotationBasedProcessorFactory); camelContextExtension.lazyAddContextPlugin(DumpRoutesStrategy.class, this::createDumpRoutesStrategy); + camelContextExtension.lazyAddContextPlugin(JolokiaHttpRequestHandlerFactory.class, this::createJolokiaHttpRequestHandlerFactory); Review Comment: Jolokia should only be discovered if enabled, eg that jolokiaEnabled option in camel-main ########## core/camel-api/src/main/java/org/apache/camel/spi/JolokiaHttpRequestHandlerFactory.java: ########## @@ -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. + */ +package org.apache.camel.spi; + +import org.apache.camel.StaticService; +import org.jolokia.server.core.http.HttpRequestHandler; + +/** + * Factory to abstract the creation of the Jolokia HttpRequestHandler. + */ +public interface JolokiaHttpRequestHandlerFactory extends StaticService { Review Comment: We should make a generic factory that just returns Object or / Class<T> T so we can use this for other stuff we can plugin into http-server in the future. -- 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. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org