Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure the PlatformHttpComponent is registered before the routes are …
…started #218
- Loading branch information
1 parent
8100e8c
commit 4d619d1
Showing
20 changed files
with
358 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...ent/src/main/java/org/apache/camel/quarkus/core/deployment/CamelRuntimeBeanBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* 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.core.deployment; | ||
|
||
import java.util.Objects; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
import io.quarkus.runtime.RuntimeValue; | ||
|
||
/** | ||
* A {@link MultiBuildItem} holding beans to add to {@link org.apache.camel.spi.Registry} during | ||
* runtime initialization phase. Note that the field type should refer to the most specialized | ||
* class to avoid the issue described in https://issues.apache.org/jira/browse/CAMEL-13948. | ||
*/ | ||
public final class CamelRuntimeBeanBuildItem extends MultiBuildItem { | ||
private final String name; | ||
private final Class<?> type; | ||
private final RuntimeValue<?> value; | ||
|
||
public CamelRuntimeBeanBuildItem(String name, Class<?> type, RuntimeValue<?> value) { | ||
this.name = Objects.requireNonNull(name); | ||
this.type = Objects.requireNonNull(type); | ||
this.value = Objects.requireNonNull(value); | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public Class<?> getType() { | ||
return type; | ||
} | ||
|
||
public RuntimeValue<?> getValue() { | ||
return value; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...src/main/java/org/apache/camel/quarkus/core/deployment/CamelRuntimeRegistryBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* 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.core.deployment; | ||
|
||
import io.quarkus.builder.item.SimpleBuildItem; | ||
import io.quarkus.runtime.RuntimeValue; | ||
import org.apache.camel.spi.Registry; | ||
|
||
/** | ||
* Holds the {@link Registry} {@link RuntimeValue}. | ||
*/ | ||
public final class CamelRuntimeRegistryBuildItem extends SimpleBuildItem { | ||
private final RuntimeValue<Registry> value; | ||
|
||
public CamelRuntimeRegistryBuildItem(RuntimeValue<Registry> value) { | ||
this.value = value; | ||
} | ||
|
||
public RuntimeValue<Registry> getRegistry() { | ||
return value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
.../apache/camel/quarkus/component/platform/http/deployment/PlatformHttpEngineBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* 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.builder.item.SimpleBuildItem; | ||
import io.quarkus.runtime.RuntimeValue; | ||
import org.apache.camel.component.platform.http.spi.PlatformHttpEngine; | ||
|
||
/** | ||
* Holds the {@link PlatformHttpEngine} {@link RuntimeValue}. | ||
*/ | ||
public final class PlatformHttpEngineBuildItem extends SimpleBuildItem { | ||
private final RuntimeValue<PlatformHttpEngine> instance; | ||
|
||
public PlatformHttpEngineBuildItem(RuntimeValue<PlatformHttpEngine> instance) { | ||
this.instance = instance; | ||
} | ||
|
||
public RuntimeValue<PlatformHttpEngine> getInstance() { | ||
return instance; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.