Re: [HEADS UP] Release Camel 3.0.0-RC2
Hi Everyone: I needed to make some additional commits due to missing license headers. Therefore I took a new release branch off of commit cc43af4 [1] which also includes the Netty updates mentioned by Andrea yesterday. I will send out a vote request shortly. Thanks, Gregor [1] https://github.com/apache/camel/commit/cc43af4d3adc1a1c5381a23b03ba85cfca657197 On Wed, Oct 2, 2019 at 5:17 AM Claus Ibsen wrote: > > On Tue, Oct 1, 2019 at 3:48 PM Gregor Zurowski > wrote: > > > > I started with the release yesterday, but did not manage to advance > > beyond the branch verification (test build). > > > > I've created a branch on yesterday based on commit 884396f [1]. I can > > proceed today and either use that branch or create a new one that > > includes all changes made today. > > > > Do you guys have any preference? > > > > Thats good, this tag is fine for the RC2. > > > Thanks, > > Gregor > > > > [1] > > https://github.com/apache/camel/commit/884396f00bafe5ea690287046759aa519a63cbde > > > > > > On Tue, Oct 1, 2019 at 1:34 PM Claus Ibsen wrote: > > > > > > Hi Gregor > > > > > > Do you find time in the near future to cut the release ? > > > > > > On Mon, Sep 30, 2019 at 8:32 AM Gregor Zurowski > > > wrote: > > > > > > > > Sure, I am available for cutting the release. I can start with it today > > > > if > > > > you agree. > > > > > > > > Thanks, > > > > Gregor > > > > > > > > > > > > On Thu, Sep 26, 2019, 5:02 PM Andrea Cosentino > > > > wrote: > > > > > > > > > Hello all, > > > > > > > > > > I think we have stable codebase enough to release a new release > > > > > candidate > > > > > for 3.0.0: the second one. > > > > > > > > > > Gregor, do you have time to cut the release? > > > > > > > > > > We have still some pending PRs, but I'll merge them tomorrow. > > > > > > > > > > Please, take a look at the CI jobs, if you notice something weird, > > > > > failing > > > > > stuff or something else, let the ML know. > > > > > > > > > > Thanks everybody! > > > > > > > > > > Cheers. > > > > > > > > > > -- > > > > > Andrea Cosentino > > > > > -- > > > > > Apache Camel PMC Chair > > > > > Apache Karaf Committer > > > > > Apache Servicemix PMC Member > > > > > Email: ancosen1...@yahoo.com > > > > > Twitter: @oscerd2 > > > > > Github: oscerd > > > > > > > > > > > > > > > > > -- > > > Claus Ibsen > > > - > > > http://davsclaus.com @davsclaus > > > Camel in Action 2: https://www.manning.com/ibsen2 > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2
Example - help - Apache Camel XML to JSON and vice versa
Hi! I´m from Brazil and starting with Apache Camel integrations. I was searching for a project in Apache Camel´s Github about marshal and unmarshal. So, no success. I didn´t find. Do u have any example, project or link can in see for help me? Thiago Hernandes de SouzaSoftware DeveloperGitHub LinkedIn"O temor do Senhor é a instrução da sabedoria, e precedendo a honra vai a humildade" Provérbios 15:33
Re: [HEADS UP] Release Camel 3.0.0-RC2
On Tue, Oct 1, 2019 at 3:48 PM Gregor Zurowski wrote: > > I started with the release yesterday, but did not manage to advance > beyond the branch verification (test build). > > I've created a branch on yesterday based on commit 884396f [1]. I can > proceed today and either use that branch or create a new one that > includes all changes made today. > > Do you guys have any preference? > Thats good, this tag is fine for the RC2. > Thanks, > Gregor > > [1] > https://github.com/apache/camel/commit/884396f00bafe5ea690287046759aa519a63cbde > > > On Tue, Oct 1, 2019 at 1:34 PM Claus Ibsen wrote: > > > > Hi Gregor > > > > Do you find time in the near future to cut the release ? > > > > On Mon, Sep 30, 2019 at 8:32 AM Gregor Zurowski > > wrote: > > > > > > Sure, I am available for cutting the release. I can start with it today if > > > you agree. > > > > > > Thanks, > > > Gregor > > > > > > > > > On Thu, Sep 26, 2019, 5:02 PM Andrea Cosentino > > > wrote: > > > > > > > Hello all, > > > > > > > > I think we have stable codebase enough to release a new release > > > > candidate > > > > for 3.0.0: the second one. > > > > > > > > Gregor, do you have time to cut the release? > > > > > > > > We have still some pending PRs, but I'll merge them tomorrow. > > > > > > > > Please, take a look at the CI jobs, if you notice something weird, > > > > failing > > > > stuff or something else, let the ML know. > > > > > > > > Thanks everybody! > > > > > > > > Cheers. > > > > > > > > -- > > > > Andrea Cosentino > > > > -- > > > > Apache Camel PMC Chair > > > > Apache Karaf Committer > > > > Apache Servicemix PMC Member > > > > Email: ancosen1...@yahoo.com > > > > Twitter: @oscerd2 > > > > Github: oscerd > > > > > > > > > > > > -- > > Claus Ibsen > > - > > http://davsclaus.com @davsclaus > > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
[GitHub] [camel-quarkus] oscerd merged pull request #219: chore: fix mail cs
oscerd merged pull request #219: chore: fix mail cs URL: https://github.com/apache/camel-quarkus/pull/219 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
[GitHub] [camel-quarkus] asf-ci commented on issue #219: chore: fix mail cs
asf-ci commented on issue #219: chore: fix mail cs URL: https://github.com/apache/camel-quarkus/pull/219#issuecomment-537222173 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/187/ 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
[GitHub] [camel-quarkus] ppalaga commented on issue #201: Fix #184 Leverage platform http service
ppalaga commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-537211134 Is this good to merge now? 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
ApacheCon North America 2020, project participation
Hi, folks, (Note: You're receiving this email because you're on the dev@ list for one or more Apache Software Foundation projects.) For ApacheCon North America 2019, we asked projects to participate in the creation of project/topic specific tracks. This was very successful, with about 15 projects stepping up to curate the content for their track/summit/event. We need to know if you're going to do the same for 2020. This informs how large a venue we book for the event, how long the event runs, and many other considerations. If you intend to participate again in 2020, we need to hear from you on the plann...@apachecon.com mailing list. This is not a firm commitment, but we need to know if you're, say, 75% confident that you'll be participating. And, no, we do not have any details at all, but assume that it will be in roughly the same calendar space as this year's event, ie, somewhere in the August-October timeframe. Thanks. -- Rich Bowen VP Conferences The Apache Software Foundation @apachecon
[GitHub] [camel-quarkus] asf-ci commented on issue #201: Fix #184 Leverage platform http service
asf-ci commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-537057640 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/186/ 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
[GitHub] [camel-k] jamesnetherton commented on issue #933: Error after cluster restart
jamesnetherton commented on issue #933: Error after cluster restart URL: https://github.com/apache/camel-k/issues/933#issuecomment-537051008 This is maybe the same issue as #739? After restarting the cluster, any attempt to create or modify integrations results in: ``` {"level":"info","ts":1569938239.1303508,"logger":"camel-k.builder","msg":"step failed with error: cannot delete build config: no matches for kind \"BuildConfig\" in version \"build.openshift.io/v1\"","step":"github.com/apache/camel-k/pkg/builder/s2i/Publisher","phase":40,"kit":"kit-bm9llbs37plojukjjqjg"} ``` Restarting the operator fixes things. 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
[GitHub] [camel-k] nicolaferraro commented on issue #888: Camel K should use duck types to recognize Knative sinks
nicolaferraro commented on issue #888: Camel K should use duck types to recognize Knative sinks URL: https://github.com/apache/camel-k/issues/888#issuecomment-537047528 Fixed by https://github.com/apache/camel-k/pull/961 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
[GitHub] [camel-k] nicolaferraro closed issue #888: Camel K should use duck types to recognize Knative sinks
nicolaferraro closed issue #888: Camel K should use duck types to recognize Knative sinks URL: https://github.com/apache/camel-k/issues/888 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
[GitHub] [camel-k] nicolaferraro merged pull request #961: Upgrade to Knative 0.9
nicolaferraro merged pull request #961: Upgrade to Knative 0.9 URL: https://github.com/apache/camel-k/pull/961 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
[GitHub] [camel-k] nicolaferraro closed issue #952: Upgrade to Knative 0.9
nicolaferraro closed issue #952: Upgrade to Knative 0.9 URL: https://github.com/apache/camel-k/issues/952 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
Re: [HEADS UP] Release Camel 3.0.0-RC2
Thanks for your time Gregor! Il giorno mar 1 ott 2019 alle ore 15:50 Andrea Cosentino ha scritto: > There is a netty upgrade in the today commits, but I think it's not > crucial for Rc2. > > Lets wait for the others :-) > > Il giorno mar 1 ott 2019 alle ore 15:48 Gregor Zurowski < > gre...@list.zurowski.org> ha scritto: > >> I started with the release yesterday, but did not manage to advance >> beyond the branch verification (test build). >> >> I've created a branch on yesterday based on commit 884396f [1]. I can >> proceed today and either use that branch or create a new one that >> includes all changes made today. >> >> Do you guys have any preference? >> >> Thanks, >> Gregor >> >> [1] >> https://github.com/apache/camel/commit/884396f00bafe5ea690287046759aa519a63cbde >> >> >> On Tue, Oct 1, 2019 at 1:34 PM Claus Ibsen wrote: >> > >> > Hi Gregor >> > >> > Do you find time in the near future to cut the release ? >> > >> > On Mon, Sep 30, 2019 at 8:32 AM Gregor Zurowski >> > wrote: >> > > >> > > Sure, I am available for cutting the release. I can start with it >> today if >> > > you agree. >> > > >> > > Thanks, >> > > Gregor >> > > >> > > >> > > On Thu, Sep 26, 2019, 5:02 PM Andrea Cosentino >> > > wrote: >> > > >> > > > Hello all, >> > > > >> > > > I think we have stable codebase enough to release a new release >> candidate >> > > > for 3.0.0: the second one. >> > > > >> > > > Gregor, do you have time to cut the release? >> > > > >> > > > We have still some pending PRs, but I'll merge them tomorrow. >> > > > >> > > > Please, take a look at the CI jobs, if you notice something weird, >> failing >> > > > stuff or something else, let the ML know. >> > > > >> > > > Thanks everybody! >> > > > >> > > > Cheers. >> > > > >> > > > -- >> > > > Andrea Cosentino >> > > > -- >> > > > Apache Camel PMC Chair >> > > > Apache Karaf Committer >> > > > Apache Servicemix PMC Member >> > > > Email: ancosen1...@yahoo.com >> > > > Twitter: @oscerd2 >> > > > Github: oscerd >> > > > >> > >> > >> > >> > -- >> > Claus Ibsen >> > - >> > http://davsclaus.com @davsclaus >> > Camel in Action 2: https://www.manning.com/ibsen2 >> >
Re: [HEADS UP] Release Camel 3.0.0-RC2
There is a netty upgrade in the today commits, but I think it's not crucial for Rc2. Lets wait for the others :-) Il giorno mar 1 ott 2019 alle ore 15:48 Gregor Zurowski < gre...@list.zurowski.org> ha scritto: > I started with the release yesterday, but did not manage to advance > beyond the branch verification (test build). > > I've created a branch on yesterday based on commit 884396f [1]. I can > proceed today and either use that branch or create a new one that > includes all changes made today. > > Do you guys have any preference? > > Thanks, > Gregor > > [1] > https://github.com/apache/camel/commit/884396f00bafe5ea690287046759aa519a63cbde > > > On Tue, Oct 1, 2019 at 1:34 PM Claus Ibsen wrote: > > > > Hi Gregor > > > > Do you find time in the near future to cut the release ? > > > > On Mon, Sep 30, 2019 at 8:32 AM Gregor Zurowski > > wrote: > > > > > > Sure, I am available for cutting the release. I can start with it > today if > > > you agree. > > > > > > Thanks, > > > Gregor > > > > > > > > > On Thu, Sep 26, 2019, 5:02 PM Andrea Cosentino > > > wrote: > > > > > > > Hello all, > > > > > > > > I think we have stable codebase enough to release a new release > candidate > > > > for 3.0.0: the second one. > > > > > > > > Gregor, do you have time to cut the release? > > > > > > > > We have still some pending PRs, but I'll merge them tomorrow. > > > > > > > > Please, take a look at the CI jobs, if you notice something weird, > failing > > > > stuff or something else, let the ML know. > > > > > > > > Thanks everybody! > > > > > > > > Cheers. > > > > > > > > -- > > > > Andrea Cosentino > > > > -- > > > > Apache Camel PMC Chair > > > > Apache Karaf Committer > > > > Apache Servicemix PMC Member > > > > Email: ancosen1...@yahoo.com > > > > Twitter: @oscerd2 > > > > Github: oscerd > > > > > > > > > > > > -- > > Claus Ibsen > > - > > http://davsclaus.com @davsclaus > > Camel in Action 2: https://www.manning.com/ibsen2 >
Re: [HEADS UP] Release Camel 3.0.0-RC2
I started with the release yesterday, but did not manage to advance beyond the branch verification (test build). I've created a branch on yesterday based on commit 884396f [1]. I can proceed today and either use that branch or create a new one that includes all changes made today. Do you guys have any preference? Thanks, Gregor [1] https://github.com/apache/camel/commit/884396f00bafe5ea690287046759aa519a63cbde On Tue, Oct 1, 2019 at 1:34 PM Claus Ibsen wrote: > > Hi Gregor > > Do you find time in the near future to cut the release ? > > On Mon, Sep 30, 2019 at 8:32 AM Gregor Zurowski > wrote: > > > > Sure, I am available for cutting the release. I can start with it today if > > you agree. > > > > Thanks, > > Gregor > > > > > > On Thu, Sep 26, 2019, 5:02 PM Andrea Cosentino > > wrote: > > > > > Hello all, > > > > > > I think we have stable codebase enough to release a new release candidate > > > for 3.0.0: the second one. > > > > > > Gregor, do you have time to cut the release? > > > > > > We have still some pending PRs, but I'll merge them tomorrow. > > > > > > Please, take a look at the CI jobs, if you notice something weird, failing > > > stuff or something else, let the ML know. > > > > > > Thanks everybody! > > > > > > Cheers. > > > > > > -- > > > Andrea Cosentino > > > -- > > > Apache Camel PMC Chair > > > Apache Karaf Committer > > > Apache Servicemix PMC Member > > > Email: ancosen1...@yahoo.com > > > Twitter: @oscerd2 > > > Github: oscerd > > > > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2
Re: [HEADS UP] Release Camel 3.0.0-RC2
It sounds good, thanks for starting the process. Regards JB On 01/10/2019 15:47, Gregor Zurowski wrote: > I started with the release yesterday, but did not manage to advance > beyond the branch verification (test build). > > I've created a branch on yesterday based on commit 884396f [1]. I can > proceed today and either use that branch or create a new one that > includes all changes made today. > > Do you guys have any preference? > > Thanks, > Gregor > > [1] > https://github.com/apache/camel/commit/884396f00bafe5ea690287046759aa519a63cbde > > > On Tue, Oct 1, 2019 at 1:34 PM Claus Ibsen wrote: >> >> Hi Gregor >> >> Do you find time in the near future to cut the release ? >> >> On Mon, Sep 30, 2019 at 8:32 AM Gregor Zurowski >> wrote: >>> >>> Sure, I am available for cutting the release. I can start with it today if >>> you agree. >>> >>> Thanks, >>> Gregor >>> >>> >>> On Thu, Sep 26, 2019, 5:02 PM Andrea Cosentino >>> wrote: >>> Hello all, I think we have stable codebase enough to release a new release candidate for 3.0.0: the second one. Gregor, do you have time to cut the release? We have still some pending PRs, but I'll merge them tomorrow. Please, take a look at the CI jobs, if you notice something weird, failing stuff or something else, let the ML know. Thanks everybody! Cheers. -- Andrea Cosentino -- Apache Camel PMC Chair Apache Karaf Committer Apache Servicemix PMC Member Email: ancosen1...@yahoo.com Twitter: @oscerd2 Github: oscerd >> >> >> >> -- >> Claus Ibsen >> - >> http://davsclaus.com @davsclaus >> Camel in Action 2: https://www.manning.com/ibsen2 -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
[GitHub] [camel-k] astefanutti merged pull request #976: chore: Display Kaniko version in prelude log
astefanutti merged pull request #976: chore: Display Kaniko version in prelude log URL: https://github.com/apache/camel-k/pull/976 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
[GitHub] [camel-quarkus] asf-ci commented on issue #201: Fix #184 Leverage platform http service
asf-ci commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-537026359 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/185/ 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
[GitHub] [camel-k] astefanutti opened a new pull request #976: chore: Display Kaniko version in prelude log
astefanutti opened a new pull request #976: chore: Display Kaniko version in prelude log URL: https://github.com/apache/camel-k/pull/976 I've tried upgrading Kaniko to version 0.12.0 but builds seem a lot slower. I'll try to investigate further ASAP. In the meantime, I'm dumping what I have :) 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
[GitHub] [camel-quarkus] ppalaga commented on issue #201: Fix #184 Leverage platform http service
ppalaga commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-537007793 In e66f2326c7bd4662dff548e7ba6272e2f1cd3668 all requests should be either resolved or should have followup issue. 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r330021351 ## File path: extensions/platform-http/deployment/src/main/java/org/apache/camel/quarkus/component/platform/http/deployment/PlatformHttpProcessor.java ## @@ -0,0 +1,43 @@ +/* + * 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.platform.http.deployment; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.annotations.ExecutionTime; +import io.quarkus.deployment.annotations.Record; +import io.quarkus.deployment.builditem.FeatureBuildItem; +import io.quarkus.vertx.http.deployment.VertxWebRouterBuildItem; + +import org.apache.camel.quarkus.component.platform.http.runtime.PlatformHttpRecorder; +import org.apache.camel.quarkus.core.deployment.CamelRuntimeBuildItem; + +class PlatformHttpProcessor { + +private static final String FEATURE = "camel-platform-http"; + +@BuildStep +FeatureBuildItem feature() { +return new FeatureBuildItem(FEATURE); +} + +@Record(ExecutionTime.RUNTIME_INIT) +@BuildStep +void platformHttpComponent(PlatformHttpRecorder recorder, CamelRuntimeBuildItem runtime, VertxWebRouterBuildItem router) { +recorder.registerPlatformHttpComponent(runtime.getRuntime(), router.getRouter()); Review comment: Will do this in a followup https://github.com/apache/camel-quarkus/issues/218 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
[GitHub] [camel-quarkus] ppalaga opened a new issue #218: Ensure the PlatformHttpComponent is registered before the routes are started
ppalaga opened a new issue #218: Ensure the PlatformHttpComponent is registered before the routes are started URL: https://github.com/apache/camel-quarkus/issues/218 Followup of https://github.com/apache/camel-quarkus/pull/201#discussion_r329945714 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r330020160 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java ## @@ -0,0 +1,132 @@ +/* + * 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.component.platform.http; + +import java.util.Collections; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.camel.AsyncEndpoint; +import org.apache.camel.Component; +import org.apache.camel.Consumer; +import org.apache.camel.Processor; +import org.apache.camel.Producer; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.component.platform.http.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.spi.HeaderFilterStrategyAware; +import org.apache.camel.spi.UriEndpoint; +import org.apache.camel.spi.UriParam; +import org.apache.camel.support.DefaultEndpoint; + +@UriEndpoint(/* firstVersion = "3.?.0", */ scheme = "platform-http", title = "Platform HTTP", syntax = "platform-http:[methods:]path", label = "http") +public class PlatformHttpEndpoint extends DefaultEndpoint implements AsyncEndpoint, HeaderFilterStrategyAware { + +private final String path; +private final Set methods; + +@UriParam(label = "consumer", description = "A comma separated list of HTTP methods to serve. This list will be merged with the methods specified in the URI path. E.g. platform-http:GET,POST:/path?httpMethodRestrict=PUT,DELETE will effectivelly result in GET,POST,PUT,DELETE. If no methods are specified, all methods will be served.") +private String httpMethodRestrict; Review comment: Resolved in e66f2326c7bd4662dff548e7ba6272e2f1cd3668 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
[GitHub] [camel-quarkus] ppalaga commented on issue #201: Fix #184 Leverage platform http service
ppalaga commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-537005707 I removed the methods from the URI body after @lburgazzoli mentioned that we could eventually want to have this as a producer, where we indeed need the place for protocol, host, port, etc. 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r330018350 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); Review comment: Solved in e66f2326c7bd4662dff548e7ba6272e2f1cd3668 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r330017047 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); +final Set methods = getEndpoint().getEffectiveMethods(); +if (!methods.equals(Method.getAll())) { +methods.stream().forEach(m -> r.method(HttpMethod.valueOf(m.name(; +} + +Config cfg = ConfigProvider.getConfig(); +final BodyHandler bodyHandler = BodyHandler.create(); +/* Keep in sync with how the BodyHandler is configured in io.quarkus.vertx.web.runtime.VertxWebRecorder + * Eventually, VertxWebRecorder should have a method to do this for us. */ +cfg.getOptionalValue("quarkus.http.body.handle-file-uploads", boolean.class).ifPresent(bodyHandler::setHandleFileUploads); +cfg.getOptionalValue("quarkus.http.body.uploads-directory", String.class).ifPresent(bodyHandler::setUploadsDirectory); +cfg.getOptionalValue("quarkus.http.body.delete-uploaded-files-on-end", boolean.class).ifPresent(bodyHandler::setDeleteUploadedFilesOnEnd); +cfg.getOptionalValue("quarkus.http.body.merge-form-attributes", boolean.class).ifPresent(bodyHandler::setMergeFormAttributes); +cfg.getOptionalValue("quarkus.http.body.preallocate-body-buffer", boolean.class).ifPresent(bodyHandler::setPreallocateBodyBuffer); + +r +
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r330016874 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); +final Set methods = getEndpoint().getEffectiveMethods(); +if (!methods.equals(Method.getAll())) { +methods.stream().forEach(m -> r.method(HttpMethod.valueOf(m.name(; +} + +Config cfg = ConfigProvider.getConfig(); +final BodyHandler bodyHandler = BodyHandler.create(); +/* Keep in sync with how the BodyHandler is configured in io.quarkus.vertx.web.runtime.VertxWebRecorder + * Eventually, VertxWebRecorder should have a method to do this for us. */ +cfg.getOptionalValue("quarkus.http.body.handle-file-uploads", boolean.class).ifPresent(bodyHandler::setHandleFileUploads); +cfg.getOptionalValue("quarkus.http.body.uploads-directory", String.class).ifPresent(bodyHandler::setUploadsDirectory); +cfg.getOptionalValue("quarkus.http.body.delete-uploaded-files-on-end", boolean.class).ifPresent(bodyHandler::setDeleteUploadedFilesOnEnd); +cfg.getOptionalValue("quarkus.http.body.merge-form-attributes", boolean.class).ifPresent(bodyHandler::setMergeFormAttributes); +cfg.getOptionalValue("quarkus.http.body.preallocate-body-buffer", boolean.class).ifPresent(bodyHandler::setPreallocateBodyBuffer); + +r +
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r330015867 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); +final Set methods = getEndpoint().getEffectiveMethods(); +if (!methods.equals(Method.getAll())) { +methods.stream().forEach(m -> r.method(HttpMethod.valueOf(m.name(; +} + +Config cfg = ConfigProvider.getConfig(); +final BodyHandler bodyHandler = BodyHandler.create(); +/* Keep in sync with how the BodyHandler is configured in io.quarkus.vertx.web.runtime.VertxWebRecorder + * Eventually, VertxWebRecorder should have a method to do this for us. */ +cfg.getOptionalValue("quarkus.http.body.handle-file-uploads", boolean.class).ifPresent(bodyHandler::setHandleFileUploads); +cfg.getOptionalValue("quarkus.http.body.uploads-directory", String.class).ifPresent(bodyHandler::setUploadsDirectory); +cfg.getOptionalValue("quarkus.http.body.delete-uploaded-files-on-end", boolean.class).ifPresent(bodyHandler::setDeleteUploadedFilesOnEnd); +cfg.getOptionalValue("quarkus.http.body.merge-form-attributes", boolean.class).ifPresent(bodyHandler::setMergeFormAttributes); +cfg.getOptionalValue("quarkus.http.body.preallocate-body-buffer", boolean.class).ifPresent(bodyHandler::setPreallocateBodyBuffer); + +r +
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r330015181 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); Review comment: `rte` would not look self explaining. Took `newRoute` FWIW. 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r330013855 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); Review comment: How many letters is enough, BTW? Going to use 3 and wonder whether 2 would pass your filter too? 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r330013233 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); Review comment: Frankly have not got that point, sorry :) And never saw that as an issue for a variable ranging over just a couple of lines. No problem with changing it though. 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r330012304 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/platform/http/PlatformHttpHeaderFilterStrategy.java ## @@ -0,0 +1,49 @@ +/* + * 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.component.platform.http; + +import org.apache.camel.support.DefaultHeaderFilterStrategy; + +public class PlatformHttpHeaderFilterStrategy extends DefaultHeaderFilterStrategy { Review comment: Done in 7c292ebc4ee38f0bda8ed182c29d3cdc3957a0dd 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r330011943 ## File path: extensions/platform-http/component/pom.xml ## @@ -0,0 +1,57 @@ + + +http://maven.apache.org/POM/4.0.0; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> +4.0.0 + +org.apache.camel.quarkus +camel-quarkus-platform-http-parent +0.1.1-SNAPSHOT +../pom.xml + + +camel-quarkus-platform-http-component +Camel Quarkus :: Platform HTTP :: Component + + + + +org.apache.camel.quarkus +camel-quarkus-bom +${project.version} +pom +import + + + + + + +org.apache.camel +camel-support + + +org.apache.camel +spi-annotations + + Review comment: Added apt in 7c292ebc4ee38f0bda8ed182c29d3cdc3957a0dd 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r330011459 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java ## @@ -0,0 +1,132 @@ +/* + * 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.component.platform.http; + +import java.util.Collections; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.camel.AsyncEndpoint; +import org.apache.camel.Component; +import org.apache.camel.Consumer; +import org.apache.camel.Processor; +import org.apache.camel.Producer; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.component.platform.http.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.spi.HeaderFilterStrategyAware; +import org.apache.camel.spi.UriEndpoint; +import org.apache.camel.spi.UriParam; +import org.apache.camel.support.DefaultEndpoint; + +@UriEndpoint(/* firstVersion = "3.?.0", */ scheme = "platform-http", title = "Platform HTTP", syntax = "platform-http:[methods:]path", label = "http") +public class PlatformHttpEndpoint extends DefaultEndpoint implements AsyncEndpoint, HeaderFilterStrategyAware { + +private final String path; +private final Set methods; + +@UriParam(label = "consumer", description = "A comma separated list of HTTP methods to serve. This list will be merged with the methods specified in the URI path. E.g. platform-http:GET,POST:/path?httpMethodRestrict=PUT,DELETE will effectivelly result in GET,POST,PUT,DELETE. If no methods are specified, all methods will be served.") +private String httpMethodRestrict; + +@UriParam(label = "advanced") +private PlatformHttpEngine platformHttpEngine; + +@UriParam(label = "advanced") +private HeaderFilterStrategy headerFilterStrategy = new PlatformHttpHeaderFilterStrategy(); + +public PlatformHttpEndpoint(String uri, String remaining, Component component) { +super(uri, component); + +final String[] remainingParts = remaining.split(":"); +switch (remainingParts.length) { +case 1: +path = remaining; +methods = null; +break; +case 2: +methods = Method.parseList(remainingParts[0]); +path = remainingParts[1]; +break; +default: +throw new IllegalArgumentException("Expected a path or two segments delimited by ':'; found " + remaining); +} +} + +@Override +public Producer createProducer() throws Exception { +throw new UnsupportedOperationException("Producer is not supported"); +} + +@Override +public Consumer createConsumer(Processor processor) throws Exception { +if (platformHttpEngine == null) { +platformHttpEngine = getCamelContext().getRegistry() + .lookupByNameAndType(PlatformHttpConstants.PLATFORM_HTTP_ENGINE_NAME, PlatformHttpEngine.class); +} +return platformHttpEngine.createConsumer(this, processor); +} + +public Set getEffectiveMethods() { Review comment: Removed in 7c292ebc4ee38f0bda8ed182c29d3cdc3957a0dd 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r330011280 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java ## @@ -0,0 +1,132 @@ +/* + * 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.component.platform.http; + +import java.util.Collections; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.camel.AsyncEndpoint; +import org.apache.camel.Component; +import org.apache.camel.Consumer; +import org.apache.camel.Processor; +import org.apache.camel.Producer; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.component.platform.http.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.spi.HeaderFilterStrategyAware; +import org.apache.camel.spi.UriEndpoint; +import org.apache.camel.spi.UriParam; +import org.apache.camel.support.DefaultEndpoint; + +@UriEndpoint(/* firstVersion = "3.?.0", */ scheme = "platform-http", title = "Platform HTTP", syntax = "platform-http:[methods:]path", label = "http") +public class PlatformHttpEndpoint extends DefaultEndpoint implements AsyncEndpoint, HeaderFilterStrategyAware { + +private final String path; +private final Set methods; + +@UriParam(label = "consumer", description = "A comma separated list of HTTP methods to serve. This list will be merged with the methods specified in the URI path. E.g. platform-http:GET,POST:/path?httpMethodRestrict=PUT,DELETE will effectivelly result in GET,POST,PUT,DELETE. If no methods are specified, all methods will be served.") +private String httpMethodRestrict; + +@UriParam(label = "advanced") +private PlatformHttpEngine platformHttpEngine; + +@UriParam(label = "advanced") +private HeaderFilterStrategy headerFilterStrategy = new PlatformHttpHeaderFilterStrategy(); + +public PlatformHttpEndpoint(String uri, String remaining, Component component) { +super(uri, component); + +final String[] remainingParts = remaining.split(":"); +switch (remainingParts.length) { +case 1: +path = remaining; +methods = null; +break; +case 2: +methods = Method.parseList(remainingParts[0]); +path = remainingParts[1]; +break; +default: +throw new IllegalArgumentException("Expected a path or two segments delimited by ':'; found " + remaining); +} +} + +@Override +public Producer createProducer() throws Exception { +throw new UnsupportedOperationException("Producer is not supported"); +} + +@Override +public Consumer createConsumer(Processor processor) throws Exception { +if (platformHttpEngine == null) { +platformHttpEngine = getCamelContext().getRegistry() Review comment: Done in 7c292ebc4ee38f0bda8ed182c29d3cdc3957a0dd The bottom line is that the omnipresent mutable state makes it very easy do something wrong. I wonder whether there ever was some discussion to aim at making Camel more functional. 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
Re: [HEADS UP] Release Camel 3.0.0-RC2
Hi Gregor Do you find time in the near future to cut the release ? On Mon, Sep 30, 2019 at 8:32 AM Gregor Zurowski wrote: > > Sure, I am available for cutting the release. I can start with it today if > you agree. > > Thanks, > Gregor > > > On Thu, Sep 26, 2019, 5:02 PM Andrea Cosentino > wrote: > > > Hello all, > > > > I think we have stable codebase enough to release a new release candidate > > for 3.0.0: the second one. > > > > Gregor, do you have time to cut the release? > > > > We have still some pending PRs, but I'll merge them tomorrow. > > > > Please, take a look at the CI jobs, if you notice something weird, failing > > stuff or something else, let the ML know. > > > > Thanks everybody! > > > > Cheers. > > > > -- > > Andrea Cosentino > > -- > > Apache Camel PMC Chair > > Apache Karaf Committer > > Apache Servicemix PMC Member > > Email: ancosen1...@yahoo.com > > Twitter: @oscerd2 > > Github: oscerd > > -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r33330 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); +final Set methods = getEndpoint().getEffectiveMethods(); +if (!methods.equals(Method.getAll())) { +methods.stream().forEach(m -> r.method(HttpMethod.valueOf(m.name(; +} + +Config cfg = ConfigProvider.getConfig(); +final BodyHandler bodyHandler = BodyHandler.create(); +/* Keep in sync with how the BodyHandler is configured in io.quarkus.vertx.web.runtime.VertxWebRecorder + * Eventually, VertxWebRecorder should have a method to do this for us. */ +cfg.getOptionalValue("quarkus.http.body.handle-file-uploads", boolean.class).ifPresent(bodyHandler::setHandleFileUploads); +cfg.getOptionalValue("quarkus.http.body.uploads-directory", String.class).ifPresent(bodyHandler::setUploadsDirectory); +cfg.getOptionalValue("quarkus.http.body.delete-uploaded-files-on-end", boolean.class).ifPresent(bodyHandler::setDeleteUploadedFilesOnEnd); +cfg.getOptionalValue("quarkus.http.body.merge-form-attributes", boolean.class).ifPresent(bodyHandler::setMergeFormAttributes); +cfg.getOptionalValue("quarkus.http.body.preallocate-body-buffer", boolean.class).ifPresent(bodyHandler::setPreallocateBodyBuffer); + +r +
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329997666 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); +final Set methods = getEndpoint().getEffectiveMethods(); +if (!methods.equals(Method.getAll())) { +methods.stream().forEach(m -> r.method(HttpMethod.valueOf(m.name(; +} + +Config cfg = ConfigProvider.getConfig(); +final BodyHandler bodyHandler = BodyHandler.create(); +/* Keep in sync with how the BodyHandler is configured in io.quarkus.vertx.web.runtime.VertxWebRecorder + * Eventually, VertxWebRecorder should have a method to do this for us. */ +cfg.getOptionalValue("quarkus.http.body.handle-file-uploads", boolean.class).ifPresent(bodyHandler::setHandleFileUploads); +cfg.getOptionalValue("quarkus.http.body.uploads-directory", String.class).ifPresent(bodyHandler::setUploadsDirectory); +cfg.getOptionalValue("quarkus.http.body.delete-uploaded-files-on-end", boolean.class).ifPresent(bodyHandler::setDeleteUploadedFilesOnEnd); +cfg.getOptionalValue("quarkus.http.body.merge-form-attributes", boolean.class).ifPresent(bodyHandler::setMergeFormAttributes); +cfg.getOptionalValue("quarkus.http.body.preallocate-body-buffer", boolean.class).ifPresent(bodyHandler::setPreallocateBodyBuffer); + +r +
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329995735 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); +final Set methods = getEndpoint().getEffectiveMethods(); +if (!methods.equals(Method.getAll())) { +methods.stream().forEach(m -> r.method(HttpMethod.valueOf(m.name(; +} + +Config cfg = ConfigProvider.getConfig(); +final BodyHandler bodyHandler = BodyHandler.create(); +/* Keep in sync with how the BodyHandler is configured in io.quarkus.vertx.web.runtime.VertxWebRecorder + * Eventually, VertxWebRecorder should have a method to do this for us. */ +cfg.getOptionalValue("quarkus.http.body.handle-file-uploads", boolean.class).ifPresent(bodyHandler::setHandleFileUploads); +cfg.getOptionalValue("quarkus.http.body.uploads-directory", String.class).ifPresent(bodyHandler::setUploadsDirectory); +cfg.getOptionalValue("quarkus.http.body.delete-uploaded-files-on-end", boolean.class).ifPresent(bodyHandler::setDeleteUploadedFilesOnEnd); +cfg.getOptionalValue("quarkus.http.body.merge-form-attributes", boolean.class).ifPresent(bodyHandler::setMergeFormAttributes); +cfg.getOptionalValue("quarkus.http.body.preallocate-body-buffer", boolean.class).ifPresent(bodyHandler::setPreallocateBodyBuffer); + +r +
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329995185 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); Review comment: Okay cant you get my point about using a single letter is bad (only e or i is usually common) 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329994613 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); +final Set methods = getEndpoint().getEffectiveMethods(); +if (!methods.equals(Method.getAll())) { +methods.stream().forEach(m -> r.method(HttpMethod.valueOf(m.name(; +} + +Config cfg = ConfigProvider.getConfig(); +final BodyHandler bodyHandler = BodyHandler.create(); +/* Keep in sync with how the BodyHandler is configured in io.quarkus.vertx.web.runtime.VertxWebRecorder + * Eventually, VertxWebRecorder should have a method to do this for us. */ +cfg.getOptionalValue("quarkus.http.body.handle-file-uploads", boolean.class).ifPresent(bodyHandler::setHandleFileUploads); +cfg.getOptionalValue("quarkus.http.body.uploads-directory", String.class).ifPresent(bodyHandler::setUploadsDirectory); +cfg.getOptionalValue("quarkus.http.body.delete-uploaded-files-on-end", boolean.class).ifPresent(bodyHandler::setDeleteUploadedFilesOnEnd); +cfg.getOptionalValue("quarkus.http.body.merge-form-attributes", boolean.class).ifPresent(bodyHandler::setMergeFormAttributes); +cfg.getOptionalValue("quarkus.http.body.preallocate-body-buffer", boolean.class).ifPresent(bodyHandler::setPreallocateBodyBuffer); + +r +
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329994374 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); Review comment: Are you sure? `router` would clash with the `router` field. 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
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329977558 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); +final Set methods = getEndpoint().getEffectiveMethods(); +if (!methods.equals(Method.getAll())) { +methods.stream().forEach(m -> r.method(HttpMethod.valueOf(m.name(; +} + +Config cfg = ConfigProvider.getConfig(); +final BodyHandler bodyHandler = BodyHandler.create(); +/* Keep in sync with how the BodyHandler is configured in io.quarkus.vertx.web.runtime.VertxWebRecorder Review comment: Good code comment 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
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329973083 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java ## @@ -0,0 +1,132 @@ +/* + * 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.component.platform.http; + +import java.util.Collections; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.camel.AsyncEndpoint; +import org.apache.camel.Component; +import org.apache.camel.Consumer; +import org.apache.camel.Processor; +import org.apache.camel.Producer; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.component.platform.http.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.spi.HeaderFilterStrategyAware; +import org.apache.camel.spi.UriEndpoint; +import org.apache.camel.spi.UriParam; +import org.apache.camel.support.DefaultEndpoint; + +@UriEndpoint(/* firstVersion = "3.?.0", */ scheme = "platform-http", title = "Platform HTTP", syntax = "platform-http:[methods:]path", label = "http") +public class PlatformHttpEndpoint extends DefaultEndpoint implements AsyncEndpoint, HeaderFilterStrategyAware { + +private final String path; +private final Set methods; + +@UriParam(label = "consumer", description = "A comma separated list of HTTP methods to serve. This list will be merged with the methods specified in the URI path. E.g. platform-http:GET,POST:/path?httpMethodRestrict=PUT,DELETE will effectivelly result in GET,POST,PUT,DELETE. If no methods are specified, all methods will be served.") +private String httpMethodRestrict; + +@UriParam(label = "advanced") +private PlatformHttpEngine platformHttpEngine; + +@UriParam(label = "advanced") +private HeaderFilterStrategy headerFilterStrategy = new PlatformHttpHeaderFilterStrategy(); + +public PlatformHttpEndpoint(String uri, String remaining, Component component) { +super(uri, component); + +final String[] remainingParts = remaining.split(":"); +switch (remainingParts.length) { +case 1: +path = remaining; +methods = null; +break; +case 2: +methods = Method.parseList(remainingParts[0]); +path = remainingParts[1]; +break; +default: +throw new IllegalArgumentException("Expected a path or two segments delimited by ':'; found " + remaining); +} +} + +@Override +public Producer createProducer() throws Exception { +throw new UnsupportedOperationException("Producer is not supported"); +} + +@Override +public Consumer createConsumer(Processor processor) throws Exception { +if (platformHttpEngine == null) { +platformHttpEngine = getCamelContext().getRegistry() + .lookupByNameAndType(PlatformHttpConstants.PLATFORM_HTTP_ENGINE_NAME, PlatformHttpEngine.class); +} +return platformHttpEngine.createConsumer(this, processor); +} + +public Set getEffectiveMethods() { Review comment: Does this need to be public method 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
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329972342 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java ## @@ -0,0 +1,132 @@ +/* + * 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.component.platform.http; + +import java.util.Collections; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.camel.AsyncEndpoint; +import org.apache.camel.Component; +import org.apache.camel.Consumer; +import org.apache.camel.Processor; +import org.apache.camel.Producer; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.component.platform.http.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.spi.HeaderFilterStrategyAware; +import org.apache.camel.spi.UriEndpoint; +import org.apache.camel.spi.UriParam; +import org.apache.camel.support.DefaultEndpoint; + +@UriEndpoint(/* firstVersion = "3.?.0", */ scheme = "platform-http", title = "Platform HTTP", syntax = "platform-http:[methods:]path", label = "http") +public class PlatformHttpEndpoint extends DefaultEndpoint implements AsyncEndpoint, HeaderFilterStrategyAware { + +private final String path; +private final Set methods; + +@UriParam(label = "consumer", description = "A comma separated list of HTTP methods to serve. This list will be merged with the methods specified in the URI path. E.g. platform-http:GET,POST:/path?httpMethodRestrict=PUT,DELETE will effectivelly result in GET,POST,PUT,DELETE. If no methods are specified, all methods will be served.") +private String httpMethodRestrict; Review comment: Please do as suggested by Luka so its consistent with Apache Camel. And this is also tooling friendly with respect to parse those Camel URI endpoints. 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
[GitHub] [camel-quarkus] asf-ci commented on issue #201: Fix #184 Leverage platform http service
asf-ci commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-536969231 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/184/ 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
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329978889 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); +final Set methods = getEndpoint().getEffectiveMethods(); +if (!methods.equals(Method.getAll())) { +methods.stream().forEach(m -> r.method(HttpMethod.valueOf(m.name(; +} + +Config cfg = ConfigProvider.getConfig(); +final BodyHandler bodyHandler = BodyHandler.create(); +/* Keep in sync with how the BodyHandler is configured in io.quarkus.vertx.web.runtime.VertxWebRecorder + * Eventually, VertxWebRecorder should have a method to do this for us. */ +cfg.getOptionalValue("quarkus.http.body.handle-file-uploads", boolean.class).ifPresent(bodyHandler::setHandleFileUploads); +cfg.getOptionalValue("quarkus.http.body.uploads-directory", String.class).ifPresent(bodyHandler::setUploadsDirectory); +cfg.getOptionalValue("quarkus.http.body.delete-uploaded-files-on-end", boolean.class).ifPresent(bodyHandler::setDeleteUploadedFilesOnEnd); +cfg.getOptionalValue("quarkus.http.body.merge-form-attributes", boolean.class).ifPresent(bodyHandler::setMergeFormAttributes); +cfg.getOptionalValue("quarkus.http.body.preallocate-body-buffer", boolean.class).ifPresent(bodyHandler::setPreallocateBodyBuffer); + +r +
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329972911 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java ## @@ -0,0 +1,132 @@ +/* + * 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.component.platform.http; + +import java.util.Collections; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.camel.AsyncEndpoint; +import org.apache.camel.Component; +import org.apache.camel.Consumer; +import org.apache.camel.Processor; +import org.apache.camel.Producer; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.component.platform.http.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.spi.HeaderFilterStrategyAware; +import org.apache.camel.spi.UriEndpoint; +import org.apache.camel.spi.UriParam; +import org.apache.camel.support.DefaultEndpoint; + +@UriEndpoint(/* firstVersion = "3.?.0", */ scheme = "platform-http", title = "Platform HTTP", syntax = "platform-http:[methods:]path", label = "http") +public class PlatformHttpEndpoint extends DefaultEndpoint implements AsyncEndpoint, HeaderFilterStrategyAware { + +private final String path; +private final Set methods; + +@UriParam(label = "consumer", description = "A comma separated list of HTTP methods to serve. This list will be merged with the methods specified in the URI path. E.g. platform-http:GET,POST:/path?httpMethodRestrict=PUT,DELETE will effectivelly result in GET,POST,PUT,DELETE. If no methods are specified, all methods will be served.") +private String httpMethodRestrict; + +@UriParam(label = "advanced") +private PlatformHttpEngine platformHttpEngine; + +@UriParam(label = "advanced") +private HeaderFilterStrategy headerFilterStrategy = new PlatformHttpHeaderFilterStrategy(); + +public PlatformHttpEndpoint(String uri, String remaining, Component component) { +super(uri, component); + +final String[] remainingParts = remaining.split(":"); +switch (remainingParts.length) { +case 1: +path = remaining; +methods = null; +break; +case 2: +methods = Method.parseList(remainingParts[0]); +path = remainingParts[1]; +break; +default: +throw new IllegalArgumentException("Expected a path or two segments delimited by ':'; found " + remaining); +} +} + +@Override +public Producer createProducer() throws Exception { +throw new UnsupportedOperationException("Producer is not supported"); +} + +@Override +public Consumer createConsumer(Processor processor) throws Exception { +if (platformHttpEngine == null) { +platformHttpEngine = getCamelContext().getRegistry() Review comment: What if there is no platform engine. Also this logic is better in doStart and then fail if there is no engine, so we fail fast. 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
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329973648 ## File path: extensions/platform-http/component/pom.xml ## @@ -0,0 +1,57 @@ + + +http://maven.apache.org/POM/4.0.0; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> +4.0.0 + +org.apache.camel.quarkus +camel-quarkus-platform-http-parent +0.1.1-SNAPSHOT +../pom.xml + + +camel-quarkus-platform-http-component +Camel Quarkus :: Platform HTTP :: Component + + + + +org.apache.camel.quarkus +camel-quarkus-bom +${project.version} +pom +import + + + + + + +org.apache.camel +camel-support + + +org.apache.camel +spi-annotations + + Review comment: Yes you need camel-apt for the apt compiler plugin. You can look at the component maven archetype: https://github.com/apache/camel/blob/master/archetypes/camel-archetype-component/src/main/resources/archetype-resources/pom.xml 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
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329976425 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/platform/http/PlatformHttpHeaderFilterStrategy.java ## @@ -0,0 +1,49 @@ +/* + * 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.component.platform.http; + +import org.apache.camel.support.DefaultHeaderFilterStrategy; + +public class PlatformHttpHeaderFilterStrategy extends DefaultHeaderFilterStrategy { Review comment: Is this similar to a http header filter strategy, if so then I suggest to add a comment about this so in the future we know and can make sure to align these classes. 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
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329979219 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); +final Set methods = getEndpoint().getEffectiveMethods(); +if (!methods.equals(Method.getAll())) { +methods.stream().forEach(m -> r.method(HttpMethod.valueOf(m.name(; +} + +Config cfg = ConfigProvider.getConfig(); +final BodyHandler bodyHandler = BodyHandler.create(); +/* Keep in sync with how the BodyHandler is configured in io.quarkus.vertx.web.runtime.VertxWebRecorder + * Eventually, VertxWebRecorder should have a method to do this for us. */ +cfg.getOptionalValue("quarkus.http.body.handle-file-uploads", boolean.class).ifPresent(bodyHandler::setHandleFileUploads); +cfg.getOptionalValue("quarkus.http.body.uploads-directory", String.class).ifPresent(bodyHandler::setUploadsDirectory); +cfg.getOptionalValue("quarkus.http.body.delete-uploaded-files-on-end", boolean.class).ifPresent(bodyHandler::setDeleteUploadedFilesOnEnd); +cfg.getOptionalValue("quarkus.http.body.merge-form-attributes", boolean.class).ifPresent(bodyHandler::setMergeFormAttributes); +cfg.getOptionalValue("quarkus.http.body.preallocate-body-buffer", boolean.class).ifPresent(bodyHandler::setPreallocateBodyBuffer); + +r +
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329978685 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); +final Set methods = getEndpoint().getEffectiveMethods(); +if (!methods.equals(Method.getAll())) { +methods.stream().forEach(m -> r.method(HttpMethod.valueOf(m.name(; +} + +Config cfg = ConfigProvider.getConfig(); +final BodyHandler bodyHandler = BodyHandler.create(); +/* Keep in sync with how the BodyHandler is configured in io.quarkus.vertx.web.runtime.VertxWebRecorder + * Eventually, VertxWebRecorder should have a method to do this for us. */ +cfg.getOptionalValue("quarkus.http.body.handle-file-uploads", boolean.class).ifPresent(bodyHandler::setHandleFileUploads); +cfg.getOptionalValue("quarkus.http.body.uploads-directory", String.class).ifPresent(bodyHandler::setUploadsDirectory); +cfg.getOptionalValue("quarkus.http.body.delete-uploaded-files-on-end", boolean.class).ifPresent(bodyHandler::setDeleteUploadedFilesOnEnd); +cfg.getOptionalValue("quarkus.http.body.merge-form-attributes", boolean.class).ifPresent(bodyHandler::setMergeFormAttributes); +cfg.getOptionalValue("quarkus.http.body.preallocate-body-buffer", boolean.class).ifPresent(bodyHandler::setPreallocateBodyBuffer); + +r +
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329977650 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); Review comment: Name this router instead of r 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
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329977386 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); Review comment: We use the logger name for the FQN classname in Apache Camel so users can find the class 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
[GitHub] [camel-quarkus] davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service
davsclaus commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329979478 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java ## @@ -0,0 +1,376 @@ +/* + * 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.platform.http.runtime; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.handler.BodyHandler; + +import org.apache.camel.Consumer; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.Processor; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.eclipse.microprofile.config.Config; +import org.eclipse.microprofile.config.ConfigProvider; +import org.jboss.logging.Logger; + +/** + * A Quarkus specific {@link Consumer} for the {@link PlatformHttpComponent}. + */ +public class QuarkusPlatformHttpConsumer extends DefaultConsumer { +private static final Logger LOG = Logger.getLogger("org.apache.camel.quarkus.component.platform.http"); + +private final Router router; +private Route route; + +public QuarkusPlatformHttpConsumer(Endpoint endpoint, Processor processor, Router router) { +super(endpoint, processor); +this.router = router; +} + +@Override +public PlatformHttpEndpoint getEndpoint() { +return (PlatformHttpEndpoint) super.getEndpoint(); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); + +final String path = getEndpoint().getPath(); +final Route r = router.route(path); +final Set methods = getEndpoint().getEffectiveMethods(); +if (!methods.equals(Method.getAll())) { +methods.stream().forEach(m -> r.method(HttpMethod.valueOf(m.name(; +} + +Config cfg = ConfigProvider.getConfig(); +final BodyHandler bodyHandler = BodyHandler.create(); +/* Keep in sync with how the BodyHandler is configured in io.quarkus.vertx.web.runtime.VertxWebRecorder + * Eventually, VertxWebRecorder should have a method to do this for us. */ +cfg.getOptionalValue("quarkus.http.body.handle-file-uploads", boolean.class).ifPresent(bodyHandler::setHandleFileUploads); +cfg.getOptionalValue("quarkus.http.body.uploads-directory", String.class).ifPresent(bodyHandler::setUploadsDirectory); +cfg.getOptionalValue("quarkus.http.body.delete-uploaded-files-on-end", boolean.class).ifPresent(bodyHandler::setDeleteUploadedFilesOnEnd); +cfg.getOptionalValue("quarkus.http.body.merge-form-attributes", boolean.class).ifPresent(bodyHandler::setMergeFormAttributes); +cfg.getOptionalValue("quarkus.http.body.preallocate-body-buffer", boolean.class).ifPresent(bodyHandler::setPreallocateBodyBuffer); + +r +
[GitHub] [camel-quarkus] lburgazzoli opened a new issue #217: [platform http] support for rest dsl
lburgazzoli opened a new issue #217: [platform http] support for rest dsl URL: https://github.com/apache/camel-quarkus/issues/217 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
[GitHub] [camel-quarkus] ppalaga commented on issue #201: Fix #184 Leverage platform http service
ppalaga commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-536943986 > BTW, this component should be usable from the rest dsl so it may need some further development Yes, there are many things missing, incl. more test coverage (I have a long list of test cases to add). Plz. file an issue for this one or other missing things that come to your mind. 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329950820 ## File path: extensions/platform-http/deployment/src/main/java/org/apache/camel/quarkus/component/platform/http/deployment/PlatformHttpProcessor.java ## @@ -0,0 +1,43 @@ +/* + * 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.platform.http.deployment; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.annotations.ExecutionTime; +import io.quarkus.deployment.annotations.Record; +import io.quarkus.deployment.builditem.FeatureBuildItem; +import io.quarkus.vertx.http.deployment.VertxWebRouterBuildItem; + +import org.apache.camel.quarkus.component.platform.http.runtime.PlatformHttpRecorder; +import org.apache.camel.quarkus.core.deployment.CamelRuntimeBuildItem; + +class PlatformHttpProcessor { + +private static final String FEATURE = "camel-platform-http"; + +@BuildStep +FeatureBuildItem feature() { +return new FeatureBuildItem(FEATURE); +} + +@Record(ExecutionTime.RUNTIME_INIT) +@BuildStep +void platformHttpComponent(PlatformHttpRecorder recorder, CamelRuntimeBuildItem runtime, VertxWebRouterBuildItem router) { +recorder.registerPlatformHttpComponent(runtime.getRuntime(), router.getRouter()); Review comment: Good point. Let me figure out how to ensure that. 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329950196 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/PlatformHttpRecorder.java ## @@ -0,0 +1,24 @@ +package org.apache.camel.quarkus.component.platform.http.runtime; + +import org.apache.camel.component.platform.http.PlatformHttpComponent; +import org.apache.camel.component.platform.http.PlatformHttpConstants; +import org.apache.camel.component.platform.http.spi.PlatformHttpEngine; +import org.apache.camel.quarkus.core.runtime.CamelRuntime; +import org.apache.camel.spi.Registry; + +import io.quarkus.arc.runtime.BeanContainer; +import io.quarkus.runtime.RuntimeValue; +import io.quarkus.runtime.annotations.Recorder; + +@Recorder +public class PlatformHttpRecorder { + +public void registerBeans(RuntimeValue runtime, BeanContainer beanContainer) { +final Registry registry = runtime.getValue().getRegistry(); +final QuarkusPlatformHttpEngine engine = beanContainer.instance(QuarkusPlatformHttpEngine.class); Review comment: In bb474bb, the bean container is not involved. The `QuarkusPlatformHttpEngine` is created in the recorder though, which is in line with the requirement of Quarkus that the runtime objects should not be created inside BuildSteps. 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
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329950422 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpEngine.java ## @@ -0,0 +1,45 @@ +/* + * 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.platform.http.runtime; + +import javax.enterprise.context.ApplicationScoped; +import javax.inject.Inject; +import javax.inject.Named; + +import org.apache.camel.Consumer; +import org.apache.camel.Processor; +import org.apache.camel.component.platform.http.PlatformHttpConstants; +import org.apache.camel.component.platform.http.PlatformHttpEndpoint; +import org.apache.camel.component.platform.http.spi.PlatformHttpEngine; +import org.jboss.logging.Logger; + +import io.vertx.ext.web.Router; + +@ApplicationScoped +@Named(PlatformHttpConstants.PLATFORM_HTTP_ENGINE_NAME) +public class QuarkusPlatformHttpEngine implements PlatformHttpEngine { Review comment: Improved in bb474bb as far as possible. 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
[GitHub] [camel-k] astefanutti merged pull request #975: fix: Kaniko cache default spec is not updated when calling the status endpoint
astefanutti merged pull request #975: fix: Kaniko cache default spec is not updated when calling the status endpoint URL: https://github.com/apache/camel-k/pull/975 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
[GitHub] [camel-k] astefanutti merged pull request #969: chore(cli): Hide builder and operator commands
astefanutti merged pull request #969: chore(cli): Hide builder and operator commands URL: https://github.com/apache/camel-k/pull/969 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
[GitHub] [camel-quarkus] lburgazzoli commented on issue #201: Fix #184 Leverage platform http service
lburgazzoli commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-536939593 BTW, this component should be usable from the rest dsl so it may need some further development 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
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service
lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r329945714 ## File path: extensions/platform-http/deployment/src/main/java/org/apache/camel/quarkus/component/platform/http/deployment/PlatformHttpProcessor.java ## @@ -0,0 +1,43 @@ +/* + * 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.platform.http.deployment; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.annotations.ExecutionTime; +import io.quarkus.deployment.annotations.Record; +import io.quarkus.deployment.builditem.FeatureBuildItem; +import io.quarkus.vertx.http.deployment.VertxWebRouterBuildItem; + +import org.apache.camel.quarkus.component.platform.http.runtime.PlatformHttpRecorder; +import org.apache.camel.quarkus.core.deployment.CamelRuntimeBuildItem; + +class PlatformHttpProcessor { + +private static final String FEATURE = "camel-platform-http"; + +@BuildStep +FeatureBuildItem feature() { +return new FeatureBuildItem(FEATURE); +} + +@Record(ExecutionTime.RUNTIME_INIT) +@BuildStep +void platformHttpComponent(PlatformHttpRecorder recorder, CamelRuntimeBuildItem runtime, VertxWebRouterBuildItem router) { +recorder.registerPlatformHttpComponent(runtime.getRuntime(), router.getRouter()); Review comment: you need to be sure this binding happens before the routes are started 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
[GitHub] [camel-k] astefanutti merged pull request #974: fix: Add nil check for dev mode intergration phase watch result
astefanutti merged pull request #974: fix: Add nil check for dev mode intergration phase watch result URL: https://github.com/apache/camel-k/pull/974 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
[GitHub] [camel-k] astefanutti closed issue #968: Integration fails with --dev mode
astefanutti closed issue #968: Integration fails with --dev mode URL: https://github.com/apache/camel-k/issues/968 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
[GitHub] [camel-k] astefanutti merged pull request #954: Jolokia and Prometheus traits fixes
astefanutti merged pull request #954: Jolokia and Prometheus traits fixes URL: https://github.com/apache/camel-k/pull/954 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
[GitHub] [camel-k] astefanutti merged pull request #970: fix: Kaniko publisher step fails with IncrementalPackager
astefanutti merged pull request #970: fix: Kaniko publisher step fails with IncrementalPackager URL: https://github.com/apache/camel-k/pull/970 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
[GitHub] [camel-k] astefanutti closed issue #960: Kaniko step fails on Minikube with IncrementalPackager
astefanutti closed issue #960: Kaniko step fails on Minikube with IncrementalPackager URL: https://github.com/apache/camel-k/issues/960 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
[GitHub] [camel-k] astefanutti closed issue #965: Build completes OK but integration shows ERROR
astefanutti closed issue #965: Build completes OK but integration shows ERROR URL: https://github.com/apache/camel-k/issues/965 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
[GitHub] [camel-k] astefanutti opened a new pull request #975: fix: Kaniko cache default spec is not updated when calling the status endpoint
astefanutti opened a new pull request #975: fix: Kaniko cache default spec is not updated when calling the status endpoint URL: https://github.com/apache/camel-k/pull/975 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
[GitHub] [camel-k] jamesnetherton opened a new pull request #974: fix: Add nil check for dev mode intergration phase watch result
jamesnetherton opened a new pull request #974: fix: Add nil check for dev mode intergration phase watch result URL: https://github.com/apache/camel-k/pull/974 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