index int64 0 0 | repo_id stringlengths 9 205 | file_path stringlengths 31 246 | content stringlengths 1 12.2M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/EndpointCreationTest.java | package org.apache.camel.itest.jmh;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.ServiceStatus;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/**
* This test computes the accumulated time of all the operations required to create a given number of routes (500, in this test).
*/
public class EndpointCreationTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
@State(Scope.Thread)
public static class BenchmarkState {
CamelContext context;
ProducerTemplate producerTemplate;
String[] routes = new String[500];
@Setup(Level.Iteration)
public void initialize() throws Exception {
context = new DefaultCamelContext();
context.start();
producerTemplate = context.createProducerTemplate();
for (int i = 0; i < routes.length; i++) {
routes[i] = "controlbus:route?routeId=route" + i + "&action=status&loggingLevel=off";
}
}
}
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void testCreation(BenchmarkState state, Blackhole bh) {
for (String route : state.routes) {
Object reply = state.producerTemplate.requestBody(route, null,
ServiceStatus.class);
bh.consume(reply);
}
}
}
| 8,400 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/DisruptorMultipleTypesProducerTest.java | /*
* 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.itest.jmh;
import java.io.File;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/**
* This tests the disruptor component when running with a small threads and exchanging data with different types. This is
* suitable for most cases when a large machine with too many cores is not available (as it limits to a maximum of 4 consumers
* + 4 producers).
*/
public class DisruptorMultipleTypesProducerTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Benchmark)
public static class BenchmarkState {
@Param({"1", "2", "4"})
int consumers;
CamelContext context;
ProducerTemplate producerTemplate;
Endpoint endpoint;
File sampleFile = new File("some-file");
Integer someInt = Integer.valueOf(1);
Long someLong = Long.valueOf(2);
@Setup(Level.Trial)
public void initialize() throws Exception {
context = new DefaultCamelContext();
producerTemplate = context.createProducerTemplate();
endpoint = context.getEndpoint("disruptor:test");
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
fromF("disruptor:test?concurrentConsumers=%s", consumers).to("log:?level=OFF");
}
});
context.start();
}
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void sendMultipleTypes_1(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
state.producerTemplate.sendBody(state.endpoint, state.someInt);
state.producerTemplate.sendBody(state.endpoint, state.someLong);
state.producerTemplate.sendBody(state.endpoint, state.sampleFile);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(2)
public void sendBlockingWithMultipleTypes_2(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
state.producerTemplate.sendBody(state.endpoint, state.someInt);
state.producerTemplate.sendBody(state.endpoint, state.someLong);
state.producerTemplate.sendBody(state.endpoint, state.sampleFile);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(4)
public void sendBlockingWithMultipleTypes_4(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
state.producerTemplate.sendBody(state.endpoint, state.someInt);
state.producerTemplate.sendBody(state.endpoint, state.someLong);
state.producerTemplate.sendBody(state.endpoint, state.sampleFile);
}
}
| 8,401 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/FastTypeConverterTest.java | /*
* 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.itest.jmh;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import org.apache.camel.CamelContext;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
/**
* Tests the fast {@link org.apache.camel.TypeConverter} which uses the code generated loader
*/
public class FastTypeConverterTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.mode(Mode.SampleTime)
.timeUnit(TimeUnit.MILLISECONDS)
.warmupTime(TimeValue.seconds(1))
.warmupIterations(2)
.measurementTime(TimeValue.seconds(5))
.measurementIterations(3)
.threads(1)
.forks(1)
.shouldFailOnError(true)
.shouldDoGC(true)
.measurementBatchSize(100000)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Thread)
public static class BenchmarkCamelContextState {
ByteBuf buffer;
byte[] bytes = "Hello World this is some text".getBytes();
CamelContext camel;
@Setup(Level.Trial)
public void initialize() throws IOException {
camel = new DefaultCamelContext();
try {
// dont scan for additional type converters
camel.setLoadTypeConverters(false);
camel.start();
} catch (Exception e) {
// ignore
}
buffer = ByteBufAllocator.DEFAULT.buffer(bytes.length);
buffer.writeBytes(bytes);
}
@TearDown(Level.Trial)
public void close() {
try {
camel.stop();
} catch (Exception e) {
// ignore
}
}
}
@Benchmark
public void typeConvertByteBufToArray(BenchmarkCamelContextState state, Blackhole bh) {
byte[] arr = state.camel.getTypeConverter().convertTo(byte[].class, state.buffer);
bh.consume(arr);
}
}
| 8,402 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/CaseInsensitiveMapTest.java | /*
* 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.itest.jmh;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import org.apache.camel.util.CaseInsensitiveMap;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
/**
* Tests {@link CaseInsensitiveMap}
*/
public class CaseInsensitiveMapTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.mode(Mode.SampleTime)
.timeUnit(TimeUnit.MILLISECONDS)
.warmupTime(TimeValue.seconds(1))
.warmupIterations(2)
.measurementTime(TimeValue.seconds(5))
.measurementIterations(5)
.threads(1)
.forks(1)
.shouldFailOnError(true)
.shouldDoGC(true)
.measurementBatchSize(1000000)
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Thread)
public static class MapsBenchmarkState {
CaseInsensitiveMap camelMap;
com.cedarsoftware.util.CaseInsensitiveMap cedarsoftMap;
HashMap hashMap;
@Setup(Level.Trial)
public void initialize() {
camelMap = new CaseInsensitiveMap();
cedarsoftMap = new com.cedarsoftware.util.CaseInsensitiveMap();
hashMap = new HashMap();
}
}
@State(Scope.Benchmark)
public static class MapsSourceDataBenchmarkState {
Map<String, Object> map1 = generateRandomMap(10);
Map<String, Object> map2 = generateRandomMap(10);
private Map<String, Object> generateRandomMap(int size) {
return IntStream.range(0, size)
.boxed()
.collect(Collectors.toMap(i -> randomAlphabetic(10), i -> randomAlphabetic(10)));
}
}
@Benchmark
public void camelMapSimpleCase(MapsBenchmarkState state, Blackhole bh) {
Map map = state.camelMap;
map.put("foo", "Hello World");
Object o1 = map.get("foo");
bh.consume(o1);
Object o2 = map.get("FOO");
bh.consume(o2);
map.put("BAR", "Bye World");
Object o3 = map.get("bar");
bh.consume(o3);
Object o4 = map.get("BAR");
bh.consume(o4);
}
@Benchmark
public void cedarsoftMapSimpleCase(MapsBenchmarkState state, Blackhole bh) {
Map map = state.cedarsoftMap;
map.put("foo", "Hello World");
Object o1 = map.get("foo");
bh.consume(o1);
Object o2 = map.get("FOO");
bh.consume(o2);
map.put("BAR", "Bye World");
Object o3 = map.get("bar");
bh.consume(o3);
Object o4 = map.get("BAR");
bh.consume(o4);
}
@Benchmark
public void hashMapSimpleCase(MapsBenchmarkState state, Blackhole bh) {
Map map = state.hashMap;
map.put("foo", "Hello World");
Object o1 = map.get("foo");
bh.consume(o1);
Object o2 = map.get("FOO");
bh.consume(o2);
map.put("BAR", "Bye World");
Object o3 = map.get("bar");
bh.consume(o3);
Object o4 = map.get("BAR");
bh.consume(o4);
}
@Benchmark
public void camelMapComplexCase(
MapsBenchmarkState mapsBenchmarkState, MapsSourceDataBenchmarkState sourceDataState, Blackhole blackhole) {
// step 1 - initialize map with existing elements
Map map = mapsBenchmarkState.camelMap;
// step 2 - add elements one by one
sourceDataState.map2.entrySet().forEach(entry -> blackhole.consume(map.put(entry.getKey(), entry.getValue())));
// step 3 - remove elements one by one
sourceDataState.map1.keySet().forEach(key -> blackhole.consume(map.get(key)));
// step 4 - remove elements one by one
sourceDataState.map1.keySet().forEach(key -> blackhole.consume(map.remove(key)));
// step 5 - add couple of element at once
map.putAll(sourceDataState.map1);
blackhole.consume(map);
}
@Benchmark
public void cedarsoftMapComplexCase(
MapsBenchmarkState mapsBenchmarkState, MapsSourceDataBenchmarkState sourceDataState, Blackhole blackhole) {
// step 1 - initialize map with existing elements
Map map = mapsBenchmarkState.cedarsoftMap;
// step 2 - add elements one by one
sourceDataState.map2.entrySet().forEach(entry -> blackhole.consume(map.put(entry.getKey(), entry.getValue())));
// step 3 - remove elements one by one
sourceDataState.map1.keySet().forEach(key -> blackhole.consume(map.get(key)));
// step 4 - remove elements one by one
sourceDataState.map1.keySet().forEach(key -> blackhole.consume(map.remove(key)));
// step 5 - add couple of element at once
map.putAll(sourceDataState.map1);
blackhole.consume(map);
}
@Benchmark
public void hashMapComplexCase(
MapsBenchmarkState mapsBenchmarkState, MapsSourceDataBenchmarkState sourceDataState, Blackhole blackhole) {
// step 1 - initialize map with existing elements
Map map = mapsBenchmarkState.hashMap;
// step 2 - add elements one by one
sourceDataState.map2.entrySet().forEach(entry -> blackhole.consume(map.put(entry.getKey(), entry.getValue())));
// step 3 - remove elements one by one
sourceDataState.map1.keySet().forEach(key -> blackhole.consume(map.get(key)));
// step 4 - remove elements one by one
sourceDataState.map1.keySet().forEach(key -> blackhole.consume(map.remove(key)));
// step 5 - add couple of element at once
map.putAll(sourceDataState.map1);
blackhole.consume(map);
}
}
| 8,403 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/LogEndpointTest.java | /*
* 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.itest.jmh;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
/**
* Tests fast property binding on endpoints
*/
public class LogEndpointTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.mode(Mode.All)
.timeUnit(TimeUnit.MICROSECONDS)
.warmupTime(TimeValue.seconds(1))
.warmupIterations(2)
.measurementTime(TimeValue.seconds(1))
.measurementIterations(2)
.threads(2)
.forks(1)
.shouldFailOnError(true)
.shouldDoGC(true)
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Thread)
public static class BenchmarkState {
CamelContext camel;
AtomicInteger counter;
@Setup(Level.Trial)
public void initialize() {
camel = new DefaultCamelContext();
camel.getGlobalOptions().put(Exchange.MAXIMUM_ENDPOINT_CACHE_SIZE, "1");
counter = new AtomicInteger();
}
@TearDown(Level.Trial)
public void close() {
try {
camel.stop();
} catch (Exception e) {
// ignore
}
}
}
@Benchmark
@Measurement(batchSize = 1000)
public void logEndpoint(BenchmarkState state, Blackhole bh) {
// use the legacy binding which uses reflection
// Endpoint out = state.camel.getEndpoint("log:foo?basicPropertyBinding=true&showAll=true&groupSize=" + state.counter.incrementAndGet());
Endpoint out = state.camel.getEndpoint("log:foo?showAll=true&groupSize=" + state.counter.incrementAndGet());
bh.consume(out);
}
}
| 8,404 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/BlockingProducerToSedaTest.java | /*
* 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.itest.jmh;
import java.io.File;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
public class BlockingProducerToSedaTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Benchmark)
public static class BenchmarkState {
@Param({"1", "2", "4", "8", "16", "32"})
int consumers;
CamelContext context;
ProducerTemplate producerTemplate;
Endpoint endpoint;
File sampleFile = new File("some-file");
Integer someInt = Integer.valueOf(1);
Long someLong = Long.valueOf(2);
@Setup(Level.Trial)
public void initialize() throws Exception {
context = new DefaultCamelContext();
producerTemplate = context.createProducerTemplate();
endpoint = context.getEndpoint("seda:test?blockWhenFull=true&offerTimeout=1000");
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
onException(IllegalStateException.class)
.process(e -> System.out.println("The SEDA queue is likely full and the system may be unable to catch to the load. Fix the test parameters"));
fromF("seda:test?concurrentConsumers=%s", consumers).to("log:?level=OFF");
}
});
context.start();
}
}
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void sendBlocking(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
}
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(6)
public void sendBlocking_6(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
}
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void sendBlockingWithMultipleTypes(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
state.producerTemplate.sendBody(state.endpoint, state.someInt);
state.producerTemplate.sendBody(state.endpoint, state.someLong);
state.producerTemplate.sendBody(state.endpoint, state.sampleFile);
}
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(6)
public void sendBlockingWithMultipleTypes_6(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
state.producerTemplate.sendBody(state.endpoint, state.someInt);
state.producerTemplate.sendBody(state.endpoint, state.someLong);
state.producerTemplate.sendBody(state.endpoint, state.sampleFile);
}
}
| 8,405 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/CSimpleOperatorTest.java | /*
* 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.itest.jmh;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.spi.Language;
import org.apache.camel.support.DefaultExchange;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Tests a Compiled Compile Simple operator expression
*/
public class CSimpleOperatorTest {
private static final Logger LOG = LoggerFactory.getLogger(CSimpleOperatorTest.class);
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.mode(Mode.All)
.timeUnit(TimeUnit.MICROSECONDS)
.warmupTime(TimeValue.seconds(1))
.warmupIterations(2)
.measurementTime(TimeValue.seconds(10))
.measurementIterations(2)
.threads(2)
.forks(1)
.shouldFailOnError(true)
.shouldDoGC(true)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Thread)
public static class BenchmarkState {
CamelContext camel;
String expression = "${header.gold} == 123";
String expression2 = "${header.gold} > 123";
String expression3 = "${header.gold} < 123";
Exchange exchange;
Language csimple;
@Setup(Level.Trial)
public void initialize() {
camel = new DefaultCamelContext();
try {
camel.start();
exchange = new DefaultExchange(camel);
exchange.getIn().setBody("World");
exchange.getIn().setHeader("gold", "123");
csimple = camel.resolveLanguage("csimple");
} catch (Exception e) {
// ignore
}
}
@TearDown(Level.Trial)
public void close() {
try {
LOG.info("" + camel.getTypeConverterRegistry().getStatistics());
camel.stop();
} catch (Exception e) {
// ignore
}
}
}
@Benchmark
@Measurement(batchSize = 1000)
public void csimplePredicate(BenchmarkState state, Blackhole bh) {
boolean out = state.csimple.createPredicate(state.expression).matches(state.exchange);
if (!out) {
throw new IllegalArgumentException("Evaluation failed");
}
bh.consume(out);
boolean out2 = state.csimple.createPredicate(state.expression2).matches(state.exchange);
if (out2) {
throw new IllegalArgumentException("Evaluation failed");
}
bh.consume(out2);
boolean out3 = state.csimple.createPredicate(state.expression3).matches(state.exchange);
if (out3) {
throw new IllegalArgumentException("Evaluation failed");
}
bh.consume(out3);
}
}
| 8,406 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/LoadTypeConvertersTest.java | /*
* 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.itest.jmh;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
/**
* Tests loading type converters from classpath scanning.
*/
public class LoadTypeConvertersTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.mode(Mode.All)
.timeUnit(TimeUnit.MICROSECONDS)
.warmupTime(TimeValue.seconds(1))
.warmupIterations(2)
.measurementTime(TimeValue.seconds(1))
.measurementIterations(2)
.threads(2)
.forks(1)
.shouldFailOnError(true)
.shouldDoGC(true)
.build();
new Runner(opt).run();
}
/**
* Setup a fresh CamelContext per invocation
*/
@State(Scope.Thread)
public static class BenchmarkState {
CamelContext camel;
@Setup(Level.Invocation)
public void initialize() {
camel = new DefaultCamelContext();
}
@TearDown(Level.Invocation)
public void close() {
try {
camel.stop();
} catch (Exception e) {
// ignore
}
}
}
@Benchmark
@Measurement(batchSize = 1000)
public void load(BenchmarkState state, Blackhole bh) {
int size = 0;
try {
state.camel.start();
size = state.camel.getTypeConverterRegistry().size();
bh.consume(size);
} catch (Exception e) {
// ignore
}
if (size < 200) {
throw new IllegalArgumentException("Should have 200+ type converters loaded");
}
}
@Benchmark
@Measurement(batchSize = 1000)
public void notLoad(BenchmarkState state, Blackhole bh) {
int size = 0;
try {
state.camel.setLoadTypeConverters(false);
state.camel.start();
size = state.camel.getTypeConverterRegistry().size();
bh.consume(size);
} catch (Exception e) {
// ignore
}
if (size > 200) {
throw new IllegalArgumentException("Should not load additional type converters from classpath");
}
}
}
| 8,407 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/URISupportTest.java | /*
* 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.itest.jmh;
import java.io.UnsupportedEncodingException;
import java.net.URISyntaxException;
import java.util.concurrent.TimeUnit;
import org.apache.camel.util.URISupport;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Warmup;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
@State(Scope.Thread)
public class URISupportTest {
private String simpleQueryPart = "?level=INFO&logMask=false&exchangeFormatter=#myFormatter";
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// We may need to keep these here: we want to try to prevent constant-folding from kicking in!
private String logUri = "log:foo?level=INFO&logMask=false&exchangeFormatter=#myFormatter";
private String fastUriWithRaw = "xmpp://camel-user@localhost:123/test-user@localhost?password=RAW(++?w0rd)&serviceName=some chat";
private String queryWithRawType1 = "?level=INFO&logMask=false&exchangeFormatter=#myFormatter&password=RAW(++?w0rd)";
private String queryWithRawType2 = "?level=INFO&logMask=false&exchangeFormatter=#myFormatter&password=RAW{++?w0rd}";
private String queryWithPercent = "?level=INFO&logMask=false&exchangeFormatter=#myFormatter&keyWithPercent=%valueWhatever";
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Warmup(iterations = 10, batchSize = 5000)
@Measurement(iterations = 20, batchSize = 50000)
@BenchmarkMode(Mode.SingleShotTime)
@Benchmark
public void normalizeFastUri(Blackhole bh) throws UnsupportedEncodingException, URISyntaxException {
bh.consume(URISupport.normalizeUri(logUri));
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Warmup(iterations = 10, batchSize = 5000)
@Measurement(iterations = 20, batchSize = 50000)
@BenchmarkMode(Mode.SingleShotTime)
@Benchmark
public void normalizeFastUriWithRAW(Blackhole bh) throws UnsupportedEncodingException, URISyntaxException {
bh.consume(URISupport.normalizeUri(fastUriWithRaw));
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Warmup(iterations = 10, batchSize = 5000)
@Measurement(iterations = 20, batchSize = 50000)
@BenchmarkMode(Mode.SingleShotTime)
@Benchmark
public void parseQuery(Blackhole bh) throws URISyntaxException {
bh.consume(URISupport.parseQuery(simpleQueryPart));
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Warmup(iterations = 10, batchSize = 5000)
@Measurement(iterations = 20, batchSize = 50000)
@BenchmarkMode(Mode.SingleShotTime)
@Benchmark
public void parseQueryWithRAW1(Blackhole bh) throws URISyntaxException {
bh.consume(URISupport.parseQuery(queryWithRawType1));
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Warmup(iterations = 10, batchSize = 5000)
@Measurement(iterations = 20, batchSize = 50000)
@BenchmarkMode(Mode.SingleShotTime)
@Benchmark
public void parseQueryWithRAW2(Blackhole bh) throws URISyntaxException {
bh.consume(URISupport.parseQuery(queryWithRawType2));
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Warmup(iterations = 10, batchSize = 5000)
@Measurement(iterations = 20, batchSize = 50000)
@BenchmarkMode(Mode.SingleShotTime)
@Benchmark
public void parseQueryWithPercent(Blackhole bh) throws URISyntaxException {
bh.consume(URISupport.parseQuery(queryWithPercent));
}
}
| 8,408 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/StringHelperTest.java | package org.apache.camel.itest.jmh;
import java.util.concurrent.TimeUnit;
import org.apache.camel.util.StringHelper;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
@State(Scope.Thread)
public class StringHelperTest {
private String stringWithQuotes = "\"The quick brown fox jumps over the lazy dog\"";
private String stringToEncode = "<The quick brown fox jumps over the lazy dog>";
private String stringToCapitalize = "property";
private String dashStringToCapitalizePositive = "property-name";
private String dashStringToCapitalizeNegative = "property";
private String camelCaseToDashStringToCapitalize = "propertyName";
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testFillChar(Blackhole bh) {
bh.consume(StringHelper.fillChars('t', 32));
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testFillCharNative(Blackhole bh) {
bh.consume(Character.toString('t').repeat(32));
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testRemoveQuotes(Blackhole bh) {
bh.consume(StringHelper.removeQuotes(stringWithQuotes));
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testXmlEncode(Blackhole bh) {
bh.consume(StringHelper.xmlEncode(stringToEncode));
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testRemoveLeadingAndEndingQuotes(Blackhole bh) {
bh.consume(StringHelper.removeLeadingAndEndingQuotes(stringWithQuotes));
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testIsClassNameNegative(Blackhole bh) {
bh.consume(StringHelper.isClassName(stringWithQuotes));
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testIsClassNamePositive(Blackhole bh) {
bh.consume(StringHelper.isClassName(bh.getClass().getName()));
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testCapitalize(Blackhole bh) {
bh.consume(StringHelper.capitalize(stringWithQuotes));
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testDashToCamelCasePositive(Blackhole bh) {
bh.consume(StringHelper.capitalize(dashStringToCapitalizePositive));
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testDashToCamelCaseNegative(Blackhole bh) {
bh.consume(StringHelper.capitalize(dashStringToCapitalizeNegative));
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testDashToCamelCasePositiveToDash(Blackhole bh) {
bh.consume(StringHelper.capitalize(dashStringToCapitalizePositive, true));
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testDashToCamelCaseNegative1(Blackhole bh) {
bh.consume(StringHelper.capitalize(dashStringToCapitalizeNegative, true));
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testCamelCaseToDashPositive(Blackhole bh) {
bh.consume(StringHelper.camelCaseToDash(camelCaseToDashStringToCapitalize));
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void testCamelCaseToDashNegative(Blackhole bh) {
bh.consume(StringHelper.camelCaseToDash(dashStringToCapitalizeNegative));
}
}
| 8,409 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/SimpleMockTest.java | /*
* 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.itest.jmh;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
/**
* Tests a simple Camel route
*/
public class SimpleMockTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.mode(Mode.All)
.timeUnit(TimeUnit.MICROSECONDS)
.warmupTime(TimeValue.seconds(1))
.warmupIterations(2)
.measurementTime(TimeValue.seconds(1))
.measurementIterations(2)
.threads(2)
.forks(1)
.shouldFailOnError(true)
.shouldDoGC(true)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Thread)
public static class BenchmarkState {
CamelContext camel;
ProducerTemplate producer;
@Setup(Level.Trial)
public void initialize() {
camel = new DefaultCamelContext();
try {
camel.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:start").to("log:foo").to("log:bar").to("mock:result?retainFirst=0");
}
});
camel.start();
producer = camel.createProducerTemplate();
} catch (Exception e) {
// ignore
}
}
@TearDown(Level.Trial)
public void close() {
try {
producer.stop();
camel.stop();
} catch (Exception e) {
// ignore
}
}
}
@Benchmark
@Measurement(batchSize = 1000)
public void simpleMockTest(BenchmarkState state, Blackhole bh) {
ProducerTemplate template = state.producer;
template.sendBody("direct:start", "Hello World");
}
}
| 8,410 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/CSimpleScript1.java | /*
* 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.itest.jmh;
import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.camel.language.csimple.CSimpleSupport;
import static org.apache.camel.language.csimple.CSimpleHelper.headerAs;
public class CSimpleScript1 extends CSimpleSupport {
public CSimpleScript1() {
}
@Override
public String getText() {
return "${header.gold} == 123";
}
@Override
public Object evaluate(CamelContext context, Exchange exchange, Message message, Object body)
throws Exception {
return headerAs(message, "gold", int.class) == 123;
}
@Override
public boolean isPredicate() {
return true;
}
}
| 8,411 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/EndpointResolveTest.java | package org.apache.camel.itest.jmh;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.ServiceStatus;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/**
* This test computes the accumulated time of all the operations required to resolve the same route over and over.
*/
public class EndpointResolveTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
@State(Scope.Benchmark)
public static class BenchmarkState {
CamelContext context;
ProducerTemplate producerTemplate;
@Setup(Level.Trial)
public void initialize() throws Exception {
context = new DefaultCamelContext();
context.start();
producerTemplate = context.createProducerTemplate();
}
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void testActionStatus_1(BenchmarkState state, Blackhole bh) {
Object reply = state.producerTemplate.requestBody("controlbus:route?routeId=route1&action=status&loggingLevel=off", null,
ServiceStatus.class);
bh.consume(reply);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(2)
public void testActionStatus_2(BenchmarkState state, Blackhole bh) {
Object reply = state.producerTemplate.requestBody("controlbus:route?routeId=route1&action=status&loggingLevel=off", null,
ServiceStatus.class);
bh.consume(reply);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(4)
public void testActionStatus_4(BenchmarkState state, Blackhole bh) {
Object reply = state.producerTemplate.requestBody("controlbus:route?routeId=route1&action=status&loggingLevel=off", null,
ServiceStatus.class);
bh.consume(reply);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(8)
public void testActionStatus_8(BenchmarkState state, Blackhole bh) {
Object reply = state.producerTemplate.requestBody("controlbus:route?routeId=route1&action=status&loggingLevel=off", null,
ServiceStatus.class);
bh.consume(reply);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(16)
public void testActionStatus_16(BenchmarkState state, Blackhole bh) {
Object reply = state.producerTemplate.requestBody("controlbus:route?routeId=route1&action=status&loggingLevel=off", null,
ServiceStatus.class);
bh.consume(reply);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(32)
public void testActionStatus_32(BenchmarkState state, Blackhole bh) {
Object reply = state.producerTemplate.requestBody("controlbus:route?routeId=route1&action=status&loggingLevel=off", null,
ServiceStatus.class);
bh.consume(reply);
}
}
| 8,412 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/BlockingProducerWithArrayBlockingQueueToSedaTest.java | /*
* 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.itest.jmh;
import java.io.File;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.seda.ArrayBlockingQueueFactory;
import org.apache.camel.component.seda.SedaComponent;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
public class BlockingProducerWithArrayBlockingQueueToSedaTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Benchmark)
public static class BenchmarkState {
CamelContext context;
ProducerTemplate producerTemplate;
Endpoint endpoint;
File sampleFile = new File("some-file");
Integer someInt = Integer.valueOf(1);
Long someLong = Long.valueOf(2);
@Setup(Level.Trial)
public void initialize() throws Exception {
context = new DefaultCamelContext();
producerTemplate = context.createProducerTemplate();
context.getComponent("seda", SedaComponent.class).setDefaultQueueFactory(new ArrayBlockingQueueFactory());
endpoint = context.getEndpoint("seda:test?blockWhenFull=true&offerTimeout=1000");
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
onException(IllegalStateException.class)
.process(e -> System.out.println("The SEDA queue is likely full and the system may be unable to catch to the load. Fix the test parameters"));
fromF("seda:test").to("log:?level=OFF");
}
});
context.start();
}
}
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void sendBlocking(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
}
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(6)
public void sendBlocking_6(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
}
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void sendBlockingWithMultipleTypes(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
state.producerTemplate.sendBody(state.endpoint, state.someInt);
state.producerTemplate.sendBody(state.endpoint, state.someLong);
state.producerTemplate.sendBody(state.endpoint, state.sampleFile);
}
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(6)
public void sendBlockingWithMultipleTypes_6(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
state.producerTemplate.sendBody(state.endpoint, state.someInt);
state.producerTemplate.sendBody(state.endpoint, state.someLong);
state.producerTemplate.sendBody(state.endpoint, state.sampleFile);
}
}
| 8,413 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/ContainsIgnoreCaseTest.java | /*
* 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.itest.jmh;
import java.util.concurrent.TimeUnit;
import org.apache.camel.util.StringHelper;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
/**
* Tests the {@link StringHelper}.
* <p/>
* Thanks to this SO answer: https://stackoverflow.com/questions/30485856/how-to-run-jmh-from-inside-junit-tests
*/
public class ContainsIgnoreCaseTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.mode(Mode.All)
.timeUnit(TimeUnit.MICROSECONDS)
.warmupTime(TimeValue.seconds(1))
.warmupIterations(2)
.measurementTime(TimeValue.seconds(1))
.measurementIterations(2)
.threads(2)
.forks(1)
.shouldFailOnError(true)
.shouldDoGC(true)
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Thread)
public static class BenchmarkState {
@Setup(Level.Trial)
public void initialize() {
}
}
@Benchmark
@Measurement(batchSize = 1000000)
public void benchmark(BenchmarkState state, Blackhole bh) {
bh.consume(StringHelper.containsIgnoreCase("abc", "A"));
bh.consume(StringHelper.containsIgnoreCase("abc", "aB"));
bh.consume(StringHelper.containsIgnoreCase("abc", "aBc"));
bh.consume(StringHelper.containsIgnoreCase("abc", "ad"));
bh.consume(StringHelper.containsIgnoreCase("abc", "abD"));
bh.consume(StringHelper.containsIgnoreCase("abc", "ABD"));
}
}
| 8,414 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/DisruptorProducerTest.java | /*
* 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.itest.jmh;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/**
* This tests the disruptor component when running with a small threads. This is suitable for most cases when
* a large machine with too many cores is not available (as it limits to a maximum of 4 consumers + 4 producers).
*/
public class DisruptorProducerTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Benchmark)
public static class BenchmarkState {
@Param({"1", "2", "4"})
int consumers;
CamelContext context;
ProducerTemplate producerTemplate;
Endpoint endpoint;
@Setup(Level.Trial)
public void initialize() throws Exception {
context = new DefaultCamelContext();
producerTemplate = context.createProducerTemplate();
endpoint = context.getEndpoint("disruptor:test");
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
fromF("disruptor:test?concurrentConsumers=%s", consumers).to("log:?level=OFF");
}
});
context.start();
}
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void send_1(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(2)
public void send_2(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(4)
public void send_4(BenchmarkState state, Blackhole bh) {
state.producerTemplate.sendBody(state.endpoint, "test");
}
}
| 8,415 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/NormalizeUriTest.java | /*
* 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.itest.jmh;
import java.util.concurrent.TimeUnit;
import org.apache.camel.util.URISupport;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
/**
* Tests the {@link org.apache.camel.util.URISupport#normalizeUri(String)}.
* <p/>
* Thanks to this SO answer: https://stackoverflow.com/questions/30485856/how-to-run-jmh-from-inside-junit-tests
*/
public class NormalizeUriTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.mode(Mode.All)
.timeUnit(TimeUnit.MICROSECONDS)
.warmupTime(TimeValue.seconds(1))
.warmupIterations(2)
.measurementTime(TimeValue.seconds(1))
.measurementIterations(2)
.threads(2)
.forks(1)
.shouldFailOnError(true)
.shouldDoGC(false)
.measurementBatchSize(100000)
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Thread)
public static class BenchmarkState {
@Setup(Level.Trial)
public void initialize() {
}
}
@Benchmark
public void benchmarkMixed(ContainsIgnoreCaseTest.BenchmarkState state, Blackhole bh) throws Exception {
// fast
bh.consume(URISupport.normalizeUri("log:foo?level=INFO&logMask=false&exchangeFormatter=#myFormatter"));
// slow
bh.consume(URISupport.normalizeUri("http://www.google.com?q=S%C3%B8ren%20Hansen"));
// fast
bh.consume(URISupport.normalizeUri("file:target/inbox?recursive=true"));
// slow
bh.consume(URISupport.normalizeUri("http://www.google.com?q=S%C3%B8ren%20Hansen"));
// fast
bh.consume(URISupport.normalizeUri("seda:foo?concurrentConsumer=2"));
// slow
bh.consume(URISupport.normalizeUri("ftp://us%40r:t%25st@localhost:21000/tmp3/camel?foo=us@r"));
// fast
bh.consume(URISupport.normalizeUri("http:www.google.com?q=Camel"));
// slow
bh.consume(URISupport.normalizeUri("ftp://us@r:t%25st@localhost:21000/tmp3/camel?foo=us@r"));
}
@Benchmark
public void benchmarkFast(ContainsIgnoreCaseTest.BenchmarkState state, Blackhole bh) throws Exception {
bh.consume(URISupport.normalizeUri("log:foo"));
bh.consume(URISupport.normalizeUri("log:foo?level=INFO&logMask=false&exchangeFormatter=#myFormatter"));
bh.consume(URISupport.normalizeUri("file:target/inbox?recursive=true"));
bh.consume(URISupport.normalizeUri("smtp://localhost?password=secret&username=davsclaus"));
bh.consume(URISupport.normalizeUri("seda:foo?concurrentConsumer=2"));
bh.consume(URISupport.normalizeUri("irc:someserver/#camel?user=davsclaus"));
bh.consume(URISupport.normalizeUri("http:www.google.com?q=Camel"));
bh.consume(URISupport.normalizeUri("smtp://localhost?to=foo&to=bar&from=me&from=you"));
}
@Benchmark
public void benchmarkFastSorted(ContainsIgnoreCaseTest.BenchmarkState state, Blackhole bh) throws Exception {
bh.consume(URISupport.normalizeUri("log:foo"));
bh.consume(URISupport.normalizeUri("log:foo?exchangeFormatter=#myFormatter&level=INFO&logMask=false"));
bh.consume(URISupport.normalizeUri("file:target/inbox?recursive=true"));
bh.consume(URISupport.normalizeUri("smtp://localhost?username=davsclaus&password=secret"));
bh.consume(URISupport.normalizeUri("seda:foo?concurrentConsumer=2"));
bh.consume(URISupport.normalizeUri("irc:someserver/#camel?user=davsclaus"));
bh.consume(URISupport.normalizeUri("http:www.google.com?q=Camel"));
bh.consume(URISupport.normalizeUri("smtp://localhost?&from=me&from=you&to=foo&to=bar"));
}
@Benchmark
public void benchmarkSlow(ContainsIgnoreCaseTest.BenchmarkState state, Blackhole bh) throws Exception {
bh.consume(URISupport.normalizeUri("http://www.google.com?q=S%C3%B8ren%20Hansen"));
bh.consume(URISupport.normalizeUri("ftp://us%40r:t%st@localhost:21000/tmp3/camel?foo=us@r"));
bh.consume(URISupport.normalizeUri("ftp://us%40r:t%25st@localhost:21000/tmp3/camel?foo=us@r"));
bh.consume(URISupport.normalizeUri("ftp://us@r:t%st@localhost:21000/tmp3/camel?foo=us@r"));
bh.consume(URISupport.normalizeUri("ftp://us@r:t%25st@localhost:21000/tmp3/camel?foo=us@r"));
bh.consume(URISupport
.normalizeUri("xmpp://camel-user@localhost:123/test-user@localhost?password=secret&serviceName=someCoolChat"));
bh.consume(URISupport.normalizeUri(
"xmpp://camel-user@localhost:123/test-user@localhost?password=RAW(++?w0rd)&serviceName=some chat"));
bh.consume(URISupport.normalizeUri(
"xmpp://camel-user@localhost:123/test-user@localhost?password=RAW(foo %% bar)&serviceName=some chat"));
}
@Benchmark
public void sorting(ContainsIgnoreCaseTest.BenchmarkState state, Blackhole bh) throws Exception {
bh.consume(URISupport
.normalizeUri("log:foo?zzz=123&xxx=222&hhh=444&aaa=tru&d=yes&cc=no&Camel=awesome&foo.hey=bar&foo.bar=blah"));
}
}
| 8,416 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/eip/AggregatorTest.java | /*
* 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.itest.jmh.eip;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.ConsumerTemplate;
import org.apache.camel.Endpoint;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.processor.aggregate.GroupedExchangeAggregationStrategy;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/**
* This tests a content-based-router when using a text body for the routing decision. This is suitable for most cases when
* a large machine with too many cores is not available (as it limits to a maximum of 4 consumers + 4 producers).
*/
public class AggregatorTest {
private static String DATA = "HELLO";
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Benchmark)
public static class BenchmarkState {
@Param({"1", "2", "4"})
int batchSize;
CamelContext context;
ProducerTemplate producerTemplate;
ConsumerTemplate consumerTemplate;
Endpoint endpoint;
Endpoint consumerEndpoint;
@Setup(Level.Trial)
public void initialize() throws Exception {
context = new DefaultCamelContext();
producerTemplate = context.createProducerTemplate();
consumerTemplate = context.createConsumerTemplate();
endpoint = context.getEndpoint("disruptor:test");
consumerEndpoint = context.getEndpoint("direct:result");
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
fromF("disruptor:test")
.aggregate(constant(true), new GroupedExchangeAggregationStrategy())
.completionSize(batchSize)
.to(consumerEndpoint);
}
});
context.start();
}
}
private static void doSend(Blackhole bh, BenchmarkState state) {
for (int i = 0; i < state.batchSize; i++) {
state.producerTemplate.sendBody(state.endpoint, DATA);
}
bh.consume(state.consumerTemplate.receive(state.consumerEndpoint));
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void send_1(Blackhole bh, BenchmarkState state) {
doSend(bh, state);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(2)
public void send_2(Blackhole bh, BenchmarkState state) {
doSend(bh, state);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(4)
public void send_4(Blackhole bh, BenchmarkState state) {
doSend(bh, state);
}
}
| 8,417 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/eip/FilterTextHeaderPositiveTest.java | /*
* 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.itest.jmh.eip;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.ConsumerTemplate;
import org.apache.camel.Endpoint;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/**
* This tests a content-based-router when using a text body for the routing decision. This is suitable for most cases when
* a large machine with too many cores is not available (as it limits to a maximum of 4 consumers + 4 producers).
*/
public class FilterTextHeaderPositiveTest {
private static String DATA = "HELLO";
private static final String HEADER = "filter";
private static final String POSITIVE = "positive";
private static final String NEGATIVE = "negative";
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Benchmark)
public static class BenchmarkState {
CamelContext context;
ProducerTemplate producerTemplate;
ConsumerTemplate consumerTemplate;
Endpoint endpoint;
Endpoint consumerPositiveEndpoint;
@Setup(Level.Trial)
public void initialize() throws Exception {
context = new DefaultCamelContext();
producerTemplate = context.createProducerTemplate();
consumerTemplate = context.createConsumerTemplate();
endpoint = context.getEndpoint("disruptor:test");
consumerPositiveEndpoint = context.getEndpoint("disruptor:positive");
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
from(endpoint)
.filter(simple("${header.filter} == 'positive'"))
.to(consumerPositiveEndpoint)
.end()
.to("log:?level=OFF");
}
});
context.start();
}
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void sendPositive(Blackhole bh, BenchmarkState state) {
state.producerTemplate.sendBodyAndHeader(state.endpoint, DATA, HEADER, POSITIVE);
bh.consume(state.consumerTemplate.receive(state.consumerPositiveEndpoint));
}
}
| 8,418 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/eip/FilterXmlHeaderPositiveTest.java | /*
* 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.itest.jmh.eip;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.ConsumerTemplate;
import org.apache.camel.Endpoint;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/**
* This tests a content-based-router when using a text body for the routing decision. This is suitable for most cases when
* a large machine with too many cores is not available (as it limits to a maximum of 4 consumers + 4 producers).
*/
public class FilterXmlHeaderPositiveTest {
private static String JBOURNE_DATA = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><person user=\"jbourne\"><firstName>Jason</firstName><lastName>Bourne</lastName><city>London</city></person>";
private static String JSPARROW_DATA = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><person user=\"jsparrow\"><firstName>Jack</firstName><lastName>Sparrow</lastName><city>Port Royal</city></person>";
private static final String HEADER = "filter";
private static final String POSITIVE = "positive";
private static final String NEGATIVE = "negative";
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Benchmark)
public static class BenchmarkState {
@Param({"1", "2", "4", "8"})
int threadCount;
CamelContext context;
ProducerTemplate producerTemplate;
ConsumerTemplate consumerTemplate;
Endpoint endpoint;
Endpoint consumerPositiveEndpoint;
@Setup(Level.Trial)
public void initialize() throws Exception {
context = new DefaultCamelContext();
producerTemplate = context.createProducerTemplate();
consumerTemplate = context.createConsumerTemplate();
producerTemplate.start();
consumerTemplate.start();
endpoint = context.getEndpoint("disruptor:test");
consumerPositiveEndpoint = context.getEndpoint("disruptor:positive");
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
from("disruptor:test")
.threads(threadCount, threadCount)
.filter().xpath("/person[@user='jbourne']")
.to(consumerPositiveEndpoint)
.end()
.to("log:?level=OFF");
}
});
context.start();
}
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void sendPositive(Blackhole bh, BenchmarkState state) {
state.producerTemplate.sendBodyAndHeader(state.endpoint, JBOURNE_DATA, HEADER, POSITIVE);
bh.consume(state.consumerTemplate.receive(state.consumerPositiveEndpoint));
}
}
| 8,419 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/eip/ToDHeaderTest.java | /*
* 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.itest.jmh.eip;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.ConsumerTemplate;
import org.apache.camel.Endpoint;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/**
* This tests the toD when using a header for the routing decision.
*/
public class ToDHeaderTest {
private static String DATA = "HELLO";
private static final String HEADER = "name";
private static final String POSITIVE = "positive";
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Benchmark)
public static class BenchmarkState {
CamelContext context;
ProducerTemplate producerTemplate;
ConsumerTemplate consumerTemplate;
Endpoint endpoint;
Endpoint consumerPositiveEndpoint;
@Setup(Level.Trial)
public void initialize() throws Exception {
context = new DefaultCamelContext();
producerTemplate = context.createProducerTemplate();
consumerTemplate = context.createConsumerTemplate();
endpoint = context.getEndpoint("disruptor:test");
consumerPositiveEndpoint = context.getEndpoint("disruptor:positive");
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
from(endpoint)
.toD("disruptor:${header[\"name\"]}");
}
});
context.start();
}
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(1)
public void send_1(Blackhole bh, BenchmarkState state) {
state.producerTemplate.sendBodyAndHeader(state.endpoint, DATA, HEADER, POSITIVE);
bh.consume(state.consumerTemplate.receive(state.consumerPositiveEndpoint));
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(2)
public void send_2(Blackhole bh, BenchmarkState state) {
state.producerTemplate.sendBodyAndHeader(state.endpoint, DATA, HEADER, POSITIVE);
bh.consume(state.consumerTemplate.receive(state.consumerPositiveEndpoint));
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(4)
public void send_4(Blackhole bh, BenchmarkState state) {
state.producerTemplate.sendBodyAndHeader(state.endpoint, DATA, HEADER, POSITIVE);
bh.consume(state.consumerTemplate.receive(state.consumerPositiveEndpoint));
}
}
| 8,420 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/eip/ContentBasedRouterBodyTest.java | /*
* 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.itest.jmh.eip;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/**
* This tests a content-based-router when using a text body for the routing decision. This is suitable for most cases when
* a large machine with too many cores is not available (as it limits to a maximum of 4 consumers + 4 producers).
*/
public class ContentBasedRouterBodyTest {
private static String COUNTER_HEADER = "counter";
private static String TYPE_A_BODY = "typeA";
private static String TYPE_B_BODY = "typeB";
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Benchmark)
public static class BenchmarkState {
@Param({"1", "2", "4"})
int consumers;
CamelContext context;
ProducerTemplate producerTemplate;
Endpoint endpoint;
TypeAProcessor typeAProcessor = new TypeAProcessor();
TypeBProcessor typeBProcessor = new TypeBProcessor();
@Setup(Level.Trial)
public void initialize() throws Exception {
context = new DefaultCamelContext();
producerTemplate = context.createProducerTemplate();
endpoint = context.getEndpoint("disruptor:test");
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
fromF("disruptor:test?concurrentConsumers=%s", consumers)
.choice()
.when(body().contains(TYPE_A_BODY))
.process(typeAProcessor)
.otherwise()
.process(typeBProcessor)
.end()
.to("log:?level=OFF");
}
});
context.start();
}
}
@State(Scope.Thread)
@AuxCounters(AuxCounters.Type.EVENTS)
public static class EventCounters {
public int typeA;
public int typeB;
public int total() {
return typeA + typeB;
}
}
public static class TypeAProcessor implements Processor {
@Override
public void process(Exchange exchange) throws Exception {
final EventCounters counter = exchange.getMessage().getHeader(COUNTER_HEADER, EventCounters.class);
counter.typeA++;
}
}
public static class TypeBProcessor implements Processor {
@Override
public void process(Exchange exchange) throws Exception {
final EventCounters counter = exchange.getMessage().getHeader(COUNTER_HEADER, EventCounters.class);
counter.typeB++;
}
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void send_1(BenchmarkState state, EventCounters counters) {
state.producerTemplate.sendBodyAndHeader(state.endpoint, TYPE_A_BODY, COUNTER_HEADER, counters);
state.producerTemplate.sendBodyAndHeader(state.endpoint, TYPE_B_BODY, COUNTER_HEADER, counters);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(2)
public void send_2(BenchmarkState state, EventCounters counters) {
state.producerTemplate.sendBodyAndHeader(state.endpoint, TYPE_A_BODY, COUNTER_HEADER, counters);
state.producerTemplate.sendBodyAndHeader(state.endpoint, TYPE_B_BODY, COUNTER_HEADER, counters);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(4)
public void send_4(BenchmarkState state, EventCounters counters) {
state.producerTemplate.sendBodyAndHeader(state.endpoint, TYPE_A_BODY, COUNTER_HEADER, counters);
state.producerTemplate.sendBodyAndHeader(state.endpoint, TYPE_B_BODY, COUNTER_HEADER, counters);
}
}
| 8,421 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/eip/ContentBasedRouterHeaderTest.java | /*
* 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.itest.jmh.eip;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/**
* This tests a content-based-router when using a text body for the routing decision. This is suitable for most cases when
* a large machine with too many cores is not available (as it limits to a maximum of 4 consumers + 4 producers).
*/
public class ContentBasedRouterHeaderTest {
private static String COUNTER_HEADER = "counter";
private static String TYPE_A_BODY = "typeA";
private static String TYPE_B_BODY = "typeB";
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
.warmupIterations(5)
.warmupBatchSize(5000)
.measurementIterations(10)
.measurementBatchSize(50000)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Benchmark)
public static class BenchmarkState {
@Param({"1", "2", "4"})
int consumers;
CamelContext context;
ProducerTemplate producerTemplate;
Endpoint endpoint;
TypeAProcessor typeAProcessor = new TypeAProcessor();
TypeBProcessor typeBProcessor = new TypeBProcessor();
Map<String, Object> typeAHeaders = new HashMap<>();
Map<String, Object> typeBHeaders = new HashMap<>();
@Setup(Level.Trial)
public void initialize() throws Exception {
context = new DefaultCamelContext();
producerTemplate = context.createProducerTemplate();
endpoint = context.getEndpoint("disruptor:test");
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
fromF("disruptor:test?concurrentConsumers=%s", consumers)
.choice()
.when(simple("${header.destination} == 'typeA'"))
.process(typeAProcessor)
.otherwise()
.process(typeBProcessor)
.end()
.to("log:?level=OFF");
}
});
typeAHeaders.put("destination", "typeA");
typeBHeaders.put("destination", "typeB");
context.start();
}
}
@State(Scope.Thread)
@AuxCounters(AuxCounters.Type.EVENTS)
public static class EventCounters {
public int typeA;
public int typeB;
public int total() {
return typeA + typeB;
}
}
public static class TypeAProcessor implements Processor {
@Override
public void process(Exchange exchange) throws Exception {
final EventCounters counter = exchange.getMessage().getHeader(COUNTER_HEADER, EventCounters.class);
counter.typeA++;
}
}
public static class TypeBProcessor implements Processor {
@Override
public void process(Exchange exchange) throws Exception {
final EventCounters counter = exchange.getMessage().getHeader(COUNTER_HEADER, EventCounters.class);
counter.typeB++;
}
}
private static void doSend(BenchmarkState state, EventCounters counters) {
state.typeAHeaders.put(COUNTER_HEADER, counters);
state.typeBHeaders.put(COUNTER_HEADER, counters);
state.producerTemplate.sendBodyAndHeaders(state.endpoint, TYPE_A_BODY, state.typeAHeaders);
state.producerTemplate.sendBodyAndHeaders(state.endpoint, TYPE_B_BODY, state.typeBHeaders);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void send_1(BenchmarkState state, EventCounters counters) {
doSend(state, counters);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(2)
public void send_2(BenchmarkState state, EventCounters counters) {
doSend(state, counters);
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
@Threads(4)
public void send_4(BenchmarkState state, EventCounters counters) {
doSend(state, counters);
}
}
| 8,422 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/eip/FilterXmlHeaderNegativeTest.java | /*
* 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.itest.jmh.eip;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.ConsumerTemplate;
import org.apache.camel.Endpoint;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/**
* This tests a content-based-router when using a text body for the routing decision. This is suitable for most cases when
* a large machine with too many cores is not available (as it limits to a maximum of 4 consumers + 4 producers).
*/
public class FilterXmlHeaderNegativeTest {
private static String JBOURNE_DATA = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><person user=\"jbourne\"><firstName>Jason</firstName><lastName>Bourne</lastName><city>London</city></person>";
private static String JSPARROW_DATA = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><person user=\"jsparrow\"><firstName>Jack</firstName><lastName>Sparrow</lastName><city>Port Royal</city></person>";
private static final String HEADER = "filter";
private static final String POSITIVE = "positive";
private static final String NEGATIVE = "negative";
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Benchmark)
public static class BenchmarkState {
@Param({"1", "2", "4", "8"})
int threadCount;
CamelContext context;
ProducerTemplate producerTemplate;
ConsumerTemplate consumerTemplate;
Endpoint endpoint;
Endpoint consumerPositiveEndpoint;
Endpoint consumerNegativeEndpoint;
@Setup(Level.Trial)
public void initialize() throws Exception {
context = new DefaultCamelContext();
producerTemplate = context.createProducerTemplate();
consumerTemplate = context.createConsumerTemplate();
producerTemplate.start();
consumerTemplate.start();
endpoint = context.getEndpoint("disruptor:test");
consumerPositiveEndpoint = context.getEndpoint("disruptor:positive");
consumerNegativeEndpoint = context.getEndpoint("disruptor:negative");
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
from("disruptor:test")
.threads(threadCount, threadCount)
.filter().xpath("/person[@user='jbourne']")
.to("log:?level=OFF")
.end()
.to(consumerNegativeEndpoint);
}
});
context.start();
}
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void sendNegative(Blackhole bh, BenchmarkState state) {
state.producerTemplate.sendBodyAndHeader(state.endpoint, JSPARROW_DATA, HEADER, NEGATIVE);
bh.consume(state.consumerTemplate.receive(state.consumerNegativeEndpoint));
}
}
| 8,423 |
0 | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh | Create_ds/camel-performance-tests/tests/camel-jmh/src/test/java/org/apache/camel/itest/jmh/eip/FilterTextHeaderNegativeTest.java | /*
* 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.itest.jmh.eip;
import java.util.concurrent.TimeUnit;
import org.apache.camel.CamelContext;
import org.apache.camel.ConsumerTemplate;
import org.apache.camel.Endpoint;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.results.format.ResultFormatType;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/**
* This tests a content-based-router when using a text body for the routing decision. This is suitable for most cases when
* a large machine with too many cores is not available (as it limits to a maximum of 4 consumers + 4 producers).
*/
public class FilterTextHeaderNegativeTest {
private static String DATA = "HELLO";
private static final String HEADER = "filter";
private static final String POSITIVE = "positive";
private static final String NEGATIVE = "negative";
@Test
public void launchBenchmark() throws Exception {
Options opt = new OptionsBuilder()
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
.include(this.getClass().getName() + ".*")
// Set the following options as needed
.measurementIterations(10)
.warmupIterations(5)
.forks(1)
.resultFormat(ResultFormatType.JSON)
.result(this.getClass().getSimpleName() + ".jmh.json")
.build();
new Runner(opt).run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Benchmark)
public static class BenchmarkState {
CamelContext context;
ProducerTemplate producerTemplate;
ConsumerTemplate consumerTemplate;
Endpoint endpoint;
Endpoint consumerNegativeEndpoint;
@Setup(Level.Trial)
public void initialize() throws Exception {
context = new DefaultCamelContext();
producerTemplate = context.createProducerTemplate();
consumerTemplate = context.createConsumerTemplate();
endpoint = context.getEndpoint("disruptor:test");
consumerNegativeEndpoint = context.getEndpoint("disruptor:negative");
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
from(endpoint)
.filter(simple("${header.filter} == 'positive'"))
.to("log:?level=OFF")
.end()
.to(consumerNegativeEndpoint);
}
});
context.start();
}
}
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public void sendNegative(Blackhole bh, BenchmarkState state) {
state.producerTemplate.sendBodyAndHeader(state.endpoint, DATA, HEADER, NEGATIVE);
bh.consume(state.consumerTemplate.receive(state.consumerNegativeEndpoint));
}
}
| 8,424 |
0 | Create_ds/camel-performance-tests/tests/camel-itest-performance/src/test/java/org/apache/camel/tests | Create_ds/camel-performance-tests/tests/camel-itest-performance/src/test/java/org/apache/camel/tests/performance/ProducerCacheHitsTest.java | /*
* 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.tests.performance;
import java.text.DecimalFormat;
import java.util.HashMap;
import java.util.Map;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.apache.camel.tests.component.PerformanceTestComponent;
import org.apache.camel.util.StopWatch;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ProducerCacheHitsTest extends CamelTestSupport {
private static final String SMALL_MESSAGE = "message";
private static final DecimalFormat FORMAT = new DecimalFormat("#.##");
private Logger log = LoggerFactory.getLogger(getClass());
@Test
public void testRepeatProcessing() throws Exception {
MockEndpoint data = getMandatoryEndpoint("mock:results", MockEndpoint.class);
data.expectedMessageCount(4 * 7);
for (int iter = 10; iter <= 10000; iter *= 10) {
for (int t = 2; t <= 128; t *= 2) {
runTest("test-perf:endpoint", SMALL_MESSAGE, iter, t);
}
}
data.assertIsSatisfied();
for (Exchange ex : data.getExchanges()) {
TestResult r = ex.getIn().getBody(TestResult.class);
log.info(r.toString());
}
}
protected Object runTest(String uri, String body, int iterations, int threads) {
Map<String, Object> headers = new HashMap<>();
headers.put(PerformanceTestComponent.HEADER_ITERATIONS, iterations);
headers.put(PerformanceTestComponent.HEADER_THREADS, threads);
StopWatch watch = new StopWatch();
Object result = template.requestBodyAndHeaders(uri, body, headers);
template.sendBody("mock:results", new TestResult(uri, iterations, threads, watch.taken()));
return result;
}
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
from("test-perf:endpoint").to("echo:echo");
}
};
}
public final class TestResult {
public String uri;
public int iterations;
public int threads;
public long time;
public TestResult(String uri, int iterations, int threads, long time) {
this.uri = uri;
this.iterations = iterations;
this.threads = threads;
this.time = time;
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("[");
sb.append(FORMAT.format(1000.0 * iterations / time));
sb.append(" /s], ");
sb.append(uri);
sb.append(", ");
sb.append(iterations);
sb.append(", ");
sb.append(threads);
sb.append(", ");
sb.append(time);
return sb.toString();
}
}
}
| 8,425 |
0 | Create_ds/camel-performance-tests/tests/camel-itest-performance/src/test/java/org/apache/camel/tests | Create_ds/camel-performance-tests/tests/camel-itest-performance/src/test/java/org/apache/camel/tests/performance/NoTest.java | /*
* 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.tests.performance;
import org.junit.jupiter.api.Test;
public class NoTest {
@Test
public void testNothing() throws Exception {
}
}
| 8,426 |
0 | Create_ds/camel-performance-tests/tests/camel-itest-performance/src/main/java/org/apache/camel/tests | Create_ds/camel-performance-tests/tests/camel-itest-performance/src/main/java/org/apache/camel/tests/component/PerformanceTestComponent.java | /*
* 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.tests.component;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionService;
import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.ExecutorService;
import org.apache.camel.AsyncCallback;
import org.apache.camel.AsyncProcessor;
import org.apache.camel.Component;
import org.apache.camel.Consumer;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
import org.apache.camel.support.DefaultComponent;
import org.apache.camel.support.DefaultConsumer;
import org.apache.camel.support.DefaultEndpoint;
import org.apache.camel.support.DefaultProducer;
import org.apache.camel.support.ExchangeHelper;
public class PerformanceTestComponent extends DefaultComponent {
public static final String HEADER_THREADS = "CamelPerfThreads";
public static final String HEADER_ITERATIONS = "CamelPerfIterations";
private static final int DEFAULT_THREADS = 8;
private static final int DEFAULT_ITERATIONS = 100;
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
Endpoint endpoint = new PerformanceTestEndpoint(uri, this);
setProperties(endpoint, parameters);
return endpoint;
}
public static int getHeaderValue(Exchange exchange, String header) {
Integer value = exchange.getContext().getTypeConverter().convertTo(Integer.class, exchange,
exchange.getIn().getHeader(header));
return value != null ? value : header.equals(HEADER_THREADS) ? DEFAULT_THREADS
: header.equals(HEADER_ITERATIONS) ? DEFAULT_ITERATIONS : 0;
}
private static final class PerformanceTestEndpoint extends DefaultEndpoint {
private PerformanceTestConsumer consumer;
protected PerformanceTestEndpoint(String uri, Component component) {
super(uri, component);
}
@Override
public Consumer createConsumer(Processor processor) throws Exception {
synchronized (this) {
if (consumer != null && processor != consumer.getProcessor()) {
throw new Exception("PerformanceTestEndpoint doesn not support multiple consumers per Endpoint");
}
consumer = new PerformanceTestConsumer(this, processor);
}
return consumer;
}
@Override
public Producer createProducer() throws Exception {
return new PerformanceTestProducer(this);
}
@Override
public boolean isSingleton() {
return true;
}
public Consumer getConsumer() {
return consumer;
}
}
private static final class PerformanceTestConsumer extends DefaultConsumer {
protected PerformanceTestConsumer(Endpoint endpoint, Processor processor) {
super(endpoint, processor);
}
}
private static final class PerformanceTestProducer extends DefaultProducer implements AsyncProcessor {
protected PerformanceTestProducer(Endpoint endpoint) {
super(endpoint);
}
@Override
public void process(final Exchange exchange) throws Exception {
final int count = getHeaderValue(exchange, HEADER_ITERATIONS);
final int threads = getHeaderValue(exchange, HEADER_THREADS);
PerformanceTestEndpoint endpoint = (PerformanceTestEndpoint) getEndpoint();
if (endpoint != null) {
final DefaultConsumer consumer = (DefaultConsumer) endpoint.getConsumer();
ExecutorService executor
= exchange.getContext().getExecutorServiceManager().newFixedThreadPool(this, "perf", threads);
CompletionService<Exchange> tasks = new ExecutorCompletionService<>(executor);
// StopWatch watch = new StopWatch(); // if we want to clock how
// long it takes
for (int i = 0; i < count; i++) {
tasks.submit(new Callable<Exchange>() {
@Override
public Exchange call() throws Exception {
Exchange exch = ExchangeHelper.createCopy(exchange, false);
try {
consumer.getProcessor().process(exch);
} catch (final Exception e) {
exch.setException(e);
}
return exch;
}
});
}
for (int i = 0; i < count; i++) {
// Future<Exchange> result = tasks.take();
tasks.take(); // wait for all exchanges to complete
}
}
}
@Override
public boolean process(Exchange exchange, AsyncCallback callback) {
try {
this.process(exchange);
} catch (Exception e) {
exchange.setException(e);
}
callback.done(true);
return true;
}
@Override
public CompletableFuture<Exchange> processAsync(Exchange exchange) {
// TODO Auto-generated method stub
return null;
}
}
}
| 8,427 |
0 | Create_ds/camel-performance-tests/tests/camel-itest-performance/src/main/java/org/apache/camel/tests | Create_ds/camel-performance-tests/tests/camel-itest-performance/src/main/java/org/apache/camel/tests/component/EchoTestComponent.java | /*
* 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.tests.component;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import org.apache.camel.AsyncCallback;
import org.apache.camel.AsyncProcessor;
import org.apache.camel.Component;
import org.apache.camel.Consumer;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
import org.apache.camel.support.DefaultComponent;
import org.apache.camel.support.DefaultEndpoint;
import org.apache.camel.support.DefaultProducer;
public class EchoTestComponent extends DefaultComponent {
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
Endpoint endpoint = new EchoEndpoint(uri, this);
setProperties(endpoint, parameters);
return endpoint;
}
private final class EchoEndpoint extends DefaultEndpoint {
protected EchoEndpoint(String uri, Component component) {
super(uri, component);
}
@Override
public Consumer createConsumer(Processor processor) throws Exception {
// Component only supports Producers
return null;
}
@Override
public Producer createProducer() throws Exception {
return new EchoProducer(this);
}
@Override
public boolean isSingleton() {
return false;
}
}
private final class EchoProducer extends DefaultProducer implements AsyncProcessor {
protected EchoProducer(Endpoint endpoint) {
super(endpoint);
}
@Override
public void process(Exchange exchange) throws Exception {
// do nothing, echo is implicit
}
@Override
public boolean process(Exchange exchange, AsyncCallback callback) {
// do nothing, echo is implicit
return true;
}
@Override
public CompletableFuture<Exchange> processAsync(Exchange exchange) {
// TODO Auto-generated method stub
return null;
}
}
}
| 8,428 |
0 | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test/perf/XsltPerformanceTest.java | /*
* 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.test.perf;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.util.StopWatch;
import org.junit.jupiter.api.Test;
public class XsltPerformanceTest extends AbstractBasePerformanceTest {
private final int count = 10000;
@Test
public void testXslt() throws InterruptedException {
template.setDefaultEndpointUri("direct:xslt");
// warm up with 1.000 messages so that the JIT compiler kicks in
execute(1000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
from("direct:xslt")
.to("xslt://META-INF/xslt/transform.xslt")
.to("mock:end");
}
};
}
}
| 8,429 |
0 | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test/perf/XQueryBasedRoutingPerformanceTest.java | /*
* 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.test.perf;
import java.util.HashMap;
import java.util.Map;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.util.StopWatch;
import org.junit.jupiter.api.Test;
public class XQueryBasedRoutingPerformanceTest extends AbstractBasePerformanceTest {
private final int count = 30000;
@Test
public void testChoice() throws InterruptedException {
template.setDefaultEndpointUri("direct:choice");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Test
public void testFilter() throws InterruptedException {
template.setDefaultEndpointUri("direct:filter");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
Map<String, String> namespaces = new HashMap<>();
namespaces.put("soapenv", "http://schemas.xmlsoap.org/soap/envelope/");
namespaces.put("m", "http://services.samples/xsd");
from("direct:filter")
.filter().xquery("/soapenv:Envelope/soapenv:Body/m:buyStocks/order[1]/symbol='IBM'", namespaces)
.to("mock:end");
from("direct:choice")
.choice()
.when().xquery("/soapenv:Envelope/soapenv:Body/m:buyStocks/order[1]/symbol='IBM'", namespaces)
.to("mock:end");
}
};
}
}
| 8,430 |
0 | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test/perf/HeaderBasedRoutingPerformanceTest.java | /*
* 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.test.perf;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.util.StopWatch;
import org.junit.jupiter.api.Test;
public class HeaderBasedRoutingPerformanceTest extends AbstractBasePerformanceTest {
private final int count = 30000;
@Test
public void testChoiceSimple() throws InterruptedException {
template.setDefaultEndpointUri("direct:choice-simple");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Test
public void testChoiceExpression() throws InterruptedException {
template.setDefaultEndpointUri("direct:choice-expression");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Test
public void testFilterSimple() throws InterruptedException {
template.setDefaultEndpointUri("direct:filter-simple");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Test
public void testFilterExpression() throws InterruptedException {
template.setDefaultEndpointUri("direct:filter-expression");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Override
protected void execute(int count) {
for (int counter = 0; counter < count; counter++) {
template.sendBodyAndHeader(getPayload(), "routing", "xadmin;server1;community#1.0##");
}
}
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
from("direct:filter-simple")
.filter(simple("${in.header.routing} == 'xadmin;server1;community#1.0##'"))
.to("mock:end");
from("direct:filter-expression")
.filter(header("routing").isEqualTo("xadmin;server1;community#1.0##"))
.to("mock:end");
from("direct:choice-simple")
.choice()
.when(simple("${in.header.routing} == 'xadmin;server1;community#1.0##'"))
.to("mock:end");
from("direct:choice-expression")
.choice()
.when(header("routing").isEqualTo("xadmin;server1;community#1.0##"))
.to("mock:end");
}
};
}
}
| 8,431 |
0 | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test/perf/XPathBasedRoutingPerformanceTest.java | /*
* 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.test.perf;
import java.util.HashMap;
import java.util.Map;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.util.StopWatch;
import org.junit.jupiter.api.Test;
public class XPathBasedRoutingPerformanceTest extends AbstractBasePerformanceTest {
private final int count = 30000;
@Test
public void testChoice() throws InterruptedException {
template.setDefaultEndpointUri("direct:choice");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Test
public void testFilter() throws InterruptedException {
template.setDefaultEndpointUri("direct:filter");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
Map<String, String> namespaces = new HashMap<>();
namespaces.put("soapenv", "http://schemas.xmlsoap.org/soap/envelope/");
namespaces.put("m", "http://services.samples/xsd");
from("direct:filter")
.filter().xpath("/soapenv:Envelope/soapenv:Body/m:buyStocks/order[1]/symbol='IBM'", namespaces)
.to("mock:end");
from("direct:choice")
.choice()
.when().xpath("/soapenv:Envelope/soapenv:Body/m:buyStocks/order[1]/symbol='IBM'", namespaces)
.to("mock:end");
}
};
}
}
| 8,432 |
0 | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test/perf/AbstractBasePerformanceTest.java | /*
* 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.test.perf;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.TestInstance;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public abstract class AbstractBasePerformanceTest extends CamelTestSupport {
protected static final String BODY_1KB_PAYLOAD
= "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">"
+ "<soapenv:Header><routing xmlns=\"http://someuri\">xadmin;server1;community#1.0##</routing></soapenv:Header>"
+ "<soapenv:Body>"
+ "<m:buyStocks xmlns:m=\"http://services.samples/xsd\">"
+ "<order><symbol>IBM</symbol><buyerID>asankha</buyerID><price>140.34</price><volume>2000</volume></order>"
+ "<order><symbol>MSFT</symbol><buyerID>ruwan</buyerID><price>23.56</price><volume>8030</volume></order>"
+ "<order><symbol>SUN</symbol><buyerID>indika</buyerID><price>14.56</price><volume>500</volume></order>"
+ "<order><symbol>GOOG</symbol><buyerID>chathura</buyerID><price>60.24</price><volume>40000</volume></order>"
+ "<order><symbol>IBM</symbol><buyerID>asankha</buyerID><price>140.34</price><volume>2000</volume></order>"
+ "<order><symbol>MSFT</symbol><buyerID>ruwan</buyerID><price>23.56</price><volume>803000</volume></order>"
+ "<order><symbol>SUN</symbol><buyerID>indika</buyerID><price>14.56</price><volume>5000</volume></order>"
+ "</m:buyStocks>"
+ "</soapenv:Body>"
+ "</soapenv:Envelope>";
protected final Logger log = LoggerFactory.getLogger(getClass());
protected String getPayload() {
return BODY_1KB_PAYLOAD;
}
protected void resetMock(int count) {
MockEndpoint mock = getMockEndpoint("mock:end");
mock.reset();
mock.setRetainFirst(0);
mock.setRetainLast(0);
mock.expectedMessageCount(count);
}
protected void execute(int count) {
for (int counter = 0; counter < count; counter++) {
template.sendBody(getPayload());
}
}
}
| 8,433 |
0 | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test/perf/SplitterPerformanceTest.java | /*
* 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.test.perf;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.util.StopWatch;
import org.junit.jupiter.api.Test;
public class SplitterPerformanceTest extends AbstractBasePerformanceTest {
protected static final String HEADER = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">"
+ "<soapenv:Header><routing xmlns=\"http://someuri\">xadmin;server1;community#1.0##</routing></soapenv:Header>"
+ "<soapenv:Body>"
+ "<m:buyStocks xmlns:m=\"http://services.samples/xsd\">";
protected static final String BODY
= "<order><symbol>IBM</symbol><buyerID>asankha</buyerID><price>140.34</price><volume>2000</volume></order>\n"
+ "<order><symbol>MSFT</symbol><buyerID>ruwan</buyerID><price>23.56</price><volume>8030</volume></order>\n"
+ "<order><symbol>SUN</symbol><buyerID>indika</buyerID><price>14.56</price><volume>500</volume></order>\n"
+ "<order><symbol>GOOG</symbol><buyerID>chathura</buyerID><price>60.24</price><volume>40000</volume></order>\n"
+ "<order><symbol>IBM</symbol><buyerID>asankha</buyerID><price>140.34</price><volume>2000</volume></order>\n"
+ "<order><symbol>MSFT</symbol><buyerID>ruwan</buyerID><price>23.56</price><volume>803000</volume></order>\n"
+ "<order><symbol>SUN</symbol><buyerID>indika</buyerID><price>14.56</price><volume>5000</volume></order>\n"
+ "<order><symbol>GOOG</symbol><buyerID>chathura</buyerID><price>60.24</price><volume>40000</volume></order>\n"
+ "<order><symbol>IBM</symbol><buyerID>asankha</buyerID><price>140.34</price><volume>2000</volume></order>\n"
+ "<order><symbol>MSFT</symbol><buyerID>ruwan</buyerID><price>23.56</price><volume>803000</volume></order>\n";
protected static final String TRAILER = "</m:buyStocks>"
+ "</soapenv:Body>"
+ "</soapenv:Envelope>";
protected static final String PAYLOAD;
static {
StringBuilder builder = new StringBuilder(HEADER);
for (int i = 0; i < 2000; i++) {
builder.append(BODY);
}
builder.append(TRAILER);
PAYLOAD = builder.toString();
}
private final int count = 20001;
@Test
public void testTokenize() throws InterruptedException {
template.setDefaultEndpointUri("direct:tokenize");
// warm up with 1 message so that the JIT compiler kicks in
execute(1);
resetMock(count);
StopWatch watch = new StopWatch();
execute(1);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Override
protected String getPayload() {
return PAYLOAD;
}
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
from("direct:tokenize")
.split(body().tokenize("\n"))
.to("mock:end");
}
};
}
}
| 8,434 |
0 | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test | Create_ds/camel-performance-tests/tests/camel-performance/src/test/java/org/apache/camel/test/perf/ContentBasedRoutingPerformanceTest.java | /*
* 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.test.perf;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.util.StopWatch;
import org.junit.jupiter.api.Test;
public class ContentBasedRoutingPerformanceTest extends AbstractBasePerformanceTest {
private final int count = 30000;
@Test
public void testChoiceSimple() throws InterruptedException {
template.setDefaultEndpointUri("direct:choice-simple");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Test
public void testChoiceExpression() throws InterruptedException {
template.setDefaultEndpointUri("direct:choice-expression");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Test
public void testFilterSimple() throws InterruptedException {
template.setDefaultEndpointUri("direct:filter-simple");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Test
public void testFilterExpression() throws InterruptedException {
template.setDefaultEndpointUri("direct:filter-expression");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
MockEndpoint.assertIsSatisfied(context);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
from("direct:filter-simple")
.filter().simple("${body} contains 'xadmin;server1;community#1.0##'")
.to("mock:end");
from("direct:filter-expression")
.filter(body().contains("<order><symbol>IBM</symbol><buyerID>asankha</buyerID>"))
.to("mock:end");
from("direct:choice-simple")
.choice()
.when().simple("${body} contains 'xadmin;server1;community#1.0##'")
.to("mock:end");
from("direct:choice-expression")
.choice()
.when(body().contains("<order><symbol>IBM</symbol><buyerID>asankha</buyerID>"))
.to("mock:end");
}
};
}
}
| 8,435 |
0 | Create_ds/camel-performance-tests/profiling/timer-http/src/main/java/org/apache/camel | Create_ds/camel-performance-tests/profiling/timer-http/src/main/java/org/apache/camel/example/MyApplication.java | /*
* 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.example;
import org.apache.camel.main.Main;
/**
* Main class that boot the Camel application
*/
public final class MyApplication {
private MyApplication() {
}
public static void main(String[] args) throws Exception {
// use Camels Main class
Main main = new Main();
// and add the routes (you can specify multiple classes)
main.configure().addRoutesBuilder(MyRouteBuilder.class);
// now keep the application running until the JVM is terminated (ctrl + c or sigterm)
main.run(args);
}
}
| 8,436 |
0 | Create_ds/camel-performance-tests/profiling/timer-http/src/main/java/org/apache/camel | Create_ds/camel-performance-tests/profiling/timer-http/src/main/java/org/apache/camel/example/MyRouteBuilder.java | /*
* 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.example;
import org.apache.camel.builder.RouteBuilder;
public class MyRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
from("timer:foo?delay=10s&period={{myPeriod}}&includeMetadata=false")
// we can include a request body
.setBody(constant("Hi from Camel"))
.to("http://localhost:5678/")
// the bigger the route the more object allocations
// so lets test with 10 more steps
.to("log:out0?level=OFF")
.to("log:out1?level=OFF")
.to("log:out2?level=OFF")
.to("log:out3?level=OFF")
.to("log:out4?level=OFF")
.to("log:out5?level=OFF")
.to("log:out6?level=OFF")
.to("log:out7?level=OFF")
.to("log:out8?level=OFF")
.to("log:out9?level=OFF");
}
}
| 8,437 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-nats/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-nats/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,438 |
0 | Create_ds/camel-performance-tests/profiling/kafka/s3-kafka/.mvn | Create_ds/camel-performance-tests/profiling/kafka/s3-kafka/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,439 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-solr/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-solr/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,440 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-minio/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-minio/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,441 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-sqs/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-sqs/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,442 |
0 | Create_ds/camel-performance-tests/profiling/kafka/minio-kafka-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/minio-kafka-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,443 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-azure-storage-queue/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-azure-storage-queue/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,444 |
0 | Create_ds/camel-performance-tests/profiling/kafka/postgresql-kafka/.mvn | Create_ds/camel-performance-tests/profiling/kafka/postgresql-kafka/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,445 |
0 | Create_ds/camel-performance-tests/profiling/kafka/nats-kafka/.mvn | Create_ds/camel-performance-tests/profiling/kafka/nats-kafka/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,446 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-minio-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-minio-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,447 |
0 | Create_ds/camel-performance-tests/profiling/kafka/mongo-kafka-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/mongo-kafka-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,448 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-sqs-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-sqs-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,449 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-postgresql-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-postgresql-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,450 |
0 | Create_ds/camel-performance-tests/profiling/kafka/s3-kafka-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/s3-kafka-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,451 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-azure-storage-blob-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-azure-storage-blob-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,452 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-mongo/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-mongo/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,453 |
0 | Create_ds/camel-performance-tests/profiling/kafka/postgresql-kafka-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/postgresql-kafka-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,454 |
0 | Create_ds/camel-performance-tests/profiling/kafka/nats-kafka-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/nats-kafka-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,455 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-nats-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-nats-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,456 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-s3-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-s3-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,457 |
0 | Create_ds/camel-performance-tests/profiling/kafka/minio-kafka/.mvn | Create_ds/camel-performance-tests/profiling/kafka/minio-kafka/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,458 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-solr-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-solr-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,459 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-postgresql/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-postgresql/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,460 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-azure-storage-blob/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-azure-storage-blob/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,461 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-mongo-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-mongo-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,462 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-s3/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-s3/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,463 |
0 | Create_ds/camel-performance-tests/profiling/kafka/mongo-kafka/.mvn | Create_ds/camel-performance-tests/profiling/kafka/mongo-kafka/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,464 |
0 | Create_ds/camel-performance-tests/profiling/kafka/kafka-azure-storage-queue-exchange-pooling/.mvn | Create_ds/camel-performance-tests/profiling/kafka/kafka-azure-storage-queue-exchange-pooling/.mvn/wrapper/MavenWrapperDownloader.java | /*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
| 8,465 |
0 | Create_ds/camel-performance-tests/profiling/timer-log/src/main/java/org/apache/camel | Create_ds/camel-performance-tests/profiling/timer-log/src/main/java/org/apache/camel/example/MyApplication.java | /*
* 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.example;
import org.apache.camel.main.Main;
/**
* Main class that boot the Camel application
*/
public final class MyApplication {
private MyApplication() {
}
public static void main(String[] args) throws Exception {
// use Camels Main class
Main main = new Main();
// and add the routes (you can specify multiple classes)
main.configure().addRoutesBuilder(MyRouteBuilder.class);
// now keep the application running until the JVM is terminated (ctrl + c or sigterm)
main.run(args);
}
}
| 8,466 |
0 | Create_ds/camel-performance-tests/profiling/timer-log/src/main/java/org/apache/camel | Create_ds/camel-performance-tests/profiling/timer-log/src/main/java/org/apache/camel/example/MyRouteBuilder.java | /*
* 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.example;
import org.apache.camel.builder.RouteBuilder;
public class MyRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
from("timer:foo?delay=10s&period={{myPeriod}}&includeMetadata=false")
.to("log:out0?level=OFF")
.to("log:out1?level=OFF")
.to("log:out2?level=OFF")
.to("log:out3?level=OFF")
.to("log:out4?level=OFF")
.to("log:out5?level=OFF")
.to("log:out6?level=OFF")
.to("log:out7?level=OFF")
.to("log:out8?level=OFF")
.to("log:out9?level=OFF");
}
}
| 8,467 |
0 | Create_ds/camel-kafka-connector/connectors/camel-redis-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-redis-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/redissource/CamelRedissourceSourceTask.java | /*
* 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.kafkaconnector.redissource;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
import org.apache.camel.kafkaconnector.CamelSourceTask;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelRedissourceSourceTask extends CamelSourceTask {
@Override
protected CamelSourceConnectorConfig getCamelSourceConnectorConfig(
Map<String, String> props) {
return new CamelRedissourceSourceConnectorConfig(props);
}
@Override
protected String getSourceKamelet() {
return "kamelet:redis-source";
}
} | 8,468 |
0 | Create_ds/camel-kafka-connector/connectors/camel-redis-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-redis-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/redissource/CamelRedissourceSourceConnector.java | /*
* 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.kafkaconnector.redissource;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnector;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.connector.Task;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelRedissourceSourceConnector extends CamelSourceConnector {
@Override
public ConfigDef config() {
return CamelRedissourceSourceConnectorConfig.conf();
}
@Override
public Class<? extends Task> taskClass() {
return CamelRedissourceSourceTask.class;
}
} | 8,469 |
0 | Create_ds/camel-kafka-connector/connectors/camel-redis-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-redis-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/redissource/CamelRedissourceSourceConnectorConfig.java | /*
* 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.kafkaconnector.redissource;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
import org.apache.kafka.common.config.ConfigDef;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelRedissourceSourceConnectorConfig
extends
CamelSourceConnectorConfig {
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_REDIS_HOST_CONF = "camel.kamelet.redis-source.redisHost";
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_REDIS_HOST_DOC = "The host where Redis server is running";
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_REDIS_HOST_DEFAULT = null;
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_REDIS_PORT_CONF = "camel.kamelet.redis-source.redisPort";
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_REDIS_PORT_DOC = "The port where Redis server is running";
public static final Integer CAMEL_SOURCE_REDISSOURCE_KAMELET_REDIS_PORT_DEFAULT = null;
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_COMMAND_CONF = "camel.kamelet.redis-source.command";
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_COMMAND_DOC = "Redis Command";
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_COMMAND_DEFAULT = "SUBSCRIBE";
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_CHANNELS_CONF = "camel.kamelet.redis-source.channels";
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_CHANNELS_DOC = "Redis Channels";
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_CHANNELS_DEFAULT = "one";
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_SERIALIZER_CONF = "camel.kamelet.redis-source.serializer";
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_SERIALIZER_DOC = "RedisSerializer fully qualified name implementation";
public static final String CAMEL_SOURCE_REDISSOURCE_KAMELET_SERIALIZER_DEFAULT = "org.springframework.data.redis.serializer.StringRedisSerializer";
public CamelRedissourceSourceConnectorConfig(
ConfigDef config,
Map<String, String> parsedConfig) {
super(config, parsedConfig);
}
public CamelRedissourceSourceConnectorConfig(
Map<String, String> parsedConfig) {
this(conf(), parsedConfig);
}
public static ConfigDef conf() {
ConfigDef conf = new ConfigDef(CamelSourceConnectorConfig.conf());
conf.define(CAMEL_SOURCE_REDISSOURCE_KAMELET_REDIS_HOST_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_REDISSOURCE_KAMELET_REDIS_HOST_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_REDISSOURCE_KAMELET_REDIS_HOST_DOC);
conf.define(CAMEL_SOURCE_REDISSOURCE_KAMELET_REDIS_PORT_CONF, ConfigDef.Type.INT, CAMEL_SOURCE_REDISSOURCE_KAMELET_REDIS_PORT_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_REDISSOURCE_KAMELET_REDIS_PORT_DOC);
conf.define(CAMEL_SOURCE_REDISSOURCE_KAMELET_COMMAND_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_REDISSOURCE_KAMELET_COMMAND_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_REDISSOURCE_KAMELET_COMMAND_DOC);
conf.define(CAMEL_SOURCE_REDISSOURCE_KAMELET_CHANNELS_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_REDISSOURCE_KAMELET_CHANNELS_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_REDISSOURCE_KAMELET_CHANNELS_DOC);
conf.define(CAMEL_SOURCE_REDISSOURCE_KAMELET_SERIALIZER_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_REDISSOURCE_KAMELET_SERIALIZER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_REDISSOURCE_KAMELET_SERIALIZER_DOC);
return conf;
}
} | 8,470 |
0 | Create_ds/camel-kafka-connector/connectors/camel-mysql-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-mysql-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/mysqlsource/CamelMysqlsourceSourceTask.java | /*
* 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.kafkaconnector.mysqlsource;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
import org.apache.camel.kafkaconnector.CamelSourceTask;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelMysqlsourceSourceTask extends CamelSourceTask {
@Override
protected CamelSourceConnectorConfig getCamelSourceConnectorConfig(
Map<String, String> props) {
return new CamelMysqlsourceSourceConnectorConfig(props);
}
@Override
protected String getSourceKamelet() {
return "kamelet:mysql-source";
}
} | 8,471 |
0 | Create_ds/camel-kafka-connector/connectors/camel-mysql-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-mysql-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/mysqlsource/CamelMysqlsourceSourceConnectorConfig.java | /*
* 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.kafkaconnector.mysqlsource;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
import org.apache.kafka.common.config.ConfigDef;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelMysqlsourceSourceConnectorConfig
extends
CamelSourceConnectorConfig {
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_SERVER_NAME_CONF = "camel.kamelet.mysql-source.serverName";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_SERVER_NAME_DOC = "The server name for the data source. Example: localhost";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_SERVER_NAME_DEFAULT = null;
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_SERVER_PORT_CONF = "camel.kamelet.mysql-source.serverPort";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_SERVER_PORT_DOC = "The server port for the data source.";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_SERVER_PORT_DEFAULT = "3306";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_USERNAME_CONF = "camel.kamelet.mysql-source.username";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_USERNAME_DOC = "The username to access a secured MySQL Database.";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_USERNAME_DEFAULT = null;
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_PASSWORD_CONF = "camel.kamelet.mysql-source.password";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_PASSWORD_DOC = "The password to access a secured MySQL Database.";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_PASSWORD_DEFAULT = null;
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_QUERY_CONF = "camel.kamelet.mysql-source.query";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_QUERY_DOC = "The query to execute against the MySQL Database. Example: INSERT INTO accounts (username,city) VALUES (:#username,:#city)";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_QUERY_DEFAULT = null;
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_DATABASE_NAME_CONF = "camel.kamelet.mysql-source.databaseName";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_DATABASE_NAME_DOC = "The name of the MySQL Database.";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_DATABASE_NAME_DEFAULT = null;
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_CONSUMED_QUERY_CONF = "camel.kamelet.mysql-source.consumedQuery";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_CONSUMED_QUERY_DOC = "A query to run on a tuple consumed. Example: DELETE FROM accounts where user_id = :#user_id";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_CONSUMED_QUERY_DEFAULT = null;
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_DELAY_CONF = "camel.kamelet.mysql-source.delay";
public static final String CAMEL_SOURCE_MYSQLSOURCE_KAMELET_DELAY_DOC = "The number of milliseconds before the next poll";
public static final Integer CAMEL_SOURCE_MYSQLSOURCE_KAMELET_DELAY_DEFAULT = 500;
public CamelMysqlsourceSourceConnectorConfig(
ConfigDef config,
Map<String, String> parsedConfig) {
super(config, parsedConfig);
}
public CamelMysqlsourceSourceConnectorConfig(
Map<String, String> parsedConfig) {
this(conf(), parsedConfig);
}
public static ConfigDef conf() {
ConfigDef conf = new ConfigDef(CamelSourceConnectorConfig.conf());
conf.define(CAMEL_SOURCE_MYSQLSOURCE_KAMELET_SERVER_NAME_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_SERVER_NAME_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_SERVER_NAME_DOC);
conf.define(CAMEL_SOURCE_MYSQLSOURCE_KAMELET_SERVER_PORT_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_SERVER_PORT_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_SERVER_PORT_DOC);
conf.define(CAMEL_SOURCE_MYSQLSOURCE_KAMELET_USERNAME_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_USERNAME_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_USERNAME_DOC);
conf.define(CAMEL_SOURCE_MYSQLSOURCE_KAMELET_PASSWORD_CONF, ConfigDef.Type.PASSWORD, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_PASSWORD_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_PASSWORD_DOC);
conf.define(CAMEL_SOURCE_MYSQLSOURCE_KAMELET_QUERY_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_QUERY_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_QUERY_DOC);
conf.define(CAMEL_SOURCE_MYSQLSOURCE_KAMELET_DATABASE_NAME_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_DATABASE_NAME_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_DATABASE_NAME_DOC);
conf.define(CAMEL_SOURCE_MYSQLSOURCE_KAMELET_CONSUMED_QUERY_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_CONSUMED_QUERY_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_CONSUMED_QUERY_DOC);
conf.define(CAMEL_SOURCE_MYSQLSOURCE_KAMELET_DELAY_CONF, ConfigDef.Type.INT, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_DELAY_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_MYSQLSOURCE_KAMELET_DELAY_DOC);
return conf;
}
} | 8,472 |
0 | Create_ds/camel-kafka-connector/connectors/camel-mysql-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-mysql-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/mysqlsource/CamelMysqlsourceSourceConnector.java | /*
* 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.kafkaconnector.mysqlsource;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnector;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.connector.Task;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelMysqlsourceSourceConnector extends CamelSourceConnector {
@Override
public ConfigDef config() {
return CamelMysqlsourceSourceConnectorConfig.conf();
}
@Override
public Class<? extends Task> taskClass() {
return CamelMysqlsourceSourceTask.class;
}
} | 8,473 |
0 | Create_ds/camel-kafka-connector/connectors/camel-sftp-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-sftp-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/sftpsource/CamelSftpsourceSourceConnectorConfig.java | /*
* 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.kafkaconnector.sftpsource;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
import org.apache.kafka.common.config.ConfigDef;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelSftpsourceSourceConnectorConfig
extends
CamelSourceConnectorConfig {
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_CONNECTION_HOST_CONF = "camel.kamelet.sftp-source.connectionHost";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_CONNECTION_HOST_DOC = "The hostname of the SFTP server.";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_CONNECTION_HOST_DEFAULT = null;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_CONNECTION_PORT_CONF = "camel.kamelet.sftp-source.connectionPort";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_CONNECTION_PORT_DOC = "The port of the FTP server.";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_CONNECTION_PORT_DEFAULT = "22";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_USERNAME_CONF = "camel.kamelet.sftp-source.username";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_USERNAME_DOC = "The username to access the SFTP server.";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_USERNAME_DEFAULT = null;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PASSWORD_CONF = "camel.kamelet.sftp-source.password";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PASSWORD_DOC = "The password to access the SFTP server.";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PASSWORD_DEFAULT = null;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_DIRECTORY_NAME_CONF = "camel.kamelet.sftp-source.directoryName";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_DIRECTORY_NAME_DOC = "The starting directory.";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_DIRECTORY_NAME_DEFAULT = null;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PASSIVE_MODE_CONF = "camel.kamelet.sftp-source.passiveMode";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PASSIVE_MODE_DOC = "Sets the passive mode connection.";
public static final Boolean CAMEL_SOURCE_SFTPSOURCE_KAMELET_PASSIVE_MODE_DEFAULT = false;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_RECURSIVE_CONF = "camel.kamelet.sftp-source.recursive";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_RECURSIVE_DOC = "If a directory, look for files in all sub-directories as well.";
public static final Boolean CAMEL_SOURCE_SFTPSOURCE_KAMELET_RECURSIVE_DEFAULT = false;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_IDEMPOTENT_CONF = "camel.kamelet.sftp-source.idempotent";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_IDEMPOTENT_DOC = "Skip already-processed files.";
public static final Boolean CAMEL_SOURCE_SFTPSOURCE_KAMELET_IDEMPOTENT_DEFAULT = true;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_IGNORE_FILE_NOT_FOUND_OR_PERMISSION_ERROR_CONF = "camel.kamelet.sftp-source.ignoreFileNotFoundOrPermissionError";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_IGNORE_FILE_NOT_FOUND_OR_PERMISSION_ERROR_DOC = "Whether to ignore when (trying to list files in directories or when downloading a file), which does not exist or due to permission error. By default when a directory or file does not exists or insufficient permission, then an exception is thrown. Setting this option to true allows to ignore that instead.";
public static final Boolean CAMEL_SOURCE_SFTPSOURCE_KAMELET_IGNORE_FILE_NOT_FOUND_OR_PERMISSION_ERROR_DEFAULT = false;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_BINARY_CONF = "camel.kamelet.sftp-source.binary";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_BINARY_DOC = "Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false).";
public static final Boolean CAMEL_SOURCE_SFTPSOURCE_KAMELET_BINARY_DEFAULT = false;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_FILE_CONF = "camel.kamelet.sftp-source.privateKeyFile";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_FILE_DOC = "Set the private key file so that the SFTP endpoint can do private key verification.";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_FILE_DEFAULT = null;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_PASSPHRASE_CONF = "camel.kamelet.sftp-source.privateKeyPassphrase";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_PASSPHRASE_DOC = "Set the private key file passphrase so that the SFTP endpoint can do private key verification.";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_PASSPHRASE_DEFAULT = null;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_URI_CONF = "camel.kamelet.sftp-source.privateKeyUri";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_URI_DOC = "Set the private key file (loaded from classpath by default) so that the SFTP endpoint can do private key verification.";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_URI_DEFAULT = null;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_STRICT_HOST_KEY_CHECKING_CONF = "camel.kamelet.sftp-source.strictHostKeyChecking";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_STRICT_HOST_KEY_CHECKING_DOC = "Sets whether to use strict host key checking.";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_STRICT_HOST_KEY_CHECKING_DEFAULT = "false";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_USE_USER_KNOWN_HOSTS_FILE_CONF = "camel.kamelet.sftp-source.useUserKnownHostsFile";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_USE_USER_KNOWN_HOSTS_FILE_DOC = "If knownHostFile has not been explicit configured then use the host file from System.getProperty(user.home)/.ssh/known_hosts.";
public static final Boolean CAMEL_SOURCE_SFTPSOURCE_KAMELET_USE_USER_KNOWN_HOSTS_FILE_DEFAULT = true;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_AUTO_CREATE_CONF = "camel.kamelet.sftp-source.autoCreate";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_AUTO_CREATE_DOC = "Automatically create starting directory.";
public static final Boolean CAMEL_SOURCE_SFTPSOURCE_KAMELET_AUTO_CREATE_DEFAULT = true;
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_DELETE_CONF = "camel.kamelet.sftp-source.delete";
public static final String CAMEL_SOURCE_SFTPSOURCE_KAMELET_DELETE_DOC = "If true, the file will be deleted after it is processed successfully.";
public static final Boolean CAMEL_SOURCE_SFTPSOURCE_KAMELET_DELETE_DEFAULT = false;
public CamelSftpsourceSourceConnectorConfig(
ConfigDef config,
Map<String, String> parsedConfig) {
super(config, parsedConfig);
}
public CamelSftpsourceSourceConnectorConfig(Map<String, String> parsedConfig) {
this(conf(), parsedConfig);
}
public static ConfigDef conf() {
ConfigDef conf = new ConfigDef(CamelSourceConnectorConfig.conf());
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_CONNECTION_HOST_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_SFTPSOURCE_KAMELET_CONNECTION_HOST_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_SFTPSOURCE_KAMELET_CONNECTION_HOST_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_CONNECTION_PORT_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_SFTPSOURCE_KAMELET_CONNECTION_PORT_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_SFTPSOURCE_KAMELET_CONNECTION_PORT_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_USERNAME_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_SFTPSOURCE_KAMELET_USERNAME_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_USERNAME_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_PASSWORD_CONF, ConfigDef.Type.PASSWORD, CAMEL_SOURCE_SFTPSOURCE_KAMELET_PASSWORD_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_PASSWORD_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_DIRECTORY_NAME_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_SFTPSOURCE_KAMELET_DIRECTORY_NAME_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_SFTPSOURCE_KAMELET_DIRECTORY_NAME_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_PASSIVE_MODE_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_SFTPSOURCE_KAMELET_PASSIVE_MODE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_PASSIVE_MODE_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_RECURSIVE_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_SFTPSOURCE_KAMELET_RECURSIVE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_RECURSIVE_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_IDEMPOTENT_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_SFTPSOURCE_KAMELET_IDEMPOTENT_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_IDEMPOTENT_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_IGNORE_FILE_NOT_FOUND_OR_PERMISSION_ERROR_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_SFTPSOURCE_KAMELET_IGNORE_FILE_NOT_FOUND_OR_PERMISSION_ERROR_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_IGNORE_FILE_NOT_FOUND_OR_PERMISSION_ERROR_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_BINARY_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_SFTPSOURCE_KAMELET_BINARY_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_BINARY_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_FILE_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_FILE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_FILE_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_PASSPHRASE_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_PASSPHRASE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_PASSPHRASE_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_URI_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_URI_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_PRIVATE_KEY_URI_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_STRICT_HOST_KEY_CHECKING_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_SFTPSOURCE_KAMELET_STRICT_HOST_KEY_CHECKING_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_STRICT_HOST_KEY_CHECKING_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_USE_USER_KNOWN_HOSTS_FILE_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_SFTPSOURCE_KAMELET_USE_USER_KNOWN_HOSTS_FILE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_USE_USER_KNOWN_HOSTS_FILE_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_AUTO_CREATE_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_SFTPSOURCE_KAMELET_AUTO_CREATE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_AUTO_CREATE_DOC);
conf.define(CAMEL_SOURCE_SFTPSOURCE_KAMELET_DELETE_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_SFTPSOURCE_KAMELET_DELETE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_SFTPSOURCE_KAMELET_DELETE_DOC);
return conf;
}
} | 8,474 |
0 | Create_ds/camel-kafka-connector/connectors/camel-sftp-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-sftp-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/sftpsource/CamelSftpsourceSourceConnector.java | /*
* 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.kafkaconnector.sftpsource;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnector;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.connector.Task;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelSftpsourceSourceConnector extends CamelSourceConnector {
@Override
public ConfigDef config() {
return CamelSftpsourceSourceConnectorConfig.conf();
}
@Override
public Class<? extends Task> taskClass() {
return CamelSftpsourceSourceTask.class;
}
} | 8,475 |
0 | Create_ds/camel-kafka-connector/connectors/camel-sftp-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-sftp-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/sftpsource/CamelSftpsourceSourceTask.java | /*
* 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.kafkaconnector.sftpsource;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
import org.apache.camel.kafkaconnector.CamelSourceTask;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelSftpsourceSourceTask extends CamelSourceTask {
@Override
protected CamelSourceConnectorConfig getCamelSourceConnectorConfig(
Map<String, String> props) {
return new CamelSftpsourceSourceConnectorConfig(props);
}
@Override
protected String getSourceKamelet() {
return "kamelet:sftp-source";
}
} | 8,476 |
0 | Create_ds/camel-kafka-connector/connectors/camel-scp-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-scp-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/scpsink/CamelScpsinkSinkConnectorConfig.java | /*
* 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.kafkaconnector.scpsink;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnectorConfig;
import org.apache.kafka.common.config.ConfigDef;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelScpsinkSinkConnectorConfig extends CamelSinkConnectorConfig {
public static final String CAMEL_SINK_SCPSINK_KAMELET_SERVER_NAME_CONF = "camel.kamelet.scp-sink.serverName";
public static final String CAMEL_SINK_SCPSINK_KAMELET_SERVER_NAME_DOC = "The hostname of the FTP server";
public static final String CAMEL_SINK_SCPSINK_KAMELET_SERVER_NAME_DEFAULT = null;
public static final String CAMEL_SINK_SCPSINK_KAMELET_SERVER_PORT_CONF = "camel.kamelet.scp-sink.serverPort";
public static final String CAMEL_SINK_SCPSINK_KAMELET_SERVER_PORT_DOC = "The port of the FTP server";
public static final String CAMEL_SINK_SCPSINK_KAMELET_SERVER_PORT_DEFAULT = null;
public static final String CAMEL_SINK_SCPSINK_KAMELET_USERNAME_CONF = "camel.kamelet.scp-sink.username";
public static final String CAMEL_SINK_SCPSINK_KAMELET_USERNAME_DOC = "Username for accessing FTP Server";
public static final String CAMEL_SINK_SCPSINK_KAMELET_USERNAME_DEFAULT = null;
public static final String CAMEL_SINK_SCPSINK_KAMELET_PASSWORD_CONF = "camel.kamelet.scp-sink.password";
public static final String CAMEL_SINK_SCPSINK_KAMELET_PASSWORD_DOC = "Password for accessing FTP Server";
public static final String CAMEL_SINK_SCPSINK_KAMELET_PASSWORD_DEFAULT = null;
public static final String CAMEL_SINK_SCPSINK_KAMELET_PRIVATE_KEY_FILE_CONF = "camel.kamelet.scp-sink.privateKeyFile";
public static final String CAMEL_SINK_SCPSINK_KAMELET_PRIVATE_KEY_FILE_DOC = "Set the private key file so that the SFTP endpoint can do private key verification.";
public static final String CAMEL_SINK_SCPSINK_KAMELET_PRIVATE_KEY_FILE_DEFAULT = null;
public static final String CAMEL_SINK_SCPSINK_KAMELET_PRIVATE_KEY_PASSPHRASE_CONF = "camel.kamelet.scp-sink.privateKeyPassphrase";
public static final String CAMEL_SINK_SCPSINK_KAMELET_PRIVATE_KEY_PASSPHRASE_DOC = "Set the private key file passphrase so that the SFTP endpoint can do private key verification.";
public static final String CAMEL_SINK_SCPSINK_KAMELET_PRIVATE_KEY_PASSPHRASE_DEFAULT = null;
public static final String CAMEL_SINK_SCPSINK_KAMELET_STRICT_HOST_KEY_CHECKING_CONF = "camel.kamelet.scp-sink.strictHostKeyChecking";
public static final String CAMEL_SINK_SCPSINK_KAMELET_STRICT_HOST_KEY_CHECKING_DOC = "Sets whether to use strict host key checking.";
public static final String CAMEL_SINK_SCPSINK_KAMELET_STRICT_HOST_KEY_CHECKING_DEFAULT = "false";
public static final String CAMEL_SINK_SCPSINK_KAMELET_USE_USER_KNOWN_HOSTS_FILE_CONF = "camel.kamelet.scp-sink.useUserKnownHostsFile";
public static final String CAMEL_SINK_SCPSINK_KAMELET_USE_USER_KNOWN_HOSTS_FILE_DOC = "If knownHostFile has not been explicit configured then use the host file from System.getProperty(user.home)/.ssh/known_hosts.";
public static final Boolean CAMEL_SINK_SCPSINK_KAMELET_USE_USER_KNOWN_HOSTS_FILE_DEFAULT = true;
public CamelScpsinkSinkConnectorConfig(
ConfigDef config,
Map<String, String> parsedConfig) {
super(config, parsedConfig);
}
public CamelScpsinkSinkConnectorConfig(Map<String, String> parsedConfig) {
this(conf(), parsedConfig);
}
public static ConfigDef conf() {
ConfigDef conf = new ConfigDef(CamelSinkConnectorConfig.conf());
conf.define(CAMEL_SINK_SCPSINK_KAMELET_SERVER_NAME_CONF, ConfigDef.Type.STRING, CAMEL_SINK_SCPSINK_KAMELET_SERVER_NAME_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SINK_SCPSINK_KAMELET_SERVER_NAME_DOC);
conf.define(CAMEL_SINK_SCPSINK_KAMELET_SERVER_PORT_CONF, ConfigDef.Type.STRING, CAMEL_SINK_SCPSINK_KAMELET_SERVER_PORT_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SINK_SCPSINK_KAMELET_SERVER_PORT_DOC);
conf.define(CAMEL_SINK_SCPSINK_KAMELET_USERNAME_CONF, ConfigDef.Type.STRING, CAMEL_SINK_SCPSINK_KAMELET_USERNAME_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_SCPSINK_KAMELET_USERNAME_DOC);
conf.define(CAMEL_SINK_SCPSINK_KAMELET_PASSWORD_CONF, ConfigDef.Type.PASSWORD, CAMEL_SINK_SCPSINK_KAMELET_PASSWORD_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_SCPSINK_KAMELET_PASSWORD_DOC);
conf.define(CAMEL_SINK_SCPSINK_KAMELET_PRIVATE_KEY_FILE_CONF, ConfigDef.Type.STRING, CAMEL_SINK_SCPSINK_KAMELET_PRIVATE_KEY_FILE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_SCPSINK_KAMELET_PRIVATE_KEY_FILE_DOC);
conf.define(CAMEL_SINK_SCPSINK_KAMELET_PRIVATE_KEY_PASSPHRASE_CONF, ConfigDef.Type.STRING, CAMEL_SINK_SCPSINK_KAMELET_PRIVATE_KEY_PASSPHRASE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_SCPSINK_KAMELET_PRIVATE_KEY_PASSPHRASE_DOC);
conf.define(CAMEL_SINK_SCPSINK_KAMELET_STRICT_HOST_KEY_CHECKING_CONF, ConfigDef.Type.STRING, CAMEL_SINK_SCPSINK_KAMELET_STRICT_HOST_KEY_CHECKING_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_SCPSINK_KAMELET_STRICT_HOST_KEY_CHECKING_DOC);
conf.define(CAMEL_SINK_SCPSINK_KAMELET_USE_USER_KNOWN_HOSTS_FILE_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_SCPSINK_KAMELET_USE_USER_KNOWN_HOSTS_FILE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_SCPSINK_KAMELET_USE_USER_KNOWN_HOSTS_FILE_DOC);
return conf;
}
} | 8,477 |
0 | Create_ds/camel-kafka-connector/connectors/camel-scp-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-scp-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/scpsink/CamelScpsinkSinkTask.java | /*
* 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.kafkaconnector.scpsink;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnectorConfig;
import org.apache.camel.kafkaconnector.CamelSinkTask;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelScpsinkSinkTask extends CamelSinkTask {
@Override
protected CamelSinkConnectorConfig getCamelSinkConnectorConfig(
Map<String, String> props) {
return new CamelScpsinkSinkConnectorConfig(props);
}
@Override
protected String getSinkKamelet() {
return "kamelet:scp-sink";
}
} | 8,478 |
0 | Create_ds/camel-kafka-connector/connectors/camel-scp-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-scp-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/scpsink/CamelScpsinkSinkConnector.java | /*
* 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.kafkaconnector.scpsink;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnector;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.connector.Task;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelScpsinkSinkConnector extends CamelSinkConnector {
@Override
public ConfigDef config() {
return CamelScpsinkSinkConnectorConfig.conf();
}
@Override
public Class<? extends Task> taskClass() {
return CamelScpsinkSinkTask.class;
}
} | 8,479 |
0 | Create_ds/camel-kafka-connector/connectors/camel-kafka-scram-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-kafka-scram-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/kafkascramsource/CamelKafkascramsourceSourceConnector.java | /*
* 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.kafkaconnector.kafkascramsource;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnector;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.connector.Task;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelKafkascramsourceSourceConnector
extends
CamelSourceConnector {
@Override
public ConfigDef config() {
return CamelKafkascramsourceSourceConnectorConfig.conf();
}
@Override
public Class<? extends Task> taskClass() {
return CamelKafkascramsourceSourceTask.class;
}
} | 8,480 |
0 | Create_ds/camel-kafka-connector/connectors/camel-kafka-scram-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-kafka-scram-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/kafkascramsource/CamelKafkascramsourceSourceConnectorConfig.java | /*
* 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.kafkaconnector.kafkascramsource;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
import org.apache.kafka.common.config.ConfigDef;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelKafkascramsourceSourceConnectorConfig
extends
CamelSourceConnectorConfig {
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_TOPIC_CONF = "camel.kamelet.kafka-scram-source.topic";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_TOPIC_DOC = "Comma separated list of Kafka topic names";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_TOPIC_DEFAULT = null;
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_BOOTSTRAP_SERVERS_CONF = "camel.kamelet.kafka-scram-source.bootstrapServers";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_BOOTSTRAP_SERVERS_DOC = "Comma separated list of Kafka Broker URLs";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_BOOTSTRAP_SERVERS_DEFAULT = null;
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_SECURITY_PROTOCOL_CONF = "camel.kamelet.kafka-scram-source.securityProtocol";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_SECURITY_PROTOCOL_DOC = "Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_SECURITY_PROTOCOL_DEFAULT = "SASL_SSL";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_SASL_MECHANISM_CONF = "camel.kamelet.kafka-scram-source.saslMechanism";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_SASL_MECHANISM_DOC = "The Simple Authentication and Security Layer (SASL) Mechanism used.";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_SASL_MECHANISM_DEFAULT = "SCRAM-SHA-512";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_USER_CONF = "camel.kamelet.kafka-scram-source.user";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_USER_DOC = "Username to authenticate to Kafka";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_USER_DEFAULT = null;
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_PASSWORD_CONF = "camel.kamelet.kafka-scram-source.password";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_PASSWORD_DOC = "Password to authenticate to kafka";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_PASSWORD_DEFAULT = null;
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_AUTO_COMMIT_ENABLE_CONF = "camel.kamelet.kafka-scram-source.autoCommitEnable";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_AUTO_COMMIT_ENABLE_DOC = "If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer";
public static final Boolean CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_AUTO_COMMIT_ENABLE_DEFAULT = true;
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_ALLOW_MANUAL_COMMIT_CONF = "camel.kamelet.kafka-scram-source.allowManualCommit";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_ALLOW_MANUAL_COMMIT_DOC = "Whether to allow doing manual commits";
public static final Boolean CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_ALLOW_MANUAL_COMMIT_DEFAULT = false;
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_POLL_ON_ERROR_CONF = "camel.kamelet.kafka-scram-source.pollOnError";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_POLL_ON_ERROR_DOC = "What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of DISCARD, ERROR_HANDLER, RECONNECT, RETRY, STOP";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_POLL_ON_ERROR_DEFAULT = "ERROR_HANDLER";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_AUTO_OFFSET_RESET_CONF = "camel.kamelet.kafka-scram-source.autoOffsetReset";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_AUTO_OFFSET_RESET_DOC = "What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_AUTO_OFFSET_RESET_DEFAULT = "latest";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_CONSUMER_GROUP_CONF = "camel.kamelet.kafka-scram-source.consumerGroup";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_CONSUMER_GROUP_DOC = "A string that uniquely identifies the group of consumers to which this source belongs Example: my-group-id";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_CONSUMER_GROUP_DEFAULT = null;
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_DESERIALIZE_HEADERS_CONF = "camel.kamelet.kafka-scram-source.deserializeHeaders";
public static final String CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_DESERIALIZE_HEADERS_DOC = "When enabled the Kamelet source will deserialize all message headers to String representation.";
public static final Boolean CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_DESERIALIZE_HEADERS_DEFAULT = true;
public CamelKafkascramsourceSourceConnectorConfig(
ConfigDef config,
Map<String, String> parsedConfig) {
super(config, parsedConfig);
}
public CamelKafkascramsourceSourceConnectorConfig(
Map<String, String> parsedConfig) {
this(conf(), parsedConfig);
}
public static ConfigDef conf() {
ConfigDef conf = new ConfigDef(CamelSourceConnectorConfig.conf());
conf.define(CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_TOPIC_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_TOPIC_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_TOPIC_DOC);
conf.define(CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_BOOTSTRAP_SERVERS_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_BOOTSTRAP_SERVERS_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_BOOTSTRAP_SERVERS_DOC);
conf.define(CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_SECURITY_PROTOCOL_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_SECURITY_PROTOCOL_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_SECURITY_PROTOCOL_DOC);
conf.define(CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_SASL_MECHANISM_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_SASL_MECHANISM_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_SASL_MECHANISM_DOC);
conf.define(CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_USER_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_USER_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_USER_DOC);
conf.define(CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_PASSWORD_CONF, ConfigDef.Type.PASSWORD, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_PASSWORD_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_PASSWORD_DOC);
conf.define(CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_AUTO_COMMIT_ENABLE_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_AUTO_COMMIT_ENABLE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_AUTO_COMMIT_ENABLE_DOC);
conf.define(CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_ALLOW_MANUAL_COMMIT_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_ALLOW_MANUAL_COMMIT_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_ALLOW_MANUAL_COMMIT_DOC);
conf.define(CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_POLL_ON_ERROR_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_POLL_ON_ERROR_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_POLL_ON_ERROR_DOC);
conf.define(CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_AUTO_OFFSET_RESET_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_AUTO_OFFSET_RESET_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_AUTO_OFFSET_RESET_DOC);
conf.define(CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_CONSUMER_GROUP_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_CONSUMER_GROUP_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_CONSUMER_GROUP_DOC);
conf.define(CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_DESERIALIZE_HEADERS_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_DESERIALIZE_HEADERS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASCRAMSOURCE_KAMELET_DESERIALIZE_HEADERS_DOC);
return conf;
}
} | 8,481 |
0 | Create_ds/camel-kafka-connector/connectors/camel-kafka-scram-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-kafka-scram-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/kafkascramsource/CamelKafkascramsourceSourceTask.java | /*
* 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.kafkaconnector.kafkascramsource;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
import org.apache.camel.kafkaconnector.CamelSourceTask;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelKafkascramsourceSourceTask extends CamelSourceTask {
@Override
protected CamelSourceConnectorConfig getCamelSourceConnectorConfig(
Map<String, String> props) {
return new CamelKafkascramsourceSourceConnectorConfig(props);
}
@Override
protected String getSourceKamelet() {
return "kamelet:kafka-scram-source";
}
} | 8,482 |
0 | Create_ds/camel-kafka-connector/connectors/camel-cxfrs-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-cxfrs-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/cxfrs/CamelCxfrsSourceConnectorConfig.java | /*
* 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.kafkaconnector.cxfrs;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
import org.apache.kafka.common.config.ConfigDef;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelCxfrsSourceConnectorConfig
extends
CamelSourceConnectorConfig {
public static final String CAMEL_SOURCE_CXFRS_PATH_BEAN_ID_CONF = "camel.source.path.beanId";
public static final String CAMEL_SOURCE_CXFRS_PATH_BEAN_ID_DOC = "To lookup an existing configured CxfRsEndpoint. Must used bean: as prefix.";
public static final String CAMEL_SOURCE_CXFRS_PATH_BEAN_ID_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_PATH_ADDRESS_CONF = "camel.source.path.address";
public static final String CAMEL_SOURCE_CXFRS_PATH_ADDRESS_DOC = "The service publish address.";
public static final String CAMEL_SOURCE_CXFRS_PATH_ADDRESS_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_FEATURES_CONF = "camel.source.endpoint.features";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_FEATURES_DOC = "Set the feature list to the CxfRs endpoint.";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_FEATURES_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_LOGGING_FEATURE_ENABLED_CONF = "camel.source.endpoint.loggingFeatureEnabled";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_LOGGING_FEATURE_ENABLED_DOC = "This option enables CXF Logging Feature which writes inbound and outbound REST messages to log.";
public static final Boolean CAMEL_SOURCE_CXFRS_ENDPOINT_LOGGING_FEATURE_ENABLED_DEFAULT = false;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_LOGGING_SIZE_LIMIT_CONF = "camel.source.endpoint.loggingSizeLimit";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_LOGGING_SIZE_LIMIT_DOC = "To limit the total size of number of bytes the logger will output when logging feature has been enabled.";
public static final Integer CAMEL_SOURCE_CXFRS_ENDPOINT_LOGGING_SIZE_LIMIT_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_MODEL_REF_CONF = "camel.source.endpoint.modelRef";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_MODEL_REF_DOC = "This option is used to specify the model file which is useful for the resource class without annotation. When using this option, then the service class can be omitted, to emulate document-only endpoints";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_MODEL_REF_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_PROVIDERS_CONF = "camel.source.endpoint.providers";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_PROVIDERS_DOC = "Set custom JAX-RS provider(s) list to the CxfRs endpoint. You can specify a string with a list of providers to lookup in the registy separated by comma.";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_PROVIDERS_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_RESOURCE_CLASSES_CONF = "camel.source.endpoint.resourceClasses";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_RESOURCE_CLASSES_DOC = "The resource classes which you want to export as REST service. Multiple classes can be separated by comma.";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_RESOURCE_CLASSES_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_SCHEMA_LOCATIONS_CONF = "camel.source.endpoint.schemaLocations";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_SCHEMA_LOCATIONS_DOC = "Sets the locations of the schema(s) which can be used to validate the incoming XML or JAXB-driven JSON.";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_SCHEMA_LOCATIONS_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_SKIP_FAULT_LOGGING_CONF = "camel.source.endpoint.skipFaultLogging";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_SKIP_FAULT_LOGGING_DOC = "This option controls whether the PhaseInterceptorChain skips logging the Fault that it catches.";
public static final Boolean CAMEL_SOURCE_CXFRS_ENDPOINT_SKIP_FAULT_LOGGING_DEFAULT = false;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_BINDING_STYLE_CONF = "camel.source.endpoint.bindingStyle";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_BINDING_STYLE_DOC = "Sets how requests and responses will be mapped to/from Camel. Two values are possible: SimpleConsumer: This binding style processes request parameters, multiparts, etc. and maps them to IN headers, IN attachments and to the message body. It aims to eliminate low-level processing of org.apache.cxf.message.MessageContentsList. It also also adds more flexibility and simplicity to the response mapping. Only available for consumers. Default: The default style. For consumers this passes on a MessageContentsList to the route, requiring low-level processing in the route. This is the traditional binding style, which simply dumps the org.apache.cxf.message.MessageContentsList coming in from the CXF stack onto the IN message body. The user is then responsible for processing it according to the contract defined by the JAX-RS method signature. Custom: allows you to specify a custom binding through the binding option. One of: [SimpleConsumer] [Default] [Custom]";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_BINDING_STYLE_DEFAULT = "Default";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_PUBLISHED_ENDPOINT_URL_CONF = "camel.source.endpoint.publishedEndpointUrl";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_PUBLISHED_ENDPOINT_URL_DOC = "This option can override the endpointUrl that published from the WADL which can be accessed with resource address url plus _wadl";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_PUBLISHED_ENDPOINT_URL_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_BRIDGE_ERROR_HANDLER_CONF = "camel.source.endpoint.bridgeErrorHandler";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_BRIDGE_ERROR_HANDLER_DOC = "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.";
public static final Boolean CAMEL_SOURCE_CXFRS_ENDPOINT_BRIDGE_ERROR_HANDLER_DEFAULT = false;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_EXCEPTION_HANDLER_CONF = "camel.source.endpoint.exceptionHandler";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_EXCEPTION_HANDLER_DOC = "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored.";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_EXCEPTION_HANDLER_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_EXCHANGE_PATTERN_CONF = "camel.source.endpoint.exchangePattern";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_EXCHANGE_PATTERN_DOC = "Sets the exchange pattern when the consumer creates an exchange. One of: [InOnly] [InOut]";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_EXCHANGE_PATTERN_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_SERVICE_BEANS_CONF = "camel.source.endpoint.serviceBeans";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_SERVICE_BEANS_DOC = "The service beans (the bean ids to lookup in the registry) which you want to export as REST service. Multiple beans can be separated by comma";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_SERVICE_BEANS_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_BINDING_CONF = "camel.source.endpoint.binding";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_BINDING_DOC = "To use a custom CxfBinding to control the binding between Camel Message and CXF Message.";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_BINDING_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_BUS_CONF = "camel.source.endpoint.bus";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_BUS_DOC = "To use a custom configured CXF Bus.";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_BUS_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_CONTINUATION_TIMEOUT_CONF = "camel.source.endpoint.continuationTimeout";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_CONTINUATION_TIMEOUT_DOC = "This option is used to set the CXF continuation timeout which could be used in CxfConsumer by default when the CXF server is using Jetty or Servlet transport.";
public static final Long CAMEL_SOURCE_CXFRS_ENDPOINT_CONTINUATION_TIMEOUT_DEFAULT = 30000L;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_CXF_RS_CONFIGURER_CONF = "camel.source.endpoint.cxfRsConfigurer";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_CXF_RS_CONFIGURER_DOC = "This option could apply the implementation of org.apache.camel.component.cxf.jaxrs.CxfRsEndpointConfigurer which supports to configure the CXF endpoint in programmatic way. User can configure the CXF server and client by implementing configure{Server/Client} method of CxfEndpointConfigurer.";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_CXF_RS_CONFIGURER_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_DEFAULT_BUS_CONF = "camel.source.endpoint.defaultBus";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_DEFAULT_BUS_DOC = "Will set the default bus when CXF endpoint create a bus by itself";
public static final Boolean CAMEL_SOURCE_CXFRS_ENDPOINT_DEFAULT_BUS_DEFAULT = false;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_HEADER_FILTER_STRATEGY_CONF = "camel.source.endpoint.headerFilterStrategy";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_HEADER_FILTER_STRATEGY_DOC = "To use a custom HeaderFilterStrategy to filter header to and from Camel message.";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_HEADER_FILTER_STRATEGY_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_PERFORM_INVOCATION_CONF = "camel.source.endpoint.performInvocation";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_PERFORM_INVOCATION_DOC = "When the option is true, Camel will perform the invocation of the resource class instance and put the response object into the exchange for further processing.";
public static final Boolean CAMEL_SOURCE_CXFRS_ENDPOINT_PERFORM_INVOCATION_DEFAULT = false;
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_PROPAGATE_CONTEXTS_CONF = "camel.source.endpoint.propagateContexts";
public static final String CAMEL_SOURCE_CXFRS_ENDPOINT_PROPAGATE_CONTEXTS_DOC = "When the option is true, JAXRS UriInfo, HttpHeaders, Request and SecurityContext contexts will be available to custom CXFRS processors as typed Camel exchange properties. These contexts can be used to analyze the current requests using JAX-RS API.";
public static final Boolean CAMEL_SOURCE_CXFRS_ENDPOINT_PROPAGATE_CONTEXTS_DEFAULT = false;
public static final String CAMEL_SOURCE_CXFRS_COMPONENT_BRIDGE_ERROR_HANDLER_CONF = "camel.component.cxfrs.bridgeErrorHandler";
public static final String CAMEL_SOURCE_CXFRS_COMPONENT_BRIDGE_ERROR_HANDLER_DOC = "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.";
public static final Boolean CAMEL_SOURCE_CXFRS_COMPONENT_BRIDGE_ERROR_HANDLER_DEFAULT = false;
public static final String CAMEL_SOURCE_CXFRS_COMPONENT_AUTOWIRED_ENABLED_CONF = "camel.component.cxfrs.autowiredEnabled";
public static final String CAMEL_SOURCE_CXFRS_COMPONENT_AUTOWIRED_ENABLED_DOC = "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.";
public static final Boolean CAMEL_SOURCE_CXFRS_COMPONENT_AUTOWIRED_ENABLED_DEFAULT = true;
public static final String CAMEL_SOURCE_CXFRS_COMPONENT_HEADER_FILTER_STRATEGY_CONF = "camel.component.cxfrs.headerFilterStrategy";
public static final String CAMEL_SOURCE_CXFRS_COMPONENT_HEADER_FILTER_STRATEGY_DOC = "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message.";
public static final String CAMEL_SOURCE_CXFRS_COMPONENT_HEADER_FILTER_STRATEGY_DEFAULT = null;
public static final String CAMEL_SOURCE_CXFRS_COMPONENT_USE_GLOBAL_SSL_CONTEXT_PARAMETERS_CONF = "camel.component.cxfrs.useGlobalSslContextParameters";
public static final String CAMEL_SOURCE_CXFRS_COMPONENT_USE_GLOBAL_SSL_CONTEXT_PARAMETERS_DOC = "Enable usage of global SSL context parameters.";
public static final Boolean CAMEL_SOURCE_CXFRS_COMPONENT_USE_GLOBAL_SSL_CONTEXT_PARAMETERS_DEFAULT = false;
public CamelCxfrsSourceConnectorConfig(
ConfigDef config,
Map<String, String> parsedConfig) {
super(config, parsedConfig);
}
public CamelCxfrsSourceConnectorConfig(Map<String, String> parsedConfig) {
this(conf(), parsedConfig);
}
public static ConfigDef conf() {
ConfigDef conf = new ConfigDef(CamelSourceConnectorConfig.conf());
conf.define(CAMEL_SOURCE_CXFRS_PATH_BEAN_ID_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_PATH_BEAN_ID_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_PATH_BEAN_ID_DOC);
conf.define(CAMEL_SOURCE_CXFRS_PATH_ADDRESS_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_PATH_ADDRESS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_PATH_ADDRESS_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_FEATURES_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_FEATURES_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_FEATURES_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_LOGGING_FEATURE_ENABLED_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_CXFRS_ENDPOINT_LOGGING_FEATURE_ENABLED_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_LOGGING_FEATURE_ENABLED_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_LOGGING_SIZE_LIMIT_CONF, ConfigDef.Type.INT, CAMEL_SOURCE_CXFRS_ENDPOINT_LOGGING_SIZE_LIMIT_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_LOGGING_SIZE_LIMIT_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_MODEL_REF_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_MODEL_REF_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_MODEL_REF_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_PROVIDERS_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_PROVIDERS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_PROVIDERS_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_RESOURCE_CLASSES_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_RESOURCE_CLASSES_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_RESOURCE_CLASSES_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_SCHEMA_LOCATIONS_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_SCHEMA_LOCATIONS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_SCHEMA_LOCATIONS_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_SKIP_FAULT_LOGGING_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_CXFRS_ENDPOINT_SKIP_FAULT_LOGGING_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_SKIP_FAULT_LOGGING_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_BINDING_STYLE_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_BINDING_STYLE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_BINDING_STYLE_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_PUBLISHED_ENDPOINT_URL_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_PUBLISHED_ENDPOINT_URL_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_PUBLISHED_ENDPOINT_URL_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_BRIDGE_ERROR_HANDLER_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_CXFRS_ENDPOINT_BRIDGE_ERROR_HANDLER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_BRIDGE_ERROR_HANDLER_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_EXCEPTION_HANDLER_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_EXCEPTION_HANDLER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_EXCEPTION_HANDLER_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_EXCHANGE_PATTERN_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_EXCHANGE_PATTERN_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_EXCHANGE_PATTERN_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_SERVICE_BEANS_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_SERVICE_BEANS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_SERVICE_BEANS_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_BINDING_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_BINDING_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_BINDING_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_BUS_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_BUS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_BUS_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_CONTINUATION_TIMEOUT_CONF, ConfigDef.Type.LONG, CAMEL_SOURCE_CXFRS_ENDPOINT_CONTINUATION_TIMEOUT_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_CONTINUATION_TIMEOUT_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_CXF_RS_CONFIGURER_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_CXF_RS_CONFIGURER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_CXF_RS_CONFIGURER_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_DEFAULT_BUS_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_CXFRS_ENDPOINT_DEFAULT_BUS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_DEFAULT_BUS_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_HEADER_FILTER_STRATEGY_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_ENDPOINT_HEADER_FILTER_STRATEGY_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_HEADER_FILTER_STRATEGY_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_PERFORM_INVOCATION_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_CXFRS_ENDPOINT_PERFORM_INVOCATION_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_PERFORM_INVOCATION_DOC);
conf.define(CAMEL_SOURCE_CXFRS_ENDPOINT_PROPAGATE_CONTEXTS_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_CXFRS_ENDPOINT_PROPAGATE_CONTEXTS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_ENDPOINT_PROPAGATE_CONTEXTS_DOC);
conf.define(CAMEL_SOURCE_CXFRS_COMPONENT_BRIDGE_ERROR_HANDLER_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_CXFRS_COMPONENT_BRIDGE_ERROR_HANDLER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_COMPONENT_BRIDGE_ERROR_HANDLER_DOC);
conf.define(CAMEL_SOURCE_CXFRS_COMPONENT_AUTOWIRED_ENABLED_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_CXFRS_COMPONENT_AUTOWIRED_ENABLED_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_COMPONENT_AUTOWIRED_ENABLED_DOC);
conf.define(CAMEL_SOURCE_CXFRS_COMPONENT_HEADER_FILTER_STRATEGY_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_CXFRS_COMPONENT_HEADER_FILTER_STRATEGY_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_COMPONENT_HEADER_FILTER_STRATEGY_DOC);
conf.define(CAMEL_SOURCE_CXFRS_COMPONENT_USE_GLOBAL_SSL_CONTEXT_PARAMETERS_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_CXFRS_COMPONENT_USE_GLOBAL_SSL_CONTEXT_PARAMETERS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_CXFRS_COMPONENT_USE_GLOBAL_SSL_CONTEXT_PARAMETERS_DOC);
return conf;
}
} | 8,483 |
0 | Create_ds/camel-kafka-connector/connectors/camel-cxfrs-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-cxfrs-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/cxfrs/CamelCxfrsSourceConnector.java | /*
* 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.kafkaconnector.cxfrs;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnector;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.connector.Task;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelCxfrsSourceConnector extends CamelSourceConnector {
@Override
public ConfigDef config() {
return CamelCxfrsSourceConnectorConfig.conf();
}
@Override
public Class<? extends Task> taskClass() {
return CamelCxfrsSourceTask.class;
}
} | 8,484 |
0 | Create_ds/camel-kafka-connector/connectors/camel-cxfrs-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-cxfrs-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/cxfrs/CamelCxfrsSinkTask.java | /*
* 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.kafkaconnector.cxfrs;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnectorConfig;
import org.apache.camel.kafkaconnector.CamelSinkTask;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelCxfrsSinkTask extends CamelSinkTask {
@Override
protected CamelSinkConnectorConfig getCamelSinkConnectorConfig(
Map<String, String> props) {
return new CamelCxfrsSinkConnectorConfig(props);
}
@Override
protected Map<String, String> getDefaultConfig() {
return new HashMap<String, String>() {{
put(CamelSinkConnectorConfig.CAMEL_SINK_COMPONENT_CONF, "cxfrs");
}};
}
} | 8,485 |
0 | Create_ds/camel-kafka-connector/connectors/camel-cxfrs-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-cxfrs-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/cxfrs/CamelCxfrsSinkConnectorConfig.java | /*
* 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.kafkaconnector.cxfrs;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnectorConfig;
import org.apache.kafka.common.config.ConfigDef;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelCxfrsSinkConnectorConfig extends CamelSinkConnectorConfig {
public static final String CAMEL_SINK_CXFRS_PATH_BEAN_ID_CONF = "camel.sink.path.beanId";
public static final String CAMEL_SINK_CXFRS_PATH_BEAN_ID_DOC = "To lookup an existing configured CxfRsEndpoint. Must used bean: as prefix.";
public static final String CAMEL_SINK_CXFRS_PATH_BEAN_ID_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_PATH_ADDRESS_CONF = "camel.sink.path.address";
public static final String CAMEL_SINK_CXFRS_PATH_ADDRESS_DOC = "The service publish address.";
public static final String CAMEL_SINK_CXFRS_PATH_ADDRESS_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_FEATURES_CONF = "camel.sink.endpoint.features";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_FEATURES_DOC = "Set the feature list to the CxfRs endpoint.";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_FEATURES_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_LOGGING_FEATURE_ENABLED_CONF = "camel.sink.endpoint.loggingFeatureEnabled";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_LOGGING_FEATURE_ENABLED_DOC = "This option enables CXF Logging Feature which writes inbound and outbound REST messages to log.";
public static final Boolean CAMEL_SINK_CXFRS_ENDPOINT_LOGGING_FEATURE_ENABLED_DEFAULT = false;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_LOGGING_SIZE_LIMIT_CONF = "camel.sink.endpoint.loggingSizeLimit";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_LOGGING_SIZE_LIMIT_DOC = "To limit the total size of number of bytes the logger will output when logging feature has been enabled.";
public static final Integer CAMEL_SINK_CXFRS_ENDPOINT_LOGGING_SIZE_LIMIT_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_MODEL_REF_CONF = "camel.sink.endpoint.modelRef";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_MODEL_REF_DOC = "This option is used to specify the model file which is useful for the resource class without annotation. When using this option, then the service class can be omitted, to emulate document-only endpoints";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_MODEL_REF_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_PROVIDERS_CONF = "camel.sink.endpoint.providers";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_PROVIDERS_DOC = "Set custom JAX-RS provider(s) list to the CxfRs endpoint. You can specify a string with a list of providers to lookup in the registy separated by comma.";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_PROVIDERS_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_RESOURCE_CLASSES_CONF = "camel.sink.endpoint.resourceClasses";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_RESOURCE_CLASSES_DOC = "The resource classes which you want to export as REST service. Multiple classes can be separated by comma.";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_RESOURCE_CLASSES_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_SCHEMA_LOCATIONS_CONF = "camel.sink.endpoint.schemaLocations";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_SCHEMA_LOCATIONS_DOC = "Sets the locations of the schema(s) which can be used to validate the incoming XML or JAXB-driven JSON.";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_SCHEMA_LOCATIONS_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_SKIP_FAULT_LOGGING_CONF = "camel.sink.endpoint.skipFaultLogging";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_SKIP_FAULT_LOGGING_DOC = "This option controls whether the PhaseInterceptorChain skips logging the Fault that it catches.";
public static final Boolean CAMEL_SINK_CXFRS_ENDPOINT_SKIP_FAULT_LOGGING_DEFAULT = false;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_COOKIE_HANDLER_CONF = "camel.sink.endpoint.cookieHandler";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_COOKIE_HANDLER_DOC = "Configure a cookie handler to maintain a HTTP session";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_COOKIE_HANDLER_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_HOSTNAME_VERIFIER_CONF = "camel.sink.endpoint.hostnameVerifier";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_HOSTNAME_VERIFIER_DOC = "The hostname verifier to be used. Use the # notation to reference a HostnameVerifier from the registry.";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_HOSTNAME_VERIFIER_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_SSL_CONTEXT_PARAMETERS_CONF = "camel.sink.endpoint.sslContextParameters";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_SSL_CONTEXT_PARAMETERS_DOC = "The Camel SSL setting reference. Use the # notation to reference the SSL Context.";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_SSL_CONTEXT_PARAMETERS_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_THROW_EXCEPTION_ON_FAILURE_CONF = "camel.sink.endpoint.throwExceptionOnFailure";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_THROW_EXCEPTION_ON_FAILURE_DOC = "This option tells the CxfRsProducer to inspect return codes and will generate an Exception if the return code is larger than 207.";
public static final Boolean CAMEL_SINK_CXFRS_ENDPOINT_THROW_EXCEPTION_ON_FAILURE_DEFAULT = true;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_HTTP_CLIENT_APICONF = "camel.sink.endpoint.httpClientAPI";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_HTTP_CLIENT_APIDOC = "If it is true, the CxfRsProducer will use the HttpClientAPI to invoke the service. If it is false, the CxfRsProducer will use the ProxyClientAPI to invoke the service";
public static final Boolean CAMEL_SINK_CXFRS_ENDPOINT_HTTP_CLIENT_APIDEFAULT = true;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_IGNORE_DELETE_METHOD_MESSAGE_BODY_CONF = "camel.sink.endpoint.ignoreDeleteMethodMessageBody";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_IGNORE_DELETE_METHOD_MESSAGE_BODY_DOC = "This option is used to tell CxfRsProducer to ignore the message body of the DELETE method when using HTTP API.";
public static final Boolean CAMEL_SINK_CXFRS_ENDPOINT_IGNORE_DELETE_METHOD_MESSAGE_BODY_DEFAULT = false;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_LAZY_START_PRODUCER_CONF = "camel.sink.endpoint.lazyStartProducer";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_LAZY_START_PRODUCER_DOC = "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.";
public static final Boolean CAMEL_SINK_CXFRS_ENDPOINT_LAZY_START_PRODUCER_DEFAULT = false;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_MAX_CLIENT_CACHE_SIZE_CONF = "camel.sink.endpoint.maxClientCacheSize";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_MAX_CLIENT_CACHE_SIZE_DOC = "This option allows you to configure the maximum size of the cache. The implementation caches CXF clients or ClientFactoryBean in CxfProvider and CxfRsProvider.";
public static final Integer CAMEL_SINK_CXFRS_ENDPOINT_MAX_CLIENT_CACHE_SIZE_DEFAULT = 10;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_SYNCHRONOUS_CONF = "camel.sink.endpoint.synchronous";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_SYNCHRONOUS_DOC = "Sets whether synchronous processing should be strictly used";
public static final Boolean CAMEL_SINK_CXFRS_ENDPOINT_SYNCHRONOUS_DEFAULT = false;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_BINDING_CONF = "camel.sink.endpoint.binding";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_BINDING_DOC = "To use a custom CxfBinding to control the binding between Camel Message and CXF Message.";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_BINDING_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_BUS_CONF = "camel.sink.endpoint.bus";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_BUS_DOC = "To use a custom configured CXF Bus.";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_BUS_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_CONTINUATION_TIMEOUT_CONF = "camel.sink.endpoint.continuationTimeout";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_CONTINUATION_TIMEOUT_DOC = "This option is used to set the CXF continuation timeout which could be used in CxfConsumer by default when the CXF server is using Jetty or Servlet transport.";
public static final Long CAMEL_SINK_CXFRS_ENDPOINT_CONTINUATION_TIMEOUT_DEFAULT = 30000L;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_CXF_RS_CONFIGURER_CONF = "camel.sink.endpoint.cxfRsConfigurer";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_CXF_RS_CONFIGURER_DOC = "This option could apply the implementation of org.apache.camel.component.cxf.jaxrs.CxfRsEndpointConfigurer which supports to configure the CXF endpoint in programmatic way. User can configure the CXF server and client by implementing configure{Server/Client} method of CxfEndpointConfigurer.";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_CXF_RS_CONFIGURER_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_DEFAULT_BUS_CONF = "camel.sink.endpoint.defaultBus";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_DEFAULT_BUS_DOC = "Will set the default bus when CXF endpoint create a bus by itself";
public static final Boolean CAMEL_SINK_CXFRS_ENDPOINT_DEFAULT_BUS_DEFAULT = false;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_HEADER_FILTER_STRATEGY_CONF = "camel.sink.endpoint.headerFilterStrategy";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_HEADER_FILTER_STRATEGY_DOC = "To use a custom HeaderFilterStrategy to filter header to and from Camel message.";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_HEADER_FILTER_STRATEGY_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_PERFORM_INVOCATION_CONF = "camel.sink.endpoint.performInvocation";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_PERFORM_INVOCATION_DOC = "When the option is true, Camel will perform the invocation of the resource class instance and put the response object into the exchange for further processing.";
public static final Boolean CAMEL_SINK_CXFRS_ENDPOINT_PERFORM_INVOCATION_DEFAULT = false;
public static final String CAMEL_SINK_CXFRS_ENDPOINT_PROPAGATE_CONTEXTS_CONF = "camel.sink.endpoint.propagateContexts";
public static final String CAMEL_SINK_CXFRS_ENDPOINT_PROPAGATE_CONTEXTS_DOC = "When the option is true, JAXRS UriInfo, HttpHeaders, Request and SecurityContext contexts will be available to custom CXFRS processors as typed Camel exchange properties. These contexts can be used to analyze the current requests using JAX-RS API.";
public static final Boolean CAMEL_SINK_CXFRS_ENDPOINT_PROPAGATE_CONTEXTS_DEFAULT = false;
public static final String CAMEL_SINK_CXFRS_COMPONENT_LAZY_START_PRODUCER_CONF = "camel.component.cxfrs.lazyStartProducer";
public static final String CAMEL_SINK_CXFRS_COMPONENT_LAZY_START_PRODUCER_DOC = "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.";
public static final Boolean CAMEL_SINK_CXFRS_COMPONENT_LAZY_START_PRODUCER_DEFAULT = false;
public static final String CAMEL_SINK_CXFRS_COMPONENT_AUTOWIRED_ENABLED_CONF = "camel.component.cxfrs.autowiredEnabled";
public static final String CAMEL_SINK_CXFRS_COMPONENT_AUTOWIRED_ENABLED_DOC = "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.";
public static final Boolean CAMEL_SINK_CXFRS_COMPONENT_AUTOWIRED_ENABLED_DEFAULT = true;
public static final String CAMEL_SINK_CXFRS_COMPONENT_HEADER_FILTER_STRATEGY_CONF = "camel.component.cxfrs.headerFilterStrategy";
public static final String CAMEL_SINK_CXFRS_COMPONENT_HEADER_FILTER_STRATEGY_DOC = "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message.";
public static final String CAMEL_SINK_CXFRS_COMPONENT_HEADER_FILTER_STRATEGY_DEFAULT = null;
public static final String CAMEL_SINK_CXFRS_COMPONENT_USE_GLOBAL_SSL_CONTEXT_PARAMETERS_CONF = "camel.component.cxfrs.useGlobalSslContextParameters";
public static final String CAMEL_SINK_CXFRS_COMPONENT_USE_GLOBAL_SSL_CONTEXT_PARAMETERS_DOC = "Enable usage of global SSL context parameters.";
public static final Boolean CAMEL_SINK_CXFRS_COMPONENT_USE_GLOBAL_SSL_CONTEXT_PARAMETERS_DEFAULT = false;
public CamelCxfrsSinkConnectorConfig(
ConfigDef config,
Map<String, String> parsedConfig) {
super(config, parsedConfig);
}
public CamelCxfrsSinkConnectorConfig(Map<String, String> parsedConfig) {
this(conf(), parsedConfig);
}
public static ConfigDef conf() {
ConfigDef conf = new ConfigDef(CamelSinkConnectorConfig.conf());
conf.define(CAMEL_SINK_CXFRS_PATH_BEAN_ID_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_PATH_BEAN_ID_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_PATH_BEAN_ID_DOC);
conf.define(CAMEL_SINK_CXFRS_PATH_ADDRESS_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_PATH_ADDRESS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_PATH_ADDRESS_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_FEATURES_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_ENDPOINT_FEATURES_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_FEATURES_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_LOGGING_FEATURE_ENABLED_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_CXFRS_ENDPOINT_LOGGING_FEATURE_ENABLED_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_LOGGING_FEATURE_ENABLED_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_LOGGING_SIZE_LIMIT_CONF, ConfigDef.Type.INT, CAMEL_SINK_CXFRS_ENDPOINT_LOGGING_SIZE_LIMIT_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_LOGGING_SIZE_LIMIT_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_MODEL_REF_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_ENDPOINT_MODEL_REF_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_MODEL_REF_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_PROVIDERS_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_ENDPOINT_PROVIDERS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_PROVIDERS_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_RESOURCE_CLASSES_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_ENDPOINT_RESOURCE_CLASSES_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_RESOURCE_CLASSES_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_SCHEMA_LOCATIONS_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_ENDPOINT_SCHEMA_LOCATIONS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_SCHEMA_LOCATIONS_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_SKIP_FAULT_LOGGING_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_CXFRS_ENDPOINT_SKIP_FAULT_LOGGING_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_SKIP_FAULT_LOGGING_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_COOKIE_HANDLER_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_ENDPOINT_COOKIE_HANDLER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_COOKIE_HANDLER_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_HOSTNAME_VERIFIER_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_ENDPOINT_HOSTNAME_VERIFIER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_HOSTNAME_VERIFIER_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_SSL_CONTEXT_PARAMETERS_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_ENDPOINT_SSL_CONTEXT_PARAMETERS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_SSL_CONTEXT_PARAMETERS_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_THROW_EXCEPTION_ON_FAILURE_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_CXFRS_ENDPOINT_THROW_EXCEPTION_ON_FAILURE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_THROW_EXCEPTION_ON_FAILURE_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_HTTP_CLIENT_APICONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_CXFRS_ENDPOINT_HTTP_CLIENT_APIDEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_HTTP_CLIENT_APIDOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_IGNORE_DELETE_METHOD_MESSAGE_BODY_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_CXFRS_ENDPOINT_IGNORE_DELETE_METHOD_MESSAGE_BODY_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_IGNORE_DELETE_METHOD_MESSAGE_BODY_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_LAZY_START_PRODUCER_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_CXFRS_ENDPOINT_LAZY_START_PRODUCER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_LAZY_START_PRODUCER_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_MAX_CLIENT_CACHE_SIZE_CONF, ConfigDef.Type.INT, CAMEL_SINK_CXFRS_ENDPOINT_MAX_CLIENT_CACHE_SIZE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_MAX_CLIENT_CACHE_SIZE_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_SYNCHRONOUS_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_CXFRS_ENDPOINT_SYNCHRONOUS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_SYNCHRONOUS_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_BINDING_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_ENDPOINT_BINDING_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_BINDING_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_BUS_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_ENDPOINT_BUS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_BUS_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_CONTINUATION_TIMEOUT_CONF, ConfigDef.Type.LONG, CAMEL_SINK_CXFRS_ENDPOINT_CONTINUATION_TIMEOUT_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_CONTINUATION_TIMEOUT_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_CXF_RS_CONFIGURER_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_ENDPOINT_CXF_RS_CONFIGURER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_CXF_RS_CONFIGURER_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_DEFAULT_BUS_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_CXFRS_ENDPOINT_DEFAULT_BUS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_DEFAULT_BUS_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_HEADER_FILTER_STRATEGY_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_ENDPOINT_HEADER_FILTER_STRATEGY_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_HEADER_FILTER_STRATEGY_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_PERFORM_INVOCATION_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_CXFRS_ENDPOINT_PERFORM_INVOCATION_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_PERFORM_INVOCATION_DOC);
conf.define(CAMEL_SINK_CXFRS_ENDPOINT_PROPAGATE_CONTEXTS_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_CXFRS_ENDPOINT_PROPAGATE_CONTEXTS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_ENDPOINT_PROPAGATE_CONTEXTS_DOC);
conf.define(CAMEL_SINK_CXFRS_COMPONENT_LAZY_START_PRODUCER_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_CXFRS_COMPONENT_LAZY_START_PRODUCER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_COMPONENT_LAZY_START_PRODUCER_DOC);
conf.define(CAMEL_SINK_CXFRS_COMPONENT_AUTOWIRED_ENABLED_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_CXFRS_COMPONENT_AUTOWIRED_ENABLED_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_COMPONENT_AUTOWIRED_ENABLED_DOC);
conf.define(CAMEL_SINK_CXFRS_COMPONENT_HEADER_FILTER_STRATEGY_CONF, ConfigDef.Type.STRING, CAMEL_SINK_CXFRS_COMPONENT_HEADER_FILTER_STRATEGY_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_COMPONENT_HEADER_FILTER_STRATEGY_DOC);
conf.define(CAMEL_SINK_CXFRS_COMPONENT_USE_GLOBAL_SSL_CONTEXT_PARAMETERS_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_CXFRS_COMPONENT_USE_GLOBAL_SSL_CONTEXT_PARAMETERS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_CXFRS_COMPONENT_USE_GLOBAL_SSL_CONTEXT_PARAMETERS_DOC);
return conf;
}
} | 8,486 |
0 | Create_ds/camel-kafka-connector/connectors/camel-cxfrs-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-cxfrs-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/cxfrs/CamelCxfrsSinkConnector.java | /*
* 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.kafkaconnector.cxfrs;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnector;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.connector.Task;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelCxfrsSinkConnector extends CamelSinkConnector {
@Override
public ConfigDef config() {
return CamelCxfrsSinkConnectorConfig.conf();
}
@Override
public Class<? extends Task> taskClass() {
return CamelCxfrsSinkTask.class;
}
} | 8,487 |
0 | Create_ds/camel-kafka-connector/connectors/camel-cxfrs-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-cxfrs-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/cxfrs/CamelCxfrsSourceTask.java | /*
* 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.kafkaconnector.cxfrs;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
import org.apache.camel.kafkaconnector.CamelSourceTask;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelCxfrsSourceTask extends CamelSourceTask {
@Override
protected CamelSourceConnectorConfig getCamelSourceConnectorConfig(
Map<String, String> props) {
return new CamelCxfrsSourceConnectorConfig(props);
}
@Override
protected Map<String, String> getDefaultConfig() {
return new HashMap<String, String>() {{
put(CamelSourceConnectorConfig.CAMEL_SOURCE_COMPONENT_CONF, "cxfrs");
}};
}
} | 8,488 |
0 | Create_ds/camel-kafka-connector/connectors/camel-fhir-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-fhir-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/fhirsink/CamelFhirsinkSinkTask.java | /*
* 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.kafkaconnector.fhirsink;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnectorConfig;
import org.apache.camel.kafkaconnector.CamelSinkTask;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelFhirsinkSinkTask extends CamelSinkTask {
@Override
protected CamelSinkConnectorConfig getCamelSinkConnectorConfig(
Map<String, String> props) {
return new CamelFhirsinkSinkConnectorConfig(props);
}
@Override
protected String getSinkKamelet() {
return "kamelet:fhir-sink";
}
} | 8,489 |
0 | Create_ds/camel-kafka-connector/connectors/camel-fhir-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-fhir-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/fhirsink/CamelFhirsinkSinkConnector.java | /*
* 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.kafkaconnector.fhirsink;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnector;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.connector.Task;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelFhirsinkSinkConnector extends CamelSinkConnector {
@Override
public ConfigDef config() {
return CamelFhirsinkSinkConnectorConfig.conf();
}
@Override
public Class<? extends Task> taskClass() {
return CamelFhirsinkSinkTask.class;
}
} | 8,490 |
0 | Create_ds/camel-kafka-connector/connectors/camel-fhir-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-fhir-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/fhirsink/CamelFhirsinkSinkConnectorConfig.java | /*
* 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.kafkaconnector.fhirsink;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnectorConfig;
import org.apache.kafka.common.config.ConfigDef;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelFhirsinkSinkConnectorConfig
extends
CamelSinkConnectorConfig {
public static final String CAMEL_SINK_FHIRSINK_KAMELET_API_NAME_CONF = "camel.kamelet.fhir-sink.apiName";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_API_NAME_DOC = "What kind of operation to perform";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_API_NAME_DEFAULT = null;
public static final String CAMEL_SINK_FHIRSINK_KAMELET_METHOD_NAME_CONF = "camel.kamelet.fhir-sink.methodName";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_METHOD_NAME_DOC = "What sub operation to use for the selected operation.";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_METHOD_NAME_DEFAULT = null;
public static final String CAMEL_SINK_FHIRSINK_KAMELET_ENCODING_CONF = "camel.kamelet.fhir-sink.encoding";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_ENCODING_DOC = "Encoding to use for all request. One of: [JSON] [XML].";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_ENCODING_DEFAULT = "JSON";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_FHIR_VERSION_CONF = "camel.kamelet.fhir-sink.fhirVersion";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_FHIR_VERSION_DOC = "The FHIR Version to use.";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_FHIR_VERSION_DEFAULT = "R4";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_LOG_CONF = "camel.kamelet.fhir-sink.log";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_LOG_DOC = "Will log every requests and responses.";
public static final Boolean CAMEL_SINK_FHIRSINK_KAMELET_LOG_DEFAULT = false;
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PRETTY_PRINT_CONF = "camel.kamelet.fhir-sink.prettyPrint";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PRETTY_PRINT_DOC = "Pretty print all request.";
public static final Boolean CAMEL_SINK_FHIRSINK_KAMELET_PRETTY_PRINT_DEFAULT = false;
public static final String CAMEL_SINK_FHIRSINK_KAMELET_SERVER_URL_CONF = "camel.kamelet.fhir-sink.serverUrl";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_SERVER_URL_DOC = "The FHIR server base URL.";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_SERVER_URL_DEFAULT = null;
public static final String CAMEL_SINK_FHIRSINK_KAMELET_LAZY_START_PRODUCER_CONF = "camel.kamelet.fhir-sink.lazyStartProducer";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_LAZY_START_PRODUCER_DOC = "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.";
public static final Boolean CAMEL_SINK_FHIRSINK_KAMELET_LAZY_START_PRODUCER_DEFAULT = false;
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PROXY_HOST_CONF = "camel.kamelet.fhir-sink.proxyHost";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PROXY_HOST_DOC = "The proxy host.";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PROXY_HOST_DEFAULT = null;
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PROXY_PASSWORD_CONF = "camel.kamelet.fhir-sink.proxyPassword";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PROXY_PASSWORD_DOC = "The proxy password.";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PROXY_PASSWORD_DEFAULT = null;
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PROXY_PORT_CONF = "camel.kamelet.fhir-sink.proxyPort";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PROXY_PORT_DOC = "The proxy port.";
public static final Integer CAMEL_SINK_FHIRSINK_KAMELET_PROXY_PORT_DEFAULT = null;
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PROXY_USER_CONF = "camel.kamelet.fhir-sink.proxyUser";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PROXY_USER_DOC = "The proxy username.";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PROXY_USER_DEFAULT = null;
public static final String CAMEL_SINK_FHIRSINK_KAMELET_ACCESS_TOKEN_CONF = "camel.kamelet.fhir-sink.accessToken";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_ACCESS_TOKEN_DOC = "OAuth access token.";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_ACCESS_TOKEN_DEFAULT = null;
public static final String CAMEL_SINK_FHIRSINK_KAMELET_USERNAME_CONF = "camel.kamelet.fhir-sink.username";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_USERNAME_DOC = "Username to use for basic authentication.";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_USERNAME_DEFAULT = null;
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PASSWORD_CONF = "camel.kamelet.fhir-sink.password";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PASSWORD_DOC = "Password to use for basic authentication.";
public static final String CAMEL_SINK_FHIRSINK_KAMELET_PASSWORD_DEFAULT = null;
public CamelFhirsinkSinkConnectorConfig(
ConfigDef config,
Map<String, String> parsedConfig) {
super(config, parsedConfig);
}
public CamelFhirsinkSinkConnectorConfig(Map<String, String> parsedConfig) {
this(conf(), parsedConfig);
}
public static ConfigDef conf() {
ConfigDef conf = new ConfigDef(CamelSinkConnectorConfig.conf());
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_API_NAME_CONF, ConfigDef.Type.STRING, CAMEL_SINK_FHIRSINK_KAMELET_API_NAME_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_FHIRSINK_KAMELET_API_NAME_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_METHOD_NAME_CONF, ConfigDef.Type.STRING, CAMEL_SINK_FHIRSINK_KAMELET_METHOD_NAME_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SINK_FHIRSINK_KAMELET_METHOD_NAME_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_ENCODING_CONF, ConfigDef.Type.STRING, CAMEL_SINK_FHIRSINK_KAMELET_ENCODING_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_FHIRSINK_KAMELET_ENCODING_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_FHIR_VERSION_CONF, ConfigDef.Type.STRING, CAMEL_SINK_FHIRSINK_KAMELET_FHIR_VERSION_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_FHIRSINK_KAMELET_FHIR_VERSION_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_LOG_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_FHIRSINK_KAMELET_LOG_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_FHIRSINK_KAMELET_LOG_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_PRETTY_PRINT_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_FHIRSINK_KAMELET_PRETTY_PRINT_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_FHIRSINK_KAMELET_PRETTY_PRINT_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_SERVER_URL_CONF, ConfigDef.Type.STRING, CAMEL_SINK_FHIRSINK_KAMELET_SERVER_URL_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SINK_FHIRSINK_KAMELET_SERVER_URL_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_LAZY_START_PRODUCER_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_FHIRSINK_KAMELET_LAZY_START_PRODUCER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_FHIRSINK_KAMELET_LAZY_START_PRODUCER_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_PROXY_HOST_CONF, ConfigDef.Type.STRING, CAMEL_SINK_FHIRSINK_KAMELET_PROXY_HOST_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_FHIRSINK_KAMELET_PROXY_HOST_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_PROXY_PASSWORD_CONF, ConfigDef.Type.PASSWORD, CAMEL_SINK_FHIRSINK_KAMELET_PROXY_PASSWORD_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_FHIRSINK_KAMELET_PROXY_PASSWORD_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_PROXY_PORT_CONF, ConfigDef.Type.INT, CAMEL_SINK_FHIRSINK_KAMELET_PROXY_PORT_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_FHIRSINK_KAMELET_PROXY_PORT_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_PROXY_USER_CONF, ConfigDef.Type.STRING, CAMEL_SINK_FHIRSINK_KAMELET_PROXY_USER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_FHIRSINK_KAMELET_PROXY_USER_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_ACCESS_TOKEN_CONF, ConfigDef.Type.PASSWORD, CAMEL_SINK_FHIRSINK_KAMELET_ACCESS_TOKEN_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_FHIRSINK_KAMELET_ACCESS_TOKEN_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_USERNAME_CONF, ConfigDef.Type.STRING, CAMEL_SINK_FHIRSINK_KAMELET_USERNAME_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_FHIRSINK_KAMELET_USERNAME_DOC);
conf.define(CAMEL_SINK_FHIRSINK_KAMELET_PASSWORD_CONF, ConfigDef.Type.PASSWORD, CAMEL_SINK_FHIRSINK_KAMELET_PASSWORD_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_FHIRSINK_KAMELET_PASSWORD_DOC);
return conf;
}
} | 8,491 |
0 | Create_ds/camel-kafka-connector/connectors/camel-kafka-ssl-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-kafka-ssl-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/kafkasslsource/CamelKafkasslsourceSourceTask.java | /*
* 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.kafkaconnector.kafkasslsource;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
import org.apache.camel.kafkaconnector.CamelSourceTask;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelKafkasslsourceSourceTask extends CamelSourceTask {
@Override
protected CamelSourceConnectorConfig getCamelSourceConnectorConfig(
Map<String, String> props) {
return new CamelKafkasslsourceSourceConnectorConfig(props);
}
@Override
protected String getSourceKamelet() {
return "kamelet:kafka-ssl-source";
}
} | 8,492 |
0 | Create_ds/camel-kafka-connector/connectors/camel-kafka-ssl-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-kafka-ssl-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/kafkasslsource/CamelKafkasslsourceSourceConnectorConfig.java | /*
* 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.kafkaconnector.kafkasslsource;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
import org.apache.kafka.common.config.ConfigDef;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelKafkasslsourceSourceConnectorConfig
extends
CamelSourceConnectorConfig {
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_TOPIC_CONF = "camel.kamelet.kafka-ssl-source.topic";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_TOPIC_DOC = "Comma separated list of Kafka topic names";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_TOPIC_DEFAULT = null;
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_BOOTSTRAP_SERVERS_CONF = "camel.kamelet.kafka-ssl-source.bootstrapServers";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_BOOTSTRAP_SERVERS_DOC = "Comma separated list of Kafka Broker URLs";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_BOOTSTRAP_SERVERS_DEFAULT = null;
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SECURITY_PROTOCOL_CONF = "camel.kamelet.kafka-ssl-source.securityProtocol";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SECURITY_PROTOCOL_DOC = "Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SECURITY_PROTOCOL_DEFAULT = "SSL";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SASL_MECHANISM_CONF = "camel.kamelet.kafka-ssl-source.saslMechanism";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SASL_MECHANISM_DOC = "The Simple Authentication and Security Layer (SASL) Mechanism used.";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SASL_MECHANISM_DEFAULT = "GSSAPI";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_AUTO_COMMIT_ENABLE_CONF = "camel.kamelet.kafka-ssl-source.autoCommitEnable";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_AUTO_COMMIT_ENABLE_DOC = "If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer";
public static final Boolean CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_AUTO_COMMIT_ENABLE_DEFAULT = true;
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_ALLOW_MANUAL_COMMIT_CONF = "camel.kamelet.kafka-ssl-source.allowManualCommit";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_ALLOW_MANUAL_COMMIT_DOC = "Whether to allow doing manual commits";
public static final Boolean CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_ALLOW_MANUAL_COMMIT_DEFAULT = false;
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_POLL_ON_ERROR_CONF = "camel.kamelet.kafka-ssl-source.pollOnError";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_POLL_ON_ERROR_DOC = "What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of DISCARD, ERROR_HANDLER, RECONNECT, RETRY, STOP";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_POLL_ON_ERROR_DEFAULT = "ERROR_HANDLER";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_AUTO_OFFSET_RESET_CONF = "camel.kamelet.kafka-ssl-source.autoOffsetReset";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_AUTO_OFFSET_RESET_DOC = "What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_AUTO_OFFSET_RESET_DEFAULT = "latest";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_CONSUMER_GROUP_CONF = "camel.kamelet.kafka-ssl-source.consumerGroup";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_CONSUMER_GROUP_DOC = "A string that uniquely identifies the group of consumers to which this source belongs Example: my-group-id";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_CONSUMER_GROUP_DEFAULT = null;
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_DESERIALIZE_HEADERS_CONF = "camel.kamelet.kafka-ssl-source.deserializeHeaders";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_DESERIALIZE_HEADERS_DOC = "When enabled the Kamelet source will deserialize all message headers to String representation.";
public static final Boolean CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_DESERIALIZE_HEADERS_DEFAULT = true;
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEY_PASSWORD_CONF = "camel.kamelet.kafka-ssl-source.sslKeyPassword";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEY_PASSWORD_DOC = "The password of the private key in the key store file.";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEY_PASSWORD_DEFAULT = null;
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEYSTORE_PASSWORD_CONF = "camel.kamelet.kafka-ssl-source.sslKeystorePassword";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEYSTORE_PASSWORD_DOC = "The store password for the key store file.This is optional for client and only needed if ssl.keystore.location is configured.";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEYSTORE_PASSWORD_DEFAULT = null;
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_PROTOCOL_CONF = "camel.kamelet.kafka-ssl-source.sslProtocol";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_PROTOCOL_DOC = "The SSL protocol used to generate the SSLContext. Default setting is TLS, which is fine for most cases. Allowed values in recent JVMs are TLS, TLSv1.1 and TLSv1.2. SSL, SSLv2 and SSLv3 may be supported in older JVMs, but their usage is discouraged due to known security vulnerabilities.";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_PROTOCOL_DEFAULT = "TLSv1.2";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEYSTORE_LOCATION_CONF = "camel.kamelet.kafka-ssl-source.sslKeystoreLocation";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEYSTORE_LOCATION_DOC = "The location of the key store file. This is optional for client and can be used for two-way authentication for client.";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEYSTORE_LOCATION_DEFAULT = null;
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_TRUSTSTORE_LOCATION_CONF = "camel.kamelet.kafka-ssl-source.sslTruststoreLocation";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_TRUSTSTORE_LOCATION_DOC = "The location of the trust store file.";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_TRUSTSTORE_LOCATION_DEFAULT = null;
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_ENABLED_PROTOCOLS_CONF = "camel.kamelet.kafka-ssl-source.sslEnabledProtocols";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_ENABLED_PROTOCOLS_DOC = "The list of protocols enabled for SSL connections. TLSv1.2, TLSv1.1 and TLSv1 are enabled by default.";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_ENABLED_PROTOCOLS_DEFAULT = "TLSv1.2,TLSv1.1,TLSv1";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SASL_JAAS_CONFIG_CONF = "camel.kamelet.kafka-ssl-source.saslJaasConfig";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SASL_JAAS_CONFIG_DOC = "Java Authentication and Authorization Service (JAAS) for Simple Authentication and Security Layer (SASL) configuration.";
public static final String CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SASL_JAAS_CONFIG_DEFAULT = null;
public CamelKafkasslsourceSourceConnectorConfig(
ConfigDef config,
Map<String, String> parsedConfig) {
super(config, parsedConfig);
}
public CamelKafkasslsourceSourceConnectorConfig(
Map<String, String> parsedConfig) {
this(conf(), parsedConfig);
}
public static ConfigDef conf() {
ConfigDef conf = new ConfigDef(CamelSourceConnectorConfig.conf());
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_TOPIC_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_TOPIC_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_TOPIC_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_BOOTSTRAP_SERVERS_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_BOOTSTRAP_SERVERS_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_BOOTSTRAP_SERVERS_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SECURITY_PROTOCOL_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SECURITY_PROTOCOL_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SECURITY_PROTOCOL_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SASL_MECHANISM_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SASL_MECHANISM_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SASL_MECHANISM_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_AUTO_COMMIT_ENABLE_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_AUTO_COMMIT_ENABLE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_AUTO_COMMIT_ENABLE_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_ALLOW_MANUAL_COMMIT_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_ALLOW_MANUAL_COMMIT_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_ALLOW_MANUAL_COMMIT_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_POLL_ON_ERROR_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_POLL_ON_ERROR_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_POLL_ON_ERROR_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_AUTO_OFFSET_RESET_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_AUTO_OFFSET_RESET_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_AUTO_OFFSET_RESET_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_CONSUMER_GROUP_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_CONSUMER_GROUP_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_CONSUMER_GROUP_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_DESERIALIZE_HEADERS_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_DESERIALIZE_HEADERS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_DESERIALIZE_HEADERS_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEY_PASSWORD_CONF, ConfigDef.Type.PASSWORD, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEY_PASSWORD_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEY_PASSWORD_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEYSTORE_PASSWORD_CONF, ConfigDef.Type.PASSWORD, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEYSTORE_PASSWORD_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEYSTORE_PASSWORD_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_PROTOCOL_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_PROTOCOL_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_PROTOCOL_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEYSTORE_LOCATION_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEYSTORE_LOCATION_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_KEYSTORE_LOCATION_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_TRUSTSTORE_LOCATION_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_TRUSTSTORE_LOCATION_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_TRUSTSTORE_LOCATION_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_ENABLED_PROTOCOLS_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_ENABLED_PROTOCOLS_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SSL_ENABLED_PROTOCOLS_DOC);
conf.define(CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SASL_JAAS_CONFIG_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SASL_JAAS_CONFIG_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SOURCE_KAFKASSLSOURCE_KAMELET_SASL_JAAS_CONFIG_DOC);
return conf;
}
} | 8,493 |
0 | Create_ds/camel-kafka-connector/connectors/camel-kafka-ssl-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-kafka-ssl-source-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/kafkasslsource/CamelKafkasslsourceSourceConnector.java | /*
* 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.kafkaconnector.kafkasslsource;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSourceConnector;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.connector.Task;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelKafkasslsourceSourceConnector extends CamelSourceConnector {
@Override
public ConfigDef config() {
return CamelKafkasslsourceSourceConnectorConfig.conf();
}
@Override
public Class<? extends Task> taskClass() {
return CamelKafkasslsourceSourceTask.class;
}
} | 8,494 |
0 | Create_ds/camel-kafka-connector/connectors/camel-aws-cloudwatch-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-aws-cloudwatch-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/awscloudwatchsink/CamelAwscloudwatchsinkSinkConnectorConfig.java | /*
* 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.kafkaconnector.awscloudwatchsink;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnectorConfig;
import org.apache.kafka.common.config.ConfigDef;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelAwscloudwatchsinkSinkConnectorConfig
extends
CamelSinkConnectorConfig {
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_CW_NAMESPACE_CONF = "camel.kamelet.aws-cloudwatch-sink.cwNamespace";
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_CW_NAMESPACE_DOC = "The CloudWatch metric namespace.";
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_CW_NAMESPACE_DEFAULT = null;
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_ACCESS_KEY_CONF = "camel.kamelet.aws-cloudwatch-sink.accessKey";
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_ACCESS_KEY_DOC = "The access key obtained from AWS.";
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_ACCESS_KEY_DEFAULT = null;
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_SECRET_KEY_CONF = "camel.kamelet.aws-cloudwatch-sink.secretKey";
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_SECRET_KEY_DOC = "The secret key obtained from AWS.";
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_SECRET_KEY_DEFAULT = null;
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_REGION_CONF = "camel.kamelet.aws-cloudwatch-sink.region";
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_REGION_DOC = "The AWS region to access.";
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_REGION_DEFAULT = null;
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_USE_DEFAULT_CREDENTIALS_PROVIDER_CONF = "camel.kamelet.aws-cloudwatch-sink.useDefaultCredentialsProvider";
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_USE_DEFAULT_CREDENTIALS_PROVIDER_DOC = "If true, the CloudWatch client loads credentials through a default credentials provider. If false, it uses the basic authentication method (access key and secret key).";
public static final Boolean CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_USE_DEFAULT_CREDENTIALS_PROVIDER_DEFAULT = false;
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_URI_ENDPOINT_OVERRIDE_CONF = "camel.kamelet.aws-cloudwatch-sink.uriEndpointOverride";
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_URI_ENDPOINT_OVERRIDE_DOC = "The overriding endpoint URI. To use this option, you must also select the `overrideEndpoint` option.";
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_URI_ENDPOINT_OVERRIDE_DEFAULT = null;
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_OVERRIDE_ENDPOINT_CONF = "camel.kamelet.aws-cloudwatch-sink.overrideEndpoint";
public static final String CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_OVERRIDE_ENDPOINT_DOC = "Select this option to override the endpoint URI. To use this option, you must also provide a URI for the `uriEndpointOverride` option.";
public static final Boolean CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_OVERRIDE_ENDPOINT_DEFAULT = false;
public CamelAwscloudwatchsinkSinkConnectorConfig(
ConfigDef config,
Map<String, String> parsedConfig) {
super(config, parsedConfig);
}
public CamelAwscloudwatchsinkSinkConnectorConfig(
Map<String, String> parsedConfig) {
this(conf(), parsedConfig);
}
public static ConfigDef conf() {
ConfigDef conf = new ConfigDef(CamelSinkConnectorConfig.conf());
conf.define(CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_CW_NAMESPACE_CONF, ConfigDef.Type.STRING, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_CW_NAMESPACE_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_CW_NAMESPACE_DOC);
conf.define(CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_ACCESS_KEY_CONF, ConfigDef.Type.PASSWORD, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_ACCESS_KEY_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_ACCESS_KEY_DOC);
conf.define(CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_SECRET_KEY_CONF, ConfigDef.Type.PASSWORD, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_SECRET_KEY_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_SECRET_KEY_DOC);
conf.define(CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_REGION_CONF, ConfigDef.Type.STRING, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_REGION_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_REGION_DOC);
conf.define(CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_USE_DEFAULT_CREDENTIALS_PROVIDER_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_USE_DEFAULT_CREDENTIALS_PROVIDER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_USE_DEFAULT_CREDENTIALS_PROVIDER_DOC);
conf.define(CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_URI_ENDPOINT_OVERRIDE_CONF, ConfigDef.Type.STRING, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_URI_ENDPOINT_OVERRIDE_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_URI_ENDPOINT_OVERRIDE_DOC);
conf.define(CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_OVERRIDE_ENDPOINT_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_OVERRIDE_ENDPOINT_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_AWSCLOUDWATCHSINK_KAMELET_OVERRIDE_ENDPOINT_DOC);
return conf;
}
} | 8,495 |
0 | Create_ds/camel-kafka-connector/connectors/camel-aws-cloudwatch-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-aws-cloudwatch-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/awscloudwatchsink/CamelAwscloudwatchsinkSinkConnector.java | /*
* 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.kafkaconnector.awscloudwatchsink;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnector;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.connector.Task;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelAwscloudwatchsinkSinkConnector extends CamelSinkConnector {
@Override
public ConfigDef config() {
return CamelAwscloudwatchsinkSinkConnectorConfig.conf();
}
@Override
public Class<? extends Task> taskClass() {
return CamelAwscloudwatchsinkSinkTask.class;
}
} | 8,496 |
0 | Create_ds/camel-kafka-connector/connectors/camel-aws-cloudwatch-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-aws-cloudwatch-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/awscloudwatchsink/CamelAwscloudwatchsinkSinkTask.java | /*
* 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.kafkaconnector.awscloudwatchsink;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnectorConfig;
import org.apache.camel.kafkaconnector.CamelSinkTask;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelAwscloudwatchsinkSinkTask extends CamelSinkTask {
@Override
protected CamelSinkConnectorConfig getCamelSinkConnectorConfig(
Map<String, String> props) {
return new CamelAwscloudwatchsinkSinkConnectorConfig(props);
}
@Override
protected String getSinkKamelet() {
return "kamelet:aws-cloudwatch-sink";
}
} | 8,497 |
0 | Create_ds/camel-kafka-connector/connectors/camel-aws-ses-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-aws-ses-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/awssessink/CamelAwssessinkSinkConnectorConfig.java | /*
* 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.kafkaconnector.awssessink;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnectorConfig;
import org.apache.kafka.common.config.ConfigDef;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelAwssessinkSinkConnectorConfig
extends
CamelSinkConnectorConfig {
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_FROM_CONF = "camel.kamelet.aws-ses-sink.from";
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_FROM_DOC = "From address Example: user@example.com";
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_FROM_DEFAULT = null;
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_ACCESS_KEY_CONF = "camel.kamelet.aws-ses-sink.accessKey";
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_ACCESS_KEY_DOC = "The access key obtained from AWS.";
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_ACCESS_KEY_DEFAULT = null;
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_SECRET_KEY_CONF = "camel.kamelet.aws-ses-sink.secretKey";
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_SECRET_KEY_DOC = "The secret key obtained from AWS.";
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_SECRET_KEY_DEFAULT = null;
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_REGION_CONF = "camel.kamelet.aws-ses-sink.region";
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_REGION_DOC = "The AWS region to access.";
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_REGION_DEFAULT = null;
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_USE_DEFAULT_CREDENTIALS_PROVIDER_CONF = "camel.kamelet.aws-ses-sink.useDefaultCredentialsProvider";
public static final String CAMEL_SINK_AWSSESSINK_KAMELET_USE_DEFAULT_CREDENTIALS_PROVIDER_DOC = "If true, the SES client loads credentials through a default credentials provider. If false, it uses the basic authentication method (access key and secret key).";
public static final Boolean CAMEL_SINK_AWSSESSINK_KAMELET_USE_DEFAULT_CREDENTIALS_PROVIDER_DEFAULT = false;
public CamelAwssessinkSinkConnectorConfig(
ConfigDef config,
Map<String, String> parsedConfig) {
super(config, parsedConfig);
}
public CamelAwssessinkSinkConnectorConfig(Map<String, String> parsedConfig) {
this(conf(), parsedConfig);
}
public static ConfigDef conf() {
ConfigDef conf = new ConfigDef(CamelSinkConnectorConfig.conf());
conf.define(CAMEL_SINK_AWSSESSINK_KAMELET_FROM_CONF, ConfigDef.Type.STRING, CAMEL_SINK_AWSSESSINK_KAMELET_FROM_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SINK_AWSSESSINK_KAMELET_FROM_DOC);
conf.define(CAMEL_SINK_AWSSESSINK_KAMELET_ACCESS_KEY_CONF, ConfigDef.Type.PASSWORD, CAMEL_SINK_AWSSESSINK_KAMELET_ACCESS_KEY_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_AWSSESSINK_KAMELET_ACCESS_KEY_DOC);
conf.define(CAMEL_SINK_AWSSESSINK_KAMELET_SECRET_KEY_CONF, ConfigDef.Type.PASSWORD, CAMEL_SINK_AWSSESSINK_KAMELET_SECRET_KEY_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_AWSSESSINK_KAMELET_SECRET_KEY_DOC);
conf.define(CAMEL_SINK_AWSSESSINK_KAMELET_REGION_CONF, ConfigDef.Type.STRING, CAMEL_SINK_AWSSESSINK_KAMELET_REGION_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SINK_AWSSESSINK_KAMELET_REGION_DOC);
conf.define(CAMEL_SINK_AWSSESSINK_KAMELET_USE_DEFAULT_CREDENTIALS_PROVIDER_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SINK_AWSSESSINK_KAMELET_USE_DEFAULT_CREDENTIALS_PROVIDER_DEFAULT, ConfigDef.Importance.MEDIUM, CAMEL_SINK_AWSSESSINK_KAMELET_USE_DEFAULT_CREDENTIALS_PROVIDER_DOC);
return conf;
}
} | 8,498 |
0 | Create_ds/camel-kafka-connector/connectors/camel-aws-ses-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector | Create_ds/camel-kafka-connector/connectors/camel-aws-ses-sink-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/awssessink/CamelAwssessinkSinkConnector.java | /*
* 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.kafkaconnector.awssessink;
import javax.annotation.Generated;
import org.apache.camel.kafkaconnector.CamelSinkConnector;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.connector.Task;
@Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.")
public class CamelAwssessinkSinkConnector extends CamelSinkConnector {
@Override
public ConfigDef config() {
return CamelAwssessinkSinkConnectorConfig.conf();
}
@Override
public Class<? extends Task> taskClass() {
return CamelAwssessinkSinkTask.class;
}
} | 8,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.