forked from apache/camel-k-runtime
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6636847
commit d3fc05a
Showing
56 changed files
with
1,473 additions
and
186 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,6 @@ | |
# | ||
language: java | ||
|
||
script: ./mvnw test | ||
script: | ||
- ./mvnw test -Dcamel2 | ||
- ./mvnw test -Dcamel3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
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. | ||
--> | ||
<project xmlns="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"> | ||
<parent> | ||
<groupId>org.apache.camel.k</groupId> | ||
<artifactId>camel-k-runtime-parent</artifactId> | ||
<version>0.3.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>camel-k-adapter-camel-2</artifactId> | ||
|
||
<dependencies> | ||
|
||
<!-- ****************************** --> | ||
<!-- --> | ||
<!-- RUNTIME --> | ||
<!-- --> | ||
<!-- ****************************** --> | ||
|
||
<dependency> | ||
<groupId>org.apache.camel</groupId> | ||
<artifactId>camel-core</artifactId> | ||
<version>${camel2.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<!-- ****************************** --> | ||
<!-- --> | ||
<!-- TESTS --> | ||
<!-- --> | ||
<!-- ****************************** --> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<version>${junit-jupiter.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<version>${junit-jupiter.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<version>${assertj.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
25 changes: 25 additions & 0 deletions
25
camel-k-adapter-camel-2/src/main/java/org/apache/camel/k/adapter/DefaultAsyncProducer.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,25 @@ | ||
/** | ||
* 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.k.adapter; | ||
|
||
import org.apache.camel.Endpoint; | ||
|
||
public abstract class DefaultAsyncProducer extends org.apache.camel.impl.DefaultAsyncProducer { | ||
public DefaultAsyncProducer(Endpoint endpoint) { | ||
super(endpoint); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
camel-k-adapter-camel-2/src/main/java/org/apache/camel/k/adapter/DefaultComponent.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,28 @@ | ||
/** | ||
* 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.k.adapter; | ||
|
||
import org.apache.camel.CamelContext; | ||
|
||
public abstract class DefaultComponent extends org.apache.camel.impl.DefaultComponent { | ||
public DefaultComponent() { | ||
} | ||
|
||
public DefaultComponent(CamelContext context) { | ||
super(context); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
camel-k-adapter-camel-2/src/main/java/org/apache/camel/k/adapter/DefaultEndpoint.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,27 @@ | ||
/** | ||
* 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.k.adapter; | ||
|
||
import org.apache.camel.Component; | ||
|
||
public abstract class DefaultEndpoint extends org.apache.camel.impl.DefaultEndpoint { | ||
public DefaultEndpoint() { | ||
} | ||
public DefaultEndpoint(String endpointUri, Component component) { | ||
super(endpointUri, component); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
camel-k-adapter-camel-2/src/main/java/org/apache/camel/k/adapter/Exchanges.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,30 @@ | ||
/** | ||
* 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.k.adapter; | ||
|
||
import org.apache.camel.CamelContext; | ||
import org.apache.camel.Exchange; | ||
import org.apache.camel.impl.DefaultExchange; | ||
|
||
public final class Exchanges { | ||
protected Exchanges() { | ||
} | ||
|
||
public final static Exchange newDefaultExchange(CamelContext context) { | ||
return new DefaultExchange(context); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
camel-k-adapter-camel-2/src/main/java/org/apache/camel/k/adapter/Introspection.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,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.k.adapter; | ||
|
||
import java.util.Map; | ||
|
||
import org.apache.camel.TypeConverter; | ||
import org.apache.camel.util.IntrospectionSupport; | ||
|
||
public final class Introspection { | ||
private Introspection() { | ||
} | ||
|
||
public static boolean setProperties(TypeConverter typeConverter, Object target, Map<String, Object> properties) throws Exception { | ||
return IntrospectionSupport.setProperties(typeConverter, target, properties); | ||
} | ||
|
||
public static boolean setProperty(Object target, String name, Object value) throws Exception { | ||
return IntrospectionSupport.setProperty(target, name, value, false); | ||
} | ||
|
||
public static boolean setProperty(Object target, String name, Object value, boolean builderPattern) throws Exception { | ||
return IntrospectionSupport.setProperty(target, name, value, builderPattern); | ||
} | ||
|
||
public static boolean getProperties(Object target, Map<String, Object> properties, String optionPrefix, boolean includeNull) { | ||
return IntrospectionSupport.getProperties(target, properties, optionPrefix, includeNull); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
camel-k-adapter-camel-2/src/main/java/org/apache/camel/k/adapter/Processors.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,30 @@ | ||
/** | ||
* 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.k.adapter; | ||
|
||
import org.apache.camel.AsyncProcessor; | ||
import org.apache.camel.Processor; | ||
import org.apache.camel.util.AsyncProcessorConverterHelper; | ||
|
||
public final class Processors { | ||
private Processors() { | ||
} | ||
|
||
public static AsyncProcessor convertToAsync(Processor processor) { | ||
return AsyncProcessorConverterHelper.convert(processor); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
camel-k-adapter-camel-2/src/main/java/org/apache/camel/k/adapter/Resources.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,32 @@ | ||
/** | ||
* 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.k.adapter; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
||
import org.apache.camel.CamelContext; | ||
import org.apache.camel.util.ResourceHelper; | ||
|
||
public final class Resources { | ||
private Resources() { | ||
} | ||
|
||
public static InputStream resolveResourceAsInputStream(CamelContext camelContext, String uri) throws IOException { | ||
return ResourceHelper.resolveMandatoryResourceAsInputStream(camelContext, uri); | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
camel-k-adapter-camel-2/src/main/java/org/apache/camel/k/adapter/Services.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,47 @@ | ||
/** | ||
* 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.k.adapter; | ||
|
||
import java.util.Arrays; | ||
|
||
import org.apache.camel.util.ServiceHelper; | ||
|
||
public final class Services { | ||
private Services() { | ||
|
||
} | ||
|
||
public static void start(Object... services) throws Exception { | ||
ServiceHelper.startServices(services); | ||
} | ||
|
||
public static void stop(Object... services) throws Exception { | ||
ServiceHelper.stopServices(services); | ||
} | ||
|
||
public static void suspend(Object... services) throws Exception { | ||
ServiceHelper.suspendServices(Arrays.asList(services)); | ||
} | ||
|
||
public static void resume(Object... services) throws Exception { | ||
ServiceHelper.resumeService(Arrays.asList(services)); | ||
} | ||
|
||
public static void shutdown(Object... services) throws Exception { | ||
ServiceHelper.stopAndShutdownServices(Arrays.asList(services)); | ||
} | ||
} |
Oops, something went wrong.