You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2019/06/05 21:01:19 UTC
[camel] branch endpoint-dsl created (now 225795a)
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a change to branch endpoint-dsl
in repository https://gitbox.apache.org/repos/asf/camel.git.
at 225795a Commit generated endpoints (not really a DSL at this point)
This branch includes the following new commits:
new 5c684ea First pass at a generated endpoint DSL
new 225795a Commit generated endpoints (not really a DSL at this point)
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[camel] 01/02: First pass at a generated endpoint DSL
Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch endpoint-dsl
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 5c684ea3774a5c2a0cc8388bb19a4d83ae180977
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jun 5 10:50:26 2019 +0200
First pass at a generated endpoint DSL
---
components/camel-blueprint/pom.xml | 1 +
components/camel-spring/pom.xml | 1 +
.../camel/component/web3j/Web3jConfiguration.java | 2 +-
components/pom.xml | 1 +
.../model/endpoint/EndpointConfiguration.java | 5 +
.../camel/maven/packaging/EndpointDslMojo.java | 631 +++++++++++++++
.../camel/maven/packaging/generics/ClassUtil.java | 218 +++++
.../maven/packaging/generics/GenericsUtil.java | 880 +++++++++++++++++++++
.../generics/OwbGenericArrayTypeImpl.java | 64 ++
.../generics/OwbParametrizedTypeImpl.java | 125 +++
.../packaging/generics/OwbTypeVariableImpl.java | 182 +++++
.../packaging/generics/OwbWildcardTypeImpl.java | 82 ++
.../maven/packaging/model/EndpointOptionModel.java | 9 +
.../camel/maven/packaging/srcgen/GenericType.java | 2 +-
.../camel/maven/packaging/srcgen/JavaClass.java | 39 +-
15 files changed, 2237 insertions(+), 5 deletions(-)
diff --git a/components/camel-blueprint/pom.xml b/components/camel-blueprint/pom.xml
index 3179463..cd197ec 100644
--- a/components/camel-blueprint/pom.xml
+++ b/components/camel-blueprint/pom.xml
@@ -357,6 +357,7 @@
<include name="org/apache/camel/LoggingLevel.java"/>
<include name="org/apache/camel/ManagementStatisticsLevel.java"/>
<include name="**/package-info.java"/>
+ <exclude name="org/apache/camel/model/endpoint/*.java"/>
</fileset>
<fileset dir="${basedir}/../../core/camel-util/src/main/java">
<include
diff --git a/components/camel-spring/pom.xml b/components/camel-spring/pom.xml
index 2a873b7..8ba2a98 100644
--- a/components/camel-spring/pom.xml
+++ b/components/camel-spring/pom.xml
@@ -386,6 +386,7 @@
<include name="org/apache/camel/ShutdownRunningTask.java"/>
<include name="org/apache/camel/WaitForTaskToComplete.java"/>
<include name="org/apache/camel/package-info.java"/>
+ <exclude name="org/apache/camel/model/endpoint/*.java"/>
</fileset>
<fileset dir="${basedir}/../../core/camel-util/src/main/java">
<include name="org/apache/camel/concurrent/ThreadPoolRejectedPolicy.java"/>
diff --git a/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jConfiguration.java b/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jConfiguration.java
index 70db1be..d6a901e 100644
--- a/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jConfiguration.java
+++ b/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jConfiguration.java
@@ -48,7 +48,7 @@ public class Web3jConfiguration implements Cloneable {
@UriParam(label = "producer")
private String address;
- @UriParam(label = "common", javaType = "String")
+ @UriParam(label = "common", javaType = "java.lang.String")
private List<String> topics;
@UriParam(label = "producer")
diff --git a/components/pom.xml b/components/pom.xml
index ded9f83..97da906 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -368,6 +368,7 @@
<goal>prepare-spring-boot-starter</goal>
<goal>prepare-spring-boot-auto-configuration</goal>
<goal>generate-legal</goal>
+ <goal>generate-endpoint-dsl</goal>
</goals>
<phase>prepare-package</phase>
</execution>
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/EndpointConfiguration.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/EndpointConfiguration.java
new file mode 100644
index 0000000..a8b85bf
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/EndpointConfiguration.java
@@ -0,0 +1,5 @@
+package org.apache.camel.model.endpoint;
+
+public class EndpointConfiguration {
+
+}
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
new file mode 100644
index 0000000..c6730e1
--- /dev/null
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
@@ -0,0 +1,631 @@
+/*
+ * 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.maven.packaging;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOError;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Array;
+import java.lang.reflect.Field;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.function.Function;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
+import javax.annotation.Generated;
+
+import org.apache.camel.maven.packaging.generics.GenericsUtil;
+import org.apache.camel.maven.packaging.model.ComponentModel;
+import org.apache.camel.maven.packaging.model.ComponentOptionModel;
+import org.apache.camel.maven.packaging.model.EndpointOptionModel;
+import org.apache.camel.maven.packaging.srcgen.GenericType;
+import org.apache.camel.maven.packaging.srcgen.GenericType.BoundType;
+import org.apache.camel.maven.packaging.srcgen.JavaClass;
+import org.apache.camel.maven.packaging.srcgen.Property;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
+import org.apache.camel.spi.annotations.Component;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.maven.project.MavenProject;
+import org.jboss.forge.roaster.model.util.Strings;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.Opcodes;
+import org.springframework.boot.liquibase.SpringPackageScanClassResolver;
+
+import static org.apache.camel.maven.packaging.AbstractGeneratorMojo.updateResource;
+import static org.apache.camel.maven.packaging.JSonSchemaHelper.getSafeValue;
+import static org.apache.camel.maven.packaging.PackageHelper.findCamelCoreDirectory;
+import static org.apache.camel.maven.packaging.PackageHelper.loadText;
+
+/**
+ * Generate Spring Boot auto configuration files for Camel components and data
+ * formats.
+ */
+@Mojo(name = "generate-endpoint-dsl", threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME, defaultPhase = LifecyclePhase.PROCESS_CLASSES)
+public class EndpointDslMojo extends AbstractMojo {
+
+ private static final Map<String, String> PRIMITIVEMAP;
+ private static final Map<String, Class> PRIMITIVE_CLASSES = new HashMap<>();
+
+ static {
+ PRIMITIVEMAP = new HashMap<>();
+ PRIMITIVEMAP.put("boolean", "java.lang.Boolean");
+ PRIMITIVEMAP.put("char", "java.lang.Character");
+ PRIMITIVEMAP.put("long", "java.lang.Long");
+ PRIMITIVEMAP.put("int", "java.lang.Integer");
+ PRIMITIVEMAP.put("integer", "java.lang.Integer");
+ PRIMITIVEMAP.put("byte", "java.lang.Byte");
+ PRIMITIVEMAP.put("short", "java.lang.Short");
+ PRIMITIVEMAP.put("double", "java.lang.Double");
+ PRIMITIVEMAP.put("float", "java.lang.Float");
+
+ PRIMITIVE_CLASSES.put("int", int.class);
+ PRIMITIVE_CLASSES.put("short", short.class);
+ PRIMITIVE_CLASSES.put("long", long.class);
+ PRIMITIVE_CLASSES.put("byte", byte.class);
+ PRIMITIVE_CLASSES.put("char", char.class);
+ PRIMITIVE_CLASSES.put("float", float.class);
+ PRIMITIVE_CLASSES.put("double", double.class);
+ PRIMITIVE_CLASSES.put("boolean", boolean.class);
+ PRIMITIVE_CLASSES.put("void", void.class);
+ }
+
+ private static final String[] IGNORE_MODULES = {/* Non-standard -> */ };
+
+ /**
+ * The maven project.
+ */
+ @Parameter(property = "project", required = true, readonly = true)
+ protected MavenProject project;
+
+ /**
+ * The project build directory
+ */
+ @Parameter(defaultValue = "${project.build.directory}")
+ protected File buildDir;
+
+ /**
+ * The base directory
+ */
+ @Parameter(defaultValue = "${basedir}")
+ protected File baseDir;
+
+ DynamicClassLoader projectClassLoader;
+
+ @Override
+ public void execute() throws MojoExecutionException, MojoFailureException {
+ // Do not generate code for ignored module
+ if (Arrays.asList(IGNORE_MODULES).contains(project.getArtifactId())) {
+ getLog().info("Component auto-configuration will not be created: component contained in the ignore list");
+ return;
+ }
+
+ executeAll();
+ }
+
+ private void executeAll() throws MojoExecutionException, MojoFailureException {
+ Map<File, Supplier<String>> files = PackageHelper.findJsonFiles(buildDir, p -> p.isDirectory() || p.getName().endsWith(".json")).stream()
+ .collect(Collectors.toMap(Function.identity(), s -> cache(() -> loadJson(s))));
+
+ executeComponent(files);
+ }
+
+ private static String loadJson(File file) {
+ try (InputStream is = new FileInputStream(file)) {
+ return loadText(is);
+ } catch (IOException e) {
+ throw new IOError(e);
+ }
+ }
+
+ private static <T> Supplier<T> cache(Supplier<T> supplier) {
+ return new Supplier<T>() {
+ T value;
+
+ @Override
+ public T get() {
+ if (value == null) {
+ value = supplier.get();
+ }
+ return value;
+ }
+ };
+ }
+
+ private void executeComponent(Map<File, Supplier<String>> jsonFiles) throws MojoExecutionException, MojoFailureException {
+ // find the component names
+ Set<String> componentNames = new TreeSet<>();
+ findComponentNames(buildDir, componentNames);
+
+ // create auto configuration for the components
+ if (!componentNames.isEmpty()) {
+ getLog().debug("Found " + componentNames.size() + " components");
+
+ List<ComponentModel> allModels = new LinkedList<>();
+ for (String componentName : componentNames) {
+ String json = loadComponentJson(jsonFiles, componentName);
+ if (json != null) {
+ ComponentModel model = generateComponentModel(componentName, json);
+ allModels.add(model);
+ }
+ }
+
+ // Group the models by implementing classes
+ Map<String, List<ComponentModel>> grModels = allModels.stream().collect(Collectors.groupingBy(ComponentModel::getJavaType));
+ for (String componentClass : grModels.keySet()) {
+ List<ComponentModel> compModels = grModels.get(componentClass);
+ ComponentModel model = compModels.get(0); // They should be
+ // equivalent
+ List<String> aliases = compModels.stream().map(ComponentModel::getScheme).sorted().collect(Collectors.toList());
+
+ String pkg = "org.apache.camel.model.endpoint";
+
+ String overrideComponentName = null;
+ if (aliases.size() > 1) {
+ // determine component name when there are multiple ones
+ overrideComponentName = model.getArtifactId().replace("camel-", "");
+ }
+
+ createEndpointDsl(pkg, model, overrideComponentName);
+ }
+ }
+ }
+
+ private void createEndpointDsl(String packageName, ComponentModel model, String overrideComponentName) throws MojoFailureException {
+ int pos = model.getJavaType().lastIndexOf(".");
+ String name = model.getJavaType().substring(pos + 1);
+ name = name.replace("Component", "Endpoint");
+
+ Class<?> realComponentClass = loadClass(model.getJavaType());
+ Class<?> realEndpointClass = findEndpointClass(realComponentClass);
+
+ final JavaClass javaClass = new JavaClass(getProjectClassLoader());
+ javaClass.setPackage(packageName);
+ javaClass.setName(name);
+
+ Map<String, JavaClass> enumClasses = new HashMap<>();
+
+ JavaClass commonClass = javaClass.addNestedType().setPublic().setStatic(true);
+ commonClass.setName(name.replace("Endpoint", "Common"));
+ commonClass.extendSuperType("EndpointConfiguration");
+
+ JavaClass consumerClass = javaClass.addNestedType().setPublic().setStatic(true);
+ consumerClass.setName(name.replace("Endpoint", "Consumer"));
+ consumerClass.extendSuperType(name.replace("Endpoint", "Common"));
+
+ JavaClass producerClass = javaClass.addNestedType().setPublic().setStatic(true);
+ producerClass.setName(name.replace("Endpoint", "Producer"));
+ producerClass.extendSuperType(name.replace("Endpoint", "Common"));
+
+ String doc = "Generated by camel-package-maven-plugin - do not edit this file!";
+ if (!Strings.isBlank(model.getDescription())) {
+ doc = model.getDescription() + "\n\n" + doc;
+ }
+ javaClass.getJavaDoc().setText(doc);
+
+ javaClass.addAnnotation(Generated.class.getName())
+ .setStringValue("value", EndpointDslMojo.class.getName());
+
+ for (EndpointOptionModel option : model.getEndpointOptions()) {
+
+ JavaClass target = commonClass;
+ if (option.getLabel() != null) {
+ if (option.getLabel().contains("producer")) {
+ target = producerClass;
+ } else if (option.getLabel().contains("consumer")) {
+ target = consumerClass;
+ }
+ }
+
+ GenericType gtype;
+ try {
+ Field field = findField(realComponentClass, realEndpointClass, option);
+ gtype = new GenericType(GenericsUtil.resolveType(realEndpointClass, field));
+ gtype = getType(javaClass, enumClasses, option.getEnums(), gtype.toString());
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+
+
+ Property prop = target.addProperty(gtype, option.getName());
+ if ("true".equals(option.getDeprecated())) {
+ prop.getField().addAnnotation(Deprecated.class);
+ prop.getAccessor().addAnnotation(Deprecated.class);
+ prop.getMutator().addAnnotation(Deprecated.class);
+ }
+ if (!Strings.isBlank(option.getDescription())) {
+ String desc = option.getDescription();
+ if (!desc.endsWith(".")) {
+ desc = desc + ".";
+ }
+ desc = desc + " The option is a " + option.getJavaType() + " type.";
+ prop.getField().getJavaDoc().setFullText(desc);
+ }
+ }
+
+ String fileName = packageName.replaceAll("\\.", "\\/") + "/" + name + ".java";
+ writeSourceIfChanged(javaClass, fileName, false);
+ }
+
+ private Class<?> findEndpointClass(Class<?> componentClass) {
+ String endpointName = componentClass.getCanonicalName().replaceFirst("Component", "Endpoint");
+ if ("org.apache.camel.component.disruptor.vm.DisruptorVmEndpoint".equals(endpointName)) {
+ endpointName = "org.apache.camel.component.disruptor.DisruptorEndpoint";
+ } else if ("org.apache.camel.component.etcd.EtcdEndpoint".equals(endpointName)) {
+ endpointName = "org.apache.camel.component.etcd.AbstractEtcdPollingEndpoint";
+ } else if ("org.apache.camel.websocket.jsr356.JSR356WebSocketEndpoint".equals(endpointName)) {
+ endpointName = "org.apache.camel.websocket.jsr356.JSR356Endpoint";
+ }
+ return loadClass(endpointName);
+ }
+
+ private Field findField(Class<?> realComponentClass, Class<?> realEndpointClass, EndpointOptionModel option) throws NoSuchFieldException {
+ Field field = null;
+ List<Class<?>> classes = new ArrayList<>();
+ classes.add(realComponentClass);
+ classes.add(realEndpointClass);
+ while (!classes.isEmpty()) {
+ Class cl = classes.remove(0);
+ for (Field f : cl.getDeclaredFields()) {
+ String n = f.getName();
+ UriPath path = f.getAnnotation(UriPath.class);
+ if (path != null && !Strings.isBlank(path.name())) {
+ n = path.name();
+ }
+ UriParam param = f.getAnnotation(UriParam.class);
+ if (param != null && !Strings.isBlank(param.name())) {
+ n = param.name();
+ }
+ if (n.equals(option.getName())) {
+ field = f;
+ break;
+ }
+ if (f.getType().isAnnotationPresent(UriParams.class)) {
+ classes.add(f.getType());
+ }
+ }
+ if (field != null) {
+ break;
+ }
+ cl = cl.getSuperclass();
+ if (cl != null) {
+ classes.add(cl);
+ }
+ }
+ if (field == null) {
+ throw new NoSuchFieldException("Could not find field for option " + option.getName());
+ }
+ return field;
+ }
+
+ static boolean isPrimitive(String type) {
+ return PRIMITIVE_CLASSES.containsKey(type);
+ }
+
+ private Class<?> loadClass(String loadClassName) {
+ Class<?> optionClass;
+ String org = loadClassName;
+ while (true) {
+ try {
+ optionClass = getProjectClassLoader().loadClass(loadClassName);
+ break;
+ } catch (ClassNotFoundException e) {
+ int dotIndex = loadClassName.lastIndexOf('.');
+ if (dotIndex == -1) {
+ throw new IllegalArgumentException(org);
+ } else {
+ loadClassName = loadClassName.substring(0, dotIndex) + "$" + loadClassName.substring(dotIndex + 1);
+ }
+ }
+ }
+ return optionClass;
+ }
+
+
+ private GenericType getType(JavaClass javaClass, Map<String, JavaClass> enumClasses, String enums, String type) {
+ type = type.trim();
+ // Check if this is an array
+ if (type.endsWith("[]")) {
+ GenericType t = getType(javaClass, enumClasses, enums, type.substring(0, type.length() - 2));
+ return new GenericType(Array.newInstance(t.getRawClass(), 0).getClass(), t);
+ }
+ // Check if this is a generic
+ int genericIndex = type.indexOf('<');
+ if (genericIndex > 0) {
+ if (!type.endsWith(">")) {
+ throw new IllegalArgumentException("Can not load type: " + type);
+ }
+ GenericType base = getType(javaClass, enumClasses, enums, type.substring(0, genericIndex));
+ if (base.getRawClass() == Object.class) {
+ return base;
+ }
+ String[] params = splitParams(type.substring(genericIndex + 1, type.length() - 1));
+ GenericType[] types = new GenericType[params.length];
+ for (int i = 0; i < params.length; i++) {
+ types[i] = getType(javaClass, enumClasses, enums, params[i]);
+ }
+ return new GenericType(base.getRawClass(), types);
+ }
+ // Primitive
+ if (isPrimitive(type)) {
+ return new GenericType(PRIMITIVE_CLASSES.get(type));
+ }
+ // Extends
+ if (type.startsWith("? extends ")) {
+ String raw = type.substring("? extends ".length());
+ return new GenericType(loadClass(raw), BoundType.Extends);
+ }
+ // Super
+ if (type.startsWith("? super ")) {
+ String raw = type.substring("? extends ".length());
+ return new GenericType(loadClass(raw), BoundType.Super);
+ }
+ // Wildcard
+ if (type.equals("?")) {
+ return new GenericType(Object.class, BoundType.Extends);
+ }
+ if (loadClass(type).isEnum() && !Strings.isBlank(enums) && !isCamelCoreType(type)) {
+ String enumClassName = type.substring(type.lastIndexOf('.') + 1);
+ if (enumClassName.contains("$")) {
+ enumClassName = enumClassName.substring(enumClassName.indexOf('$') + 1);
+ }
+ JavaClass enumClass = enumClasses.get(enumClassName);
+ if (enumClass == null) {
+ enumClass = javaClass.addNestedType().setPublic().setStatic(true)
+ .setName(enumClassName).setEnum(true);
+ enumClasses.put(enumClassName, enumClass);
+ for (String value : enums.split(",")) {
+ enumClass.addValue(value
+ .replace('.', '_')
+ .replace('-', '_'));
+ }
+ }
+ type = javaClass.getPackage() + "." + javaClass.getName() + "$" + enumClassName;
+ return new GenericType(generateDummyClass(type));
+ }
+ if (!isCamelCoreType(type)) {
+ getLog().debug("Substituting java.lang.Object to " + type);
+ return new GenericType(Object.class);
+ }
+ return new GenericType(loadClass(type));
+ }
+
+ private String[] splitParams(String string) {
+ List<String> params = new ArrayList<>();
+ int cur = 0;
+ int start = 0;
+ int opened = 0;
+ while (true) {
+ int nextComma = string.indexOf(',', cur);
+ int nextOpen = string.indexOf('<', cur);
+ int nextClose = string.indexOf('>', cur);
+ if (nextComma < 0) {
+ params.add(string.substring(start));
+ return params.toArray(new String[0]);
+ } else if ((nextOpen < 0 || nextComma < nextOpen)
+ && (nextClose < 0 || nextComma < nextClose)
+ && opened == 0) {
+ params.add(string.substring(start, nextComma));
+ start = cur = nextComma + 1;
+ } else if (nextOpen < 0) {
+ if (--opened < 0) {
+ throw new IllegalStateException();
+ }
+ cur = nextClose + 1;
+ } else if (nextClose < 0 || nextOpen < nextClose) {
+ ++opened;
+ cur = nextOpen + 1;
+ } else {
+ if (--opened < 0) {
+ throw new IllegalStateException();
+ }
+ cur = nextClose + 1;
+ }
+ }
+ }
+
+ private boolean isCamelCoreType(String type) {
+ return type.startsWith("java.")
+ || type.matches("org\\.apache\\.camel\\.(spi\\.)?([A-Za-z]+)");
+ }
+
+ protected DynamicClassLoader getProjectClassLoader() {
+ if (projectClassLoader == null) {
+ final List<?> classpathElements;
+ try {
+ classpathElements = project.getTestClasspathElements();
+ } catch (org.apache.maven.artifact.DependencyResolutionRequiredException e) {
+ throw new RuntimeException(e.getMessage(), e);
+ }
+ final URL[] urls = new URL[classpathElements.size()];
+ int i = 0;
+ for (Iterator<?> it = classpathElements.iterator(); it.hasNext(); i++) {
+ try {
+ urls[i] = new File((String)it.next()).toURI().toURL();
+ } catch (MalformedURLException e) {
+ throw new RuntimeException(e.getMessage(), e);
+ }
+ }
+ final ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ projectClassLoader = new DynamicClassLoader(urls, tccl != null ? tccl : getClass().getClassLoader());
+ }
+ return projectClassLoader;
+ }
+
+ static class DynamicClassLoader extends URLClassLoader {
+ public DynamicClassLoader(URL[] urls, ClassLoader parent) {
+ super(urls, parent);
+ }
+
+ public Class defineClass(String name, byte[] data) {
+ return super.defineClass(name, data, 0, data.length);
+ }
+ }
+
+ private Class generateDummyClass(String clazzName) {
+ try {
+ return getProjectClassLoader().loadClass(clazzName);
+ } catch (ClassNotFoundException e) {
+ ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);
+ cw.visit(Opcodes.V1_8, Opcodes.ACC_PUBLIC, clazzName.replace('.', '/'), null, "java/lang/Object", null);
+ cw.visitEnd();
+ return getProjectClassLoader().defineClass(clazzName, cw.toByteArray());
+ }
+ }
+
+ private static String loadComponentJson(Map<File, Supplier<String>> jsonFiles, String componentName) {
+ return loadJsonOfType(jsonFiles, componentName, "component");
+ }
+
+ private static String loadJsonOfType(Map<File, Supplier<String>> jsonFiles, String modelName, String type) {
+ for (Map.Entry<File, Supplier<String>> entry : jsonFiles.entrySet()) {
+ if (entry.getKey().getName().equals(modelName + ".json")) {
+ String json = entry.getValue().get();
+ if (json.contains("\"kind\": \"" + type + "\"")) {
+ return json;
+ }
+ }
+ }
+ return null;
+ }
+
+ private static ComponentModel generateComponentModel(String componentName, String json) {
+ List<Map<String, String>> rows = JSonSchemaHelper.parseJsonSchema("component", json, false);
+
+ ComponentModel component = new ComponentModel(true);
+ component.setScheme(getSafeValue("scheme", rows));
+ component.setSyntax(getSafeValue("syntax", rows));
+ component.setAlternativeSyntax(getSafeValue("alternativeSyntax", rows));
+ component.setTitle(getSafeValue("title", rows));
+ component.setDescription(getSafeValue("description", rows));
+ component.setFirstVersion(JSonSchemaHelper.getSafeValue("firstVersion", rows));
+ component.setLabel(getSafeValue("label", rows));
+ component.setDeprecated(getSafeValue("deprecated", rows));
+ component.setDeprecationNote(getSafeValue("deprecationNote", rows));
+ component.setConsumerOnly(getSafeValue("consumerOnly", rows));
+ component.setProducerOnly(getSafeValue("producerOnly", rows));
+ component.setJavaType(getSafeValue("javaType", rows));
+ component.setGroupId(getSafeValue("groupId", rows));
+ component.setArtifactId(getSafeValue("artifactId", rows));
+ component.setVersion(getSafeValue("version", rows));
+
+ rows = JSonSchemaHelper.parseJsonSchema("componentProperties", json, true);
+ for (Map<String, String> row : rows) {
+ ComponentOptionModel option = new ComponentOptionModel();
+ option.setName(getSafeValue("name", row));
+ option.setDisplayName(getSafeValue("displayName", row));
+ option.setKind(getSafeValue("kind", row));
+ option.setType(getSafeValue("type", row));
+ option.setJavaType(getSafeValue("javaType", row));
+ option.setDeprecated(getSafeValue("deprecated", row));
+ option.setDeprecationNote(getSafeValue("deprecationNote", row));
+ option.setDescription(getSafeValue("description", row));
+ option.setDefaultValue(getSafeValue("defaultValue", row));
+ option.setEnums(getSafeValue("enum", row));
+ component.addComponentOption(option);
+ }
+
+ rows = JSonSchemaHelper.parseJsonSchema("properties", json, true);
+ for (Map<String, String> row : rows) {
+ EndpointOptionModel option = new EndpointOptionModel();
+ option.setName(getSafeValue("name", row));
+ option.setDisplayName(getSafeValue("displayName", row));
+ option.setKind(getSafeValue("kind", row));
+ option.setGroup(getSafeValue("group", row));
+ option.setLabel(getSafeValue("label", row));
+ option.setRequired(getSafeValue("required", row));
+ option.setType(getSafeValue("type", row));
+ option.setJavaType(getSafeValue("javaType", row));
+ option.setEnums(getSafeValue("enum", row));
+ option.setPrefix(getSafeValue("prefix", row));
+ option.setMultiValue(getSafeValue("multiValue", row));
+ option.setDeprecated(getSafeValue("deprecated", row));
+ option.setDeprecationNote(getSafeValue("deprecationNote", row));
+ option.setDefaultValue(getSafeValue("defaultValue", row));
+ option.setDescription(getSafeValue("description", row));
+ option.setEnumValues(getSafeValue("enum", row));
+ component.addEndpointOption(option);
+ }
+
+ return component;
+ }
+
+ private void findComponentNames(File dir, Set<String> componentNames) {
+ File f = new File(dir, "classes/META-INF/services/org/apache/camel/component");
+
+ if (f.exists() && f.isDirectory()) {
+ File[] files = f.listFiles();
+ if (files != null) {
+ for (File file : files) {
+ // skip directories as there may be a sub .resolver
+ // directory
+ if (file.isDirectory()) {
+ continue;
+ }
+ String name = file.getName();
+ if (name.charAt(0) != '.') {
+ componentNames.add(name);
+ }
+ }
+ }
+ }
+ }
+
+ private void writeSourceIfChanged(JavaClass source, String fileName, boolean innerClassesLast) throws MojoFailureException {
+ writeSourceIfChanged(source.printClass(innerClassesLast), fileName);
+ }
+
+ private void writeSourceIfChanged(String source, String fileName) throws MojoFailureException {
+ File core = findCamelCoreDirectory(project.getBasedir());
+
+ File target = new File(new File(core, "src/main/java"), fileName);
+
+ try {
+ String header;
+ try (InputStream is = getClass().getClassLoader().getResourceAsStream("license-header-java.txt")) {
+ header = loadText(is);
+ }
+ String code = header + source;
+ getLog().debug("Source code generated:\n" + code);
+
+ updateResource(null, target.toPath(), code);
+ } catch (Exception e) {
+ throw new MojoFailureException("IOError with file " + target, e);
+ }
+ }
+
+}
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/ClassUtil.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/ClassUtil.java
new file mode 100644
index 0000000..7c1d0ea
--- /dev/null
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/ClassUtil.java
@@ -0,0 +1,218 @@
+/*
+ * 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.maven.packaging.generics;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.GenericArrayType;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.lang.reflect.WildcardType;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * Utility classes with respect to the class operations.
+ *
+ * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
+ * @since 1.0
+ */
+public final class ClassUtil {
+ public static final Map<Class<?>, Class<?>> PRIMITIVE_TO_WRAPPERS_MAP;
+
+ static {
+ Map<Class<?>, Class<?>> primitiveToWrappersMap = new HashMap<Class<?>, Class<?>>();
+ primitiveToWrappersMap.put(Integer.TYPE, Integer.class);
+ primitiveToWrappersMap.put(Float.TYPE, Float.class);
+ primitiveToWrappersMap.put(Double.TYPE, Double.class);
+ primitiveToWrappersMap.put(Character.TYPE, Character.class);
+ primitiveToWrappersMap.put(Long.TYPE, Long.class);
+ primitiveToWrappersMap.put(Byte.TYPE, Byte.class);
+ primitiveToWrappersMap.put(Short.TYPE, Short.class);
+ primitiveToWrappersMap.put(Boolean.TYPE, Boolean.class);
+ primitiveToWrappersMap.put(Void.TYPE, Void.class);
+ PRIMITIVE_TO_WRAPPERS_MAP = Collections.unmodifiableMap(primitiveToWrappersMap);
+ }
+
+ public static final Type[] NO_TYPES = new Type[0];
+
+ /*
+ * Private constructor
+ */
+ private ClassUtil() {
+ throw new UnsupportedOperationException();
+ }
+
+ public static boolean isSame(Type type1, Type type2) {
+ if ((type1 instanceof Class) && ((Class<?>) type1).isPrimitive()) {
+ type1 = PRIMITIVE_TO_WRAPPERS_MAP.get(type1);
+ }
+ if ((type2 instanceof Class) && ((Class<?>) type2).isPrimitive()) {
+ type2 = PRIMITIVE_TO_WRAPPERS_MAP.get(type2);
+ }
+ return type1 == type2;
+ }
+
+ public static Class<?> getPrimitiveWrapper(Class<?> clazz) {
+ return PRIMITIVE_TO_WRAPPERS_MAP.get(clazz);
+
+ }
+
+ /**
+ * Gets the class of the given type arguments.
+ * <p>
+ * If the given type {@link Type} parameters is an instance of the
+ * {@link ParameterizedType}, it returns the raw type otherwise it return
+ * the casted {@link Class} of the type argument.
+ * </p>
+ *
+ * @param type class or parametrized type
+ * @return
+ */
+ public static Class<?> getClass(Type type)
+ {
+ return getClazz(type);
+ }
+
+
+ /**
+ * Returns true if type is an instance of <code>ParameterizedType</code>
+ * else otherwise.
+ *
+ * @param type type of the artifact
+ * @return true if type is an instance of <code>ParameterizedType</code>
+ */
+ public static boolean isParametrizedType(Type type)
+ {
+ return type instanceof ParameterizedType;
+ }
+
+ /**
+ * Returns true if type is an instance of <code>WildcardType</code>
+ * else otherwise.
+ *
+ * @param type type of the artifact
+ * @return true if type is an instance of <code>WildcardType</code>
+ */
+ public static boolean isWildCardType(Type type)
+ {
+ return type instanceof WildcardType;
+ }
+
+
+ /**
+ * Returns true if rhs is assignable type
+ * to the lhs, false otherwise.
+ *
+ * @param lhs left hand side class
+ * @param rhs right hand side class
+ * @return true if rhs is assignable to lhs
+ */
+ public static boolean isClassAssignableFrom(Class<?> lhs, Class<?> rhs)
+ {
+ if(lhs.isPrimitive())
+ {
+ lhs = getPrimitiveWrapper(lhs);
+ }
+
+ if(rhs.isPrimitive())
+ {
+ rhs = getPrimitiveWrapper(rhs);
+ }
+
+ if (lhs.isAssignableFrom(rhs))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Return raw class type for given type.
+ *
+ * @param type base type instance
+ * @return class type for given type
+ */
+ public static Class<?> getClazz(Type type) {
+ if (type instanceof ParameterizedType) {
+ ParameterizedType pt = (ParameterizedType) type;
+ return (Class<?>) pt.getRawType();
+ } else if (type instanceof Class) {
+ return (Class<?>) type;
+ } else if (type instanceof GenericArrayType) {
+ GenericArrayType arrayType = (GenericArrayType) type;
+ return Array.newInstance(getClazz(arrayType.getGenericComponentType()), 0).getClass();
+ } else if (type instanceof WildcardType) {
+ WildcardType wildcardType = (WildcardType) type;
+ Type[] bounds = wildcardType.getUpperBounds();
+ if (bounds.length > 1) {
+ throw new IllegalArgumentException("Illegal use of wild card type with more than one upper bound: " + wildcardType);
+ } else if (bounds.length == 0) {
+ return Object.class;
+ } else {
+ return getClass(bounds[0]);
+ }
+ } else if (type instanceof TypeVariable) {
+ TypeVariable<?> typeVariable = (TypeVariable<?>) type;
+ if (typeVariable.getBounds().length > 1) {
+ throw new IllegalArgumentException("Illegal use of type variable with more than one bound: " + typeVariable);
+ } else {
+ Type[] bounds = typeVariable.getBounds();
+ if (bounds.length == 0) {
+ return Object.class;
+ } else {
+ return getClass(bounds[0]);
+ }
+ }
+ } else {
+ throw new IllegalArgumentException("Unsupported type " + type);
+ }
+ }
+
+
+ public static boolean isRawClassEquals(Type ipType, Type apiType) {
+ Class ipClass = getRawPrimitiveType(ipType);
+ Class apiClass = getRawPrimitiveType(apiType);
+
+ if (ipClass == null || apiClass == null) {
+ // we found some illegal generics
+ return false;
+ }
+
+ return ipClass.equals(apiClass);
+ }
+
+ private static Class getRawPrimitiveType(Type type) {
+ if (type instanceof Class) {
+ if (((Class) type).isPrimitive()) {
+ return getPrimitiveWrapper((Class) type);
+ }
+ return (Class) type;
+ }
+
+ if (type instanceof ParameterizedType) {
+ return getRawPrimitiveType(((ParameterizedType) type).getRawType());
+ }
+
+ return null;
+ }
+}
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/GenericsUtil.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/GenericsUtil.java
new file mode 100644
index 0000000..ec68bfb
--- /dev/null
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/GenericsUtil.java
@@ -0,0 +1,880 @@
+/*
+ * 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.maven.packaging.generics;
+
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.GenericArrayType;
+import java.lang.reflect.GenericDeclaration;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.lang.reflect.WildcardType;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Utility classes for generic type operations.
+ */
+public final class GenericsUtil {
+ public static boolean satisfiesDependency(boolean isDelegateOrEvent, boolean isProducer, Type injectionPointType, Type beanType) {
+ if (beanType instanceof TypeVariable || beanType instanceof WildcardType || beanType instanceof GenericArrayType) {
+ return isAssignableFrom(isDelegateOrEvent, isProducer, injectionPointType, beanType);
+ } else {
+ Type injectionPointRawType = injectionPointType instanceof ParameterizedType ? ((ParameterizedType) injectionPointType).getRawType() : injectionPointType;
+ Type beanRawType = beanType instanceof ParameterizedType ? ((ParameterizedType) beanType).getRawType() : beanType;
+
+ if (ClassUtil.isSame(injectionPointRawType, beanRawType)) {
+ return isAssignableFrom(isDelegateOrEvent, isProducer, injectionPointType, beanType);
+ }
+ }
+
+ return false;
+ }
+
+ public static boolean satisfiesDependencyRaw(boolean isDelegateOrEvent, boolean isProducer, Type injectionPointType, Type beanType) {
+ if (beanType instanceof TypeVariable || beanType instanceof WildcardType || beanType instanceof GenericArrayType) {
+ return isAssignableFrom(isDelegateOrEvent, isProducer, injectionPointType, beanType);
+ } else {
+ Type injectionPointRawType = injectionPointType instanceof ParameterizedType ? ((ParameterizedType) injectionPointType).getRawType() : injectionPointType;
+ Type beanRawType = beanType instanceof ParameterizedType ? ((ParameterizedType) beanType).getRawType() : beanType;
+
+ if (ClassUtil.isSame(injectionPointRawType, beanRawType)) {
+ return isAssignableFrom(isDelegateOrEvent, isProducer, injectionPointRawType, beanRawType);
+ } else {
+ Class bean = (Class) beanType;
+ if (bean.getSuperclass() != null && ClassUtil.isRawClassEquals(injectionPointType, bean.getSuperclass())) {
+ return true;
+ }
+
+ Class<?>[] interfaces = bean.getInterfaces();
+ if (interfaces == null || interfaces.length == 0) {
+ return false;
+ }
+
+ for (Class<?> clazz : interfaces) {
+ if (ClassUtil.isRawClassEquals(injectionPointType, clazz)) {
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * 5.2.3 and 5.2.4
+ */
+ public static boolean isAssignableFrom(boolean isDelegateOrEvent, boolean isProducer, Type requiredType, Type beanType) {
+ if (requiredType instanceof Class) {
+ return isAssignableFrom(isDelegateOrEvent, (Class<?>) requiredType, beanType);
+ } else if (requiredType instanceof ParameterizedType) {
+ return isAssignableFrom(isDelegateOrEvent, isProducer, (ParameterizedType) requiredType, beanType);
+ } else if (requiredType instanceof TypeVariable) {
+ return isAssignableFrom(isDelegateOrEvent, (TypeVariable<?>) requiredType, beanType);
+ } else if (requiredType instanceof GenericArrayType) {
+ return Class.class.isInstance(beanType) && Class.class.cast(beanType).isArray()
+ && isAssignableFrom(isDelegateOrEvent, (GenericArrayType) requiredType, beanType);
+ } else if (requiredType instanceof WildcardType) {
+ return isAssignableFrom(isDelegateOrEvent, (WildcardType) requiredType, beanType);
+ } else {
+ throw new IllegalArgumentException("Unsupported type " + requiredType.getClass());
+ }
+ }
+
+ private static boolean isAssignableFrom(boolean isDelegateOrEvent, Class<?> injectionPointType, Type beanType) {
+ if (beanType instanceof Class) {
+ return isAssignableFrom(injectionPointType, (Class<?>) beanType);
+ } else if (beanType instanceof TypeVariable) {
+ return isAssignableFrom(isDelegateOrEvent, injectionPointType, (TypeVariable<?>) beanType);
+ } else if (beanType instanceof ParameterizedType) {
+ return isAssignableFrom(isDelegateOrEvent, injectionPointType, (ParameterizedType) beanType);
+ } else if (beanType instanceof GenericArrayType) {
+ return isAssignableFrom(isDelegateOrEvent, injectionPointType, (GenericArrayType) beanType);
+ } else if (beanType instanceof WildcardType) {
+ return isAssignableFrom(isDelegateOrEvent, (Type) injectionPointType, (WildcardType) beanType);
+ } else {
+ throw new IllegalArgumentException("Unsupported type " + injectionPointType.getClass());
+ }
+ }
+
+ private static boolean isAssignableFrom(Class<?> injectionPointType, Class<?> beanType) {
+ return ClassUtil.isClassAssignableFrom(injectionPointType, beanType);
+ }
+
+ private static boolean isAssignableFrom(boolean isDelegateOrEvent, Class<?> injectionPointType, TypeVariable<?> beanType) {
+ for (Type bounds : beanType.getBounds()) {
+ if (isAssignableFrom(isDelegateOrEvent, injectionPointType, bounds)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * CDI Spec. 5.2.4: "A parameterized bean type is considered assignable to a raw required type
+ * if the raw generics are identical and all type parameters of the bean type are either unbounded type variables or java.lang.Object."
+ */
+ private static boolean isAssignableFrom(boolean isDelegateOrEvent, Class<?> injectionPointType, ParameterizedType beanType) {
+ if (beanType.getRawType() != injectionPointType) {
+ return false; //raw generics don't match
+ }
+
+ if (isDelegateOrEvent) {
+ // for delegate and events we match 'in reverse' kind off
+ // @Observes ProcessInjectionPoint<?, Instance> does also match Instance<SomeBean>
+ return isAssignableFrom(true, injectionPointType, beanType.getRawType());
+ }
+
+ for (Type typeArgument : beanType.getActualTypeArguments()) {
+ if (typeArgument == Object.class) {
+ continue;
+ }
+ if (!(typeArgument instanceof TypeVariable)) {
+ return false; //neither object nor type variable
+ }
+ TypeVariable<?> typeVariable = (TypeVariable<?>) typeArgument;
+ for (Type bounds : typeVariable.getBounds()) {
+ if (bounds != Object.class) {
+ return false; //bound type variable
+ }
+ }
+ }
+ return true;
+ }
+
+ private static boolean isAssignableFrom(boolean isDelegateOrEvent, Class<?> injectionPointType, GenericArrayType beanType) {
+ return injectionPointType.isArray() && isAssignableFrom(isDelegateOrEvent, injectionPointType.getComponentType(), beanType.getGenericComponentType());
+ }
+
+ private static boolean isAssignableFrom(boolean isDelegateOrEvent, Type injectionPointType, WildcardType beanType) {
+ for (Type bounds : beanType.getLowerBounds()) {
+ if (!isAssignableFrom(isDelegateOrEvent, false, bounds, injectionPointType)) {
+ return false;
+ }
+ }
+ for (Type bounds : beanType.getUpperBounds()) {
+ if (isAssignableFrom(isDelegateOrEvent, false, injectionPointType, bounds)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static boolean isAssignableFrom(boolean isDelegateOrEvent, boolean isProducer, ParameterizedType injectionPointType, Type beanType) {
+ if (beanType instanceof Class) {
+ return isAssignableFrom(isDelegateOrEvent, isProducer, injectionPointType, (Class<?>) beanType);
+ } else if (beanType instanceof TypeVariable) {
+ return isAssignableFrom(isDelegateOrEvent, isProducer, injectionPointType, (TypeVariable<?>) beanType);
+ } else if (beanType instanceof ParameterizedType) {
+ return isAssignableFrom(isDelegateOrEvent, injectionPointType, (ParameterizedType) beanType);
+ } else if (beanType instanceof WildcardType) {
+ return isAssignableFrom(isDelegateOrEvent, injectionPointType, (WildcardType) beanType);
+ } else if (beanType instanceof GenericArrayType) {
+ return false;
+ } else {
+ throw new IllegalArgumentException("Unsupported type " + beanType.getClass());
+ }
+ }
+
+ private static boolean isAssignableFrom(boolean isDelegateOrEvent, boolean isProducer, ParameterizedType injectionPointType, Class<?> beanType) {
+ Class<?> rawInjectionPointType = getRawType(injectionPointType);
+ if (rawInjectionPointType.equals(beanType)) {
+ if (isProducer) {
+ for (final Type t : injectionPointType.getActualTypeArguments()) {
+ if (!TypeVariable.class.isInstance(t) || !isNotBound(TypeVariable.class.cast(t).getBounds())) {
+ if (!Class.class.isInstance(t) || Object.class != t) {
+ return false;
+ }
+ }
+ }
+ }
+ return true;
+ }
+ if (!rawInjectionPointType.isAssignableFrom(beanType)) {
+ return false;
+ }
+ if (beanType.getSuperclass() != null && isAssignableFrom(isDelegateOrEvent, isProducer, injectionPointType, beanType.getGenericSuperclass())) {
+ return true;
+ }
+ for (Type genericInterface : beanType.getGenericInterfaces()) {
+ if (isAssignableFrom(isDelegateOrEvent, isProducer, injectionPointType, genericInterface)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static boolean isAssignableFrom(boolean isDelegateOrEvent, boolean isProducer, ParameterizedType injectionPointType, TypeVariable<?> beanType) {
+ final Type[] types = beanType.getBounds();
+ if (isNotBound(types)) {
+ return true;
+ }
+ for (final Type bounds : types) {
+ if (isAssignableFrom(isDelegateOrEvent, isProducer, injectionPointType, bounds)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * CDI Spec. 5.2.4
+ */
+ private static boolean isAssignableFrom(boolean isDelegateOrEvent, ParameterizedType injectionPointType, ParameterizedType beanType) {
+ if (injectionPointType.getRawType() != beanType.getRawType()) {
+ return false;
+ }
+ boolean swapParams = !isDelegateOrEvent;
+ Type[] injectionPointTypeArguments = injectionPointType.getActualTypeArguments();
+ Type[] beanTypeArguments = beanType.getActualTypeArguments();
+ for (int i = 0; i < injectionPointTypeArguments.length; i++) {
+ Type injectionPointTypeArgument = injectionPointTypeArguments[i];
+ Type beanTypeArgument = beanTypeArguments[i];
+
+ // for this special case it's actually an 'assignable to', thus we swap the params, see CDI-389
+ // but this special rule does not apply to Delegate injection points...
+ if (swapParams &&
+ (injectionPointTypeArgument instanceof Class || injectionPointTypeArgument instanceof TypeVariable) &&
+ beanTypeArgument instanceof TypeVariable) {
+ final Type[] bounds = ((TypeVariable<?>) beanTypeArgument).getBounds();
+ final boolean isNotBound = isNotBound(bounds);
+ if (!isNotBound) {
+ for (final Type upperBound : bounds) {
+ if (!isAssignableFrom(true, false, upperBound, injectionPointTypeArgument)) {
+ return false;
+ }
+ }
+ }
+ } else if (swapParams && injectionPointTypeArgument instanceof TypeVariable) {
+ return false;
+ } else if (isDelegateOrEvent && injectionPointTypeArgument instanceof Class && beanTypeArgument instanceof Class) {
+ // if no wildcard type was given then we require a real exact match.
+ return injectionPointTypeArgument.equals(beanTypeArgument);
+
+ } else if (!isAssignableFrom(isDelegateOrEvent, false, injectionPointTypeArgument, beanTypeArgument)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private static boolean isNotBound(final Type... bounds) {
+ return bounds == null || bounds.length == 0 || (bounds.length == 1 && Object.class == bounds[0]);
+ }
+
+ private static boolean isAssignableFrom(boolean isDelegateOrEvent, TypeVariable<?> injectionPointType, Type beanType) {
+ for (Type bounds : injectionPointType.getBounds()) {
+ if (!isAssignableFrom(isDelegateOrEvent, false, bounds, beanType)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ // rules are a bit different when in an array so we handle ParameterizedType manually (not reusing isAssignableFrom)
+ private static boolean isAssignableFrom(boolean isDelegateOrEvent, GenericArrayType injectionPointType, Type beanType) {
+ final Type genericComponentType = injectionPointType.getGenericComponentType();
+ final Class componentType = Class.class.cast(beanType).getComponentType();
+ if (Class.class.isInstance(genericComponentType)) {
+ return Class.class.cast(genericComponentType).isAssignableFrom(componentType);
+ }
+ if (ParameterizedType.class.isInstance(genericComponentType)) {
+ return isAssignableFrom(isDelegateOrEvent, false, ParameterizedType.class.cast(genericComponentType).getRawType(), componentType);
+ }
+ return isAssignableFrom(isDelegateOrEvent, false, genericComponentType, componentType);
+ }
+
+ private static boolean isAssignableFrom(boolean isDelegateOrEvent, WildcardType injectionPointType, Type beanType) {
+ if (beanType instanceof TypeVariable) {
+ return isAssignableFrom(isDelegateOrEvent, injectionPointType, (TypeVariable<?>) beanType);
+ }
+ for (Type bounds : injectionPointType.getLowerBounds()) {
+ if (!isAssignableFrom(isDelegateOrEvent, false, beanType, bounds)) {
+ return false;
+ }
+ }
+ for (Type bounds : injectionPointType.getUpperBounds()) {
+ Set<Type> beanTypeClosure = getTypeClosure(beanType);
+ boolean isAssignable = false;
+ for (Type beanSupertype : beanTypeClosure) {
+ if (isAssignableFrom(isDelegateOrEvent, false, bounds, beanSupertype)
+ || (Class.class.isInstance(bounds)
+ && ParameterizedType.class.isInstance(beanSupertype)
+ && bounds == ParameterizedType.class.cast(beanSupertype).getRawType())) {
+ isAssignable = true;
+ break;
+ }
+ }
+ if (!isAssignable) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * CDI 1.1 Spec. 5.2.4, third bullet point
+ */
+ private static boolean isAssignableFrom(boolean isDelegateOrEvent, WildcardType injectionPointType, TypeVariable<?> beanType) {
+ for (Type upperBound : injectionPointType.getUpperBounds()) {
+ for (Type bound : beanType.getBounds()) {
+ if (!isAssignableFrom(isDelegateOrEvent, false, upperBound, bound) && !isAssignableFrom(isDelegateOrEvent, false, bound, upperBound)) {
+ return false;
+ }
+ }
+ }
+ for (Type lowerBound : injectionPointType.getLowerBounds()) {
+ for (Type bound : beanType.getBounds()) {
+ if (!isAssignableFrom(isDelegateOrEvent, false, bound, lowerBound)) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * @return <tt>true</tt>, if the specified type declaration contains an unresolved type variable.
+ */
+ public static boolean containsTypeVariable(Type type) {
+ if (type instanceof Class) {
+ return false;
+ } else if (type instanceof TypeVariable) {
+ return true;
+ } else if (type instanceof ParameterizedType) {
+ ParameterizedType parameterizedType = (ParameterizedType) type;
+ return containTypeVariable(parameterizedType.getActualTypeArguments());
+ } else if (type instanceof WildcardType) {
+ WildcardType wildcardType = (WildcardType) type;
+ return containTypeVariable(wildcardType.getUpperBounds()) || containTypeVariable(wildcardType.getLowerBounds());
+ } else if (type instanceof GenericArrayType) {
+ GenericArrayType arrayType = (GenericArrayType) type;
+ return containsTypeVariable(arrayType.getGenericComponentType());
+ } else {
+ throw new IllegalArgumentException("Unsupported type " + type.getClass().getName());
+ }
+
+ }
+
+ public static boolean containTypeVariable(Collection<? extends Type> types) {
+ return containTypeVariable(types.toArray(new Type[types.size()]));
+ }
+
+ public static boolean containTypeVariable(Type[] types) {
+ for (Type type : types) {
+ if (containsTypeVariable(type)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @param type to check
+ * @return {@code true} if the given type contains a {@link WildcardType}
+ * {@code false} otherwise
+ */
+ public static boolean containsWildcardType(Type type) {
+ if (!(type instanceof ParameterizedType)) {
+ return false;
+ }
+
+ for (Type typeArgument : getParameterizedType(type).getActualTypeArguments()) {
+ if (ClassUtil.isParametrizedType(typeArgument)) {
+ if (containsWildcardType(typeArgument)) {
+ return true;
+ }
+ } else {
+ if (ClassUtil.isWildCardType(typeArgument)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+
+ /**
+ * Resolves the actual type of the specified field for the type hierarchy specified by the given subclass
+ */
+ public static Type resolveType(Class<?> subclass, Field field) {
+ return resolveType(field.getGenericType(), subclass, newSeenList());
+ }
+
+ /**
+ * Resolves the actual return type of the specified method for the type hierarchy specified by the given subclass
+ */
+ public static Type resolveReturnType(Class<?> subclass, Method method) {
+ return resolveType(method.getGenericReturnType(), subclass, newSeenList());
+ }
+
+ /**
+ * Resolves the actual parameter generics of the specified constructor for the type hierarchy specified by the given subclass
+ */
+ public static Type[] resolveParameterTypes(Class<?> subclass, Constructor<?> constructor) {
+ return resolveTypes(constructor.getGenericParameterTypes(), subclass);
+ }
+
+ /**
+ * Resolves the actual parameter generics of the specified method for the type hierarchy specified by the given subclass
+ */
+ public static Type[] resolveParameterTypes(Class<?> subclass, Method method) {
+ return resolveTypes(method.getGenericParameterTypes(), subclass);
+ }
+
+ /**
+ * Resolves the actual type of the specified type for the type hierarchy specified by the given subclass
+ */
+ public static Type resolveType(Type type, Class<?> subclass, Member member) {
+ return resolveType(type, subclass, newSeenList());
+ }
+
+ public static Type resolveType(Type type, Class<?> subclass, Member member, Collection<TypeVariable<?>> seen) {
+ return resolveType(type, subclass, seen);
+ }
+
+ public static Type resolveType(Type type, Type actualType, Collection<TypeVariable<?>> seen) {
+ if (type instanceof Class) {
+ return type;
+ } else if (type instanceof ParameterizedType) {
+ ParameterizedType parameterizedType = (ParameterizedType) type;
+
+ Type[] resolvedTypeArguments;
+ if (Enum.class.equals(parameterizedType.getRawType())) {
+ // Enums derive from themselves, which would create an infinite loop
+ // we directly escape the loop if we detect this.
+ resolvedTypeArguments = new Type[]{new OwbWildcardTypeImpl(new Type[]{Enum.class}, ClassUtil.NO_TYPES)};
+ } else {
+ resolvedTypeArguments = resolveTypes(parameterizedType.getActualTypeArguments(), actualType, seen);
+
+ }
+
+ return new OwbParametrizedTypeImpl(parameterizedType.getOwnerType(), parameterizedType.getRawType(), resolvedTypeArguments);
+ } else if (type instanceof TypeVariable) {
+ TypeVariable<?> variable = (TypeVariable<?>) type;
+ return resolveTypeVariable(variable, actualType, seen);
+ } else if (type instanceof WildcardType) {
+ WildcardType wildcardType = (WildcardType) type;
+ Type[] upperBounds = resolveTypes(wildcardType.getUpperBounds(), actualType, seen);
+ Type[] lowerBounds = resolveTypes(wildcardType.getLowerBounds(), actualType, seen);
+ return new OwbWildcardTypeImpl(upperBounds, lowerBounds);
+ } else if (type instanceof GenericArrayType) {
+ GenericArrayType arrayType = (GenericArrayType) type;
+ return createArrayType(resolveType(arrayType.getGenericComponentType(), actualType, seen));
+ } else {
+ throw new IllegalArgumentException("Unsupported type " + type.getClass().getName());
+ }
+ }
+
+ public static Type[] resolveTypes(Type[] types, Type actualType, Collection<TypeVariable<?>> seen) {
+ Type[] resolvedTypeArguments = new Type[types.length];
+ for (int i = 0; i < types.length; i++) {
+ final Type type = resolveType(types[i], actualType, seen);
+ if (type != null) // means a stackoverflow was avoided, just keep what we have
+ {
+ resolvedTypeArguments[i] = type;
+ }
+ }
+ return resolvedTypeArguments;
+ }
+
+ public static Type[] resolveTypes(Type[] types, Type actualType) {
+ Type[] resolvedTypeArguments = new Type[types.length];
+ for (int i = 0; i < types.length; i++) {
+ resolvedTypeArguments[i] = resolveType(types[i], actualType, newSeenList());
+ }
+ return resolvedTypeArguments;
+ }
+
+ public static Set<Type> getTypeClosure(Class<?> type) {
+ return getTypeClosure(type, type);
+ }
+
+ public static Set<Type> getTypeClosure(Type actualType) {
+ return getTypeClosure(actualType, actualType);
+ }
+
+ /**
+ * Returns the type closure for the specified parameters.
+ * <h3>Example 1:</h3>
+ * <p>
+ * Take the following classes:
+ * </p>
+ * <code>
+ * public class Foo<T> {
+ * private T t;
+ * }
+ * public class Bar extends Foo<Number> {
+ * }
+ * </code>
+ * <p>
+ * To get the type closure of T in the context of Bar (which is {Number.class, Object.class}), you have to call this method like
+ * </p>
+ * <code>
+ * GenericUtil.getTypeClosure(Foo.class.getDeclaredField("t").getType(), Bar.class, Foo.class);
+ * </code>
+ * <h3>Example 2:</h3>
+ * <p>
+ * Take the following classes:
+ * </p>
+ * <code>
+ * public class Foo<T> {
+ * private T t;
+ * }
+ * public class Bar<T> extends Foo<T> {
+ * }
+ * </code>
+ * <p>
+ * To get the type closure of Bar<T> in the context of Foo<Number> (which are besides Object.class the <tt>ParameterizedType</tt>s Bar<Number> and Foo<Number>),
+ * you have to call this method like
+ * </p>
+ * <code>
+ * GenericUtil.getTypeClosure(Foo.class, new TypeLiteral<Foo<Number>>() {}.getType(), Bar.class);
+ * </code>
+ *
+ * @param type the type to get the closure for
+ * @param actualType the context to bind type variables
+ * @return the type closure
+ */
+ public static Set<Type> getTypeClosure(Type type, Type actualType) {
+ Class<?> rawType = getRawType(type);
+ Class<?> actualRawType = getRawType(actualType);
+ if (rawType.isAssignableFrom(actualRawType) && rawType != actualRawType) {
+ return getTypeClosure(actualType, type);
+ }
+ if (hasTypeParameters(type)) {
+ type = getParameterizedType(type);
+ }
+ return getDirectTypeClosure(type, actualType);
+ }
+
+ public static Set<Type> getDirectTypeClosure(final Type type, final Type actualType) {
+ Set<Type> typeClosure = new HashSet<Type>();
+ typeClosure.add(Object.class);
+ fillTypeHierarchy(typeClosure, type, actualType);
+ return typeClosure;
+ }
+
+ private static void fillTypeHierarchy(Set<Type> set, Type type, Type actualType) {
+ if (type == null) {
+ return;
+ }
+ Type resolvedType = GenericsUtil.resolveType(type, actualType, newSeenList());
+ set.add(resolvedType);
+ Class<?> resolvedClass = GenericsUtil.getRawType(resolvedType, actualType);
+ if (resolvedClass.getSuperclass() != null) {
+ fillTypeHierarchy(set, resolvedClass.getGenericSuperclass(), resolvedType);
+ }
+ for (Type interfaceType : resolvedClass.getGenericInterfaces()) {
+ fillTypeHierarchy(set, interfaceType, resolvedType);
+ }
+ }
+
+ private static Collection<TypeVariable<?>> newSeenList() {
+ return new ArrayList<TypeVariable<?>>();
+ }
+
+ public static boolean hasTypeParameters(Type type) {
+ if (type instanceof Class) {
+ Class<?> classType = (Class<?>) type;
+ return classType.getTypeParameters().length > 0;
+ }
+ return false;
+ }
+
+ public static ParameterizedType getParameterizedType(Type type) {
+ if (type instanceof ParameterizedType) {
+ return (ParameterizedType) type;
+ } else if (type instanceof Class) {
+ Class<?> classType = (Class<?>) type;
+ return new OwbParametrizedTypeImpl(classType.getDeclaringClass(), classType, classType.getTypeParameters());
+ } else {
+ throw new IllegalArgumentException(type.getClass().getSimpleName() + " is not supported");
+ }
+ }
+
+ public static <T> Class<T> getRawType(Type type) {
+ return getRawType(type, null);
+ }
+
+ static <T> Class<T> getRawType(Type type, Type actualType) {
+ if (type instanceof Class) {
+ return (Class<T>) type;
+ } else if (type instanceof ParameterizedType) {
+ ParameterizedType parameterizedType = (ParameterizedType) type;
+ return getRawType(parameterizedType.getRawType(), actualType);
+ } else if (type instanceof TypeVariable) {
+ TypeVariable<?> typeVariable = (TypeVariable<?>) type;
+ Type mostSpecificType = getMostSpecificType(getRawTypes(typeVariable.getBounds(), actualType), typeVariable.getBounds());
+ return getRawType(mostSpecificType, actualType);
+ } else if (type instanceof WildcardType) {
+ WildcardType wildcardType = (WildcardType) type;
+ Type mostSpecificType = getMostSpecificType(getRawTypes(wildcardType.getUpperBounds(), actualType), wildcardType.getUpperBounds());
+ return getRawType(mostSpecificType, actualType);
+ } else if (type instanceof GenericArrayType) {
+ GenericArrayType arrayType = (GenericArrayType) type;
+ return getRawType(createArrayType(getRawType(arrayType.getGenericComponentType(), actualType)), actualType);
+ } else {
+ throw new IllegalArgumentException("Unsupported type " + type.getClass().getName());
+ }
+ }
+
+ private static <T> Class<T>[] getRawTypes(Type[] types) {
+ return getRawTypes(types, null);
+ }
+
+ private static <T> Class<T>[] getRawTypes(Type[] types, Type actualType) {
+ Class<T>[] rawTypes = new Class[types.length];
+ for (int i = 0; i < types.length; i++) {
+ rawTypes[i] = getRawType(types[i], actualType);
+ }
+ return rawTypes;
+ }
+
+ private static Type getMostSpecificType(Class<?>[] types, Type[] genericTypes) {
+ Class<?> mostSpecificType = types[0];
+ int mostSpecificIndex = 0;
+ for (int i = 0; i < types.length; i++) {
+ if (mostSpecificType.isAssignableFrom(types[i])) {
+ mostSpecificType = types[i];
+ mostSpecificIndex = i;
+ }
+ }
+ return genericTypes[mostSpecificIndex];
+ }
+
+ private static Class<?>[] getClassTypes(Class<?>[] rawTypes) {
+ List<Class<?>> classTypes = new ArrayList<Class<?>>();
+ for (Class<?> rawType : rawTypes) {
+ if (!rawType.isInterface()) {
+ classTypes.add(rawType);
+ }
+ }
+ return classTypes.toArray(new Class[classTypes.size()]);
+ }
+
+ private static Type resolveTypeVariable(TypeVariable<?> variable, Type actualType, Collection<TypeVariable<?>> seen) {
+ if (actualType == null) {
+ return variable;
+ }
+ Class<?> declaringClass = getDeclaringClass(variable.getGenericDeclaration());
+ Class<?> actualClass = getRawType(actualType);
+ if (actualClass == declaringClass) {
+ return resolveTypeVariable(variable, variable.getGenericDeclaration(), getParameterizedType(actualType), seen);
+ } else if (actualClass.isAssignableFrom(declaringClass)) {
+ Class<?> directSubclass = getDirectSubclass(declaringClass, actualClass);
+ Type[] typeArguments = resolveTypeArguments(directSubclass, actualType);
+ Type directSubtype = new OwbParametrizedTypeImpl(directSubclass.getDeclaringClass(), directSubclass, typeArguments);
+ return resolveTypeVariable(variable, directSubtype, seen);
+ } else // if (declaringClass.isAssignableFrom(actualClass))
+ {
+ Type genericSuperclass = getGenericSuperclass(actualClass, declaringClass);
+ if (genericSuperclass == null) {
+ return variable;
+ } else if (genericSuperclass instanceof Class) {
+ // special handling for type erasure
+ Class<?> superclass = (Class<?>) genericSuperclass;
+ genericSuperclass = new OwbParametrizedTypeImpl(superclass.getDeclaringClass(), superclass, getRawTypes(superclass.getTypeParameters()));
+ } else {
+ ParameterizedType genericSupertype = getParameterizedType(genericSuperclass);
+ Type[] typeArguments = resolveTypeArguments(getParameterizedType(actualType), genericSupertype);
+ genericSuperclass = new OwbParametrizedTypeImpl(genericSupertype.getOwnerType(), genericSupertype.getRawType(), typeArguments);
+ }
+ Type resolvedType = resolveTypeVariable(variable, genericSuperclass, seen);
+ if (resolvedType instanceof TypeVariable) {
+ TypeVariable<?> resolvedTypeVariable = (TypeVariable<?>) resolvedType;
+ TypeVariable<?>[] typeParameters = actualClass.getTypeParameters();
+ for (int i = 0; i < typeParameters.length; i++) {
+ if (typeParameters[i].getName().equals(resolvedTypeVariable.getName())) {
+ resolvedType = getParameterizedType(actualType).getActualTypeArguments()[i];
+ break;
+ }
+ }
+ }
+ return resolvedType;
+ }
+ }
+
+ private static Class<?> getDeclaringClass(GenericDeclaration declaration) {
+ if (declaration instanceof Class) {
+ return (Class<?>) declaration;
+ } else if (declaration instanceof Member) {
+ return ((Member) declaration).getDeclaringClass();
+ } else {
+ throw new IllegalArgumentException("Unsupported type " + declaration.getClass());
+ }
+ }
+
+ private static Type resolveTypeVariable(TypeVariable<?> variable, GenericDeclaration declaration, ParameterizedType type,
+ Collection<TypeVariable<?>> seen) {
+ int index = getIndex(declaration, variable);
+ if (declaration instanceof Class) {
+ if (index >= 0) {
+ return type.getActualTypeArguments()[index];
+ } else {
+ index = getIndex(type, variable);
+ if (index >= 0) {
+ return declaration.getTypeParameters()[index];
+ }
+ }
+ } else {
+ if (seen.contains(variable)) {
+ return null;
+ }
+ seen.add(variable);
+
+ Type[] resolvedBounds = resolveTypes(declaration.getTypeParameters()[index].getBounds(), type, seen);
+ return OwbTypeVariableImpl.createTypeVariable(variable, resolvedBounds);
+ }
+ return variable;
+ }
+
+ private static int getIndex(GenericDeclaration declaration, TypeVariable<?> variable) {
+ Type[] typeParameters = declaration.getTypeParameters();
+ for (int i = 0; i < typeParameters.length; i++) {
+ if (typeParameters[i] instanceof TypeVariable) {
+ TypeVariable<?> variableArgument = (TypeVariable<?>) typeParameters[i];
+ if (variableArgument.getName().equals(variable.getName())) {
+ return i;
+ }
+ }
+ }
+ return -1;
+ }
+
+ private static int getIndex(ParameterizedType type, TypeVariable<?> variable) {
+ Type[] actualTypeArguments = type.getActualTypeArguments();
+ for (int i = 0; i < actualTypeArguments.length; i++) {
+ if (actualTypeArguments[i] instanceof TypeVariable) {
+ TypeVariable<?> variableArgument = (TypeVariable<?>) actualTypeArguments[i];
+ if (variableArgument.getName().equals(variable.getName())) {
+ return i;
+ }
+ }
+ }
+ return -1;
+ }
+
+ private static Class<?> getDirectSubclass(Class<?> declaringClass, Class<?> actualClass) {
+ if (actualClass.isInterface()) {
+ Class<?> subclass = declaringClass;
+ for (Class<?> iface : declaringClass.getInterfaces()) {
+ if (iface == actualClass) {
+ return subclass;
+ }
+ if (actualClass.isAssignableFrom(iface)) {
+ subclass = iface;
+ } else {
+ subclass = declaringClass.getSuperclass();
+ }
+ }
+ return getDirectSubclass(subclass, actualClass);
+ } else {
+ Class<?> directSubclass = declaringClass;
+ while (directSubclass.getSuperclass() != actualClass) {
+ directSubclass = directSubclass.getSuperclass();
+ }
+ return directSubclass;
+ }
+ }
+
+ private static Type getGenericSuperclass(Class<?> subclass, Class<?> superclass) {
+ if (!superclass.isInterface()) {
+ return subclass.getGenericSuperclass();
+ } else {
+ for (Type genericInterface : subclass.getGenericInterfaces()) {
+ if (getRawType(genericInterface) == superclass) {
+ return genericInterface;
+ }
+ }
+ }
+ return superclass;
+ }
+
+ private static Type[] resolveTypeArguments(Class<?> subclass, Type supertype) {
+ if (supertype instanceof ParameterizedType) {
+ ParameterizedType parameterizedSupertype = (ParameterizedType) supertype;
+ return resolveTypeArguments(subclass, parameterizedSupertype);
+ } else {
+ return subclass.getTypeParameters();
+ }
+ }
+
+ private static Type[] resolveTypeArguments(Class<?> subclass, ParameterizedType parameterizedSupertype) {
+ Type genericSuperclass = getGenericSuperclass(subclass, getRawType(parameterizedSupertype));
+ if (!(genericSuperclass instanceof ParameterizedType)) {
+ return subclass.getTypeParameters();
+ }
+ ParameterizedType parameterizedSuperclass = (ParameterizedType) genericSuperclass;
+ Type[] typeParameters = subclass.getTypeParameters();
+ Type[] actualTypeArguments = parameterizedSupertype.getActualTypeArguments();
+ return resolveTypeArguments(parameterizedSuperclass, typeParameters, actualTypeArguments);
+ }
+
+ private static Type[] resolveTypeArguments(ParameterizedType subtype, ParameterizedType parameterizedSupertype) {
+ return resolveTypeArguments(getParameterizedType(getRawType(subtype)), parameterizedSupertype.getActualTypeArguments(), subtype.getActualTypeArguments());
+ }
+
+ private static Type[] resolveTypeArguments(ParameterizedType parameterizedType, Type[] typeParameters, Type[] actualTypeArguments) {
+ Type[] resolvedTypeArguments = new Type[typeParameters.length];
+ for (int i = 0; i < typeParameters.length; i++) {
+ resolvedTypeArguments[i] = resolveTypeArgument(parameterizedType, typeParameters[i], actualTypeArguments);
+ }
+ return resolvedTypeArguments;
+ }
+
+ private static Type resolveTypeArgument(ParameterizedType parameterizedType, Type typeParameter, Type[] actualTypeArguments) {
+ if (typeParameter instanceof TypeVariable) {
+ TypeVariable<?> variable = (TypeVariable<?>) typeParameter;
+ int index = getIndex(parameterizedType, variable);
+ if (index == -1) {
+ return typeParameter;
+ } else {
+ return actualTypeArguments[index];
+ }
+ } else if (typeParameter instanceof GenericArrayType) {
+ GenericArrayType array = (GenericArrayType) typeParameter;
+ return createArrayType(resolveTypeArgument(parameterizedType, array.getGenericComponentType(), actualTypeArguments));
+ } else {
+ return typeParameter;
+ }
+ }
+
+ private static Type createArrayType(Type componentType) {
+ if (componentType instanceof Class) {
+ return Array.newInstance((Class<?>) componentType, 0).getClass();
+ } else {
+ return new OwbGenericArrayTypeImpl(componentType);
+ }
+ }
+
+ public static Type resolveType(ParameterizedType parameterizedType, Type metadataType) {
+ return resolveType(parameterizedType, metadataType, newSeenList());
+ }
+}
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/OwbGenericArrayTypeImpl.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/OwbGenericArrayTypeImpl.java
new file mode 100644
index 0000000..2b3722b
--- /dev/null
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/OwbGenericArrayTypeImpl.java
@@ -0,0 +1,64 @@
+/*
+ * 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.maven.packaging.generics;
+
+import java.lang.reflect.GenericArrayType;
+import java.lang.reflect.Type;
+
+
+public class OwbGenericArrayTypeImpl implements GenericArrayType {
+
+ private Type componentType;
+
+ public OwbGenericArrayTypeImpl(Type componentType) {
+ this.componentType = componentType;
+ }
+
+ @Override
+ public Type getGenericComponentType() {
+ return componentType;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return componentType.hashCode();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ } else if (obj instanceof GenericArrayType) {
+ return ((GenericArrayType) obj).getGenericComponentType().equals(componentType);
+ } else {
+ return false;
+ }
+
+ }
+
+ public String toString() {
+ return componentType + "[]";
+ }
+}
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/OwbParametrizedTypeImpl.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/OwbParametrizedTypeImpl.java
new file mode 100644
index 0000000..2cf3a95
--- /dev/null
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/OwbParametrizedTypeImpl.java
@@ -0,0 +1,125 @@
+/*
+ * 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.maven.packaging.generics;
+
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.Arrays;
+
+/**
+ * Custom parametrized type implementation.
+ *
+ * @version $Rev: 1621935 $ $Date: 2014-09-02 09:07:32 +0200 (Tue, 02 Sep 2014) $
+ */
+public class OwbParametrizedTypeImpl implements ParameterizedType {
+ /**
+ * Owner type
+ */
+ private final Type owner;
+
+ /**
+ * Raw type
+ */
+ private final Type rawType;
+
+ /**
+ * Actual type arguments
+ */
+ private final Type[] types;
+
+ /**
+ * New instance.
+ *
+ * @param owner owner
+ * @param raw raw
+ */
+ public OwbParametrizedTypeImpl(Type owner, Type raw, Type... types) {
+ this.owner = owner;
+ rawType = raw;
+ this.types = types;
+ }
+
+ @Override
+ public Type[] getActualTypeArguments() {
+ return types.clone();
+ }
+
+ @Override
+ public Type getOwnerType() {
+ return owner;
+ }
+
+ @Override
+ public Type getRawType() {
+ return rawType;
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return Arrays.hashCode(types) ^ (owner == null ? 0 : owner.hashCode()) ^ (rawType == null ? 0 : rawType.hashCode());
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ } else if (obj instanceof ParameterizedType) {
+ ParameterizedType that = (ParameterizedType) obj;
+ Type thatOwnerType = that.getOwnerType();
+ Type thatRawType = that.getRawType();
+ return (owner == null ? thatOwnerType == null : owner.equals(thatOwnerType))
+ && (rawType == null ? thatRawType == null : rawType.equals(thatRawType))
+ && Arrays.equals(types, that.getActualTypeArguments());
+ } else {
+ return false;
+ }
+
+ }
+
+ public String toString() {
+ StringBuilder buffer = new StringBuilder();
+ buffer.append(((Class<?>) rawType).getName());
+ Type[] actualTypes = getActualTypeArguments();
+ if (actualTypes.length > 0) {
+ buffer.append("<");
+ int length = actualTypes.length;
+ for (int i = 0; i < length; i++) {
+ if (actualTypes[i] instanceof Class) {
+ buffer.append(((Class<?>) actualTypes[i]).getSimpleName());
+ } else {
+ buffer.append(actualTypes[i].toString());
+ }
+ if (i != actualTypes.length - 1) {
+ buffer.append(", ");
+ }
+ }
+
+ buffer.append(">");
+ }
+
+ return buffer.toString();
+ }
+}
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/OwbTypeVariableImpl.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/OwbTypeVariableImpl.java
new file mode 100644
index 0000000..7abd222
--- /dev/null
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/OwbTypeVariableImpl.java
@@ -0,0 +1,182 @@
+/*
+ * 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.maven.packaging.generics;
+
+import java.lang.reflect.GenericDeclaration;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.util.Arrays;
+
+
+public class OwbTypeVariableImpl
+{
+ private static final Class<?>[] TYPE_VARIABLE_TYPES = new Class<?>[]{TypeVariable.class};
+
+ /**
+ * Java TypeVariable is different in various JDK versions. Thus it is not possible to e.g.
+ * write a custom TypeVariable which works in either Java7 and Java8 as they introduced
+ * new methods in Java8 which have return generics which only exist in Java8 :(
+ *
+ * As workaround we dynamically crate a proxy to wrap this and do the delegation manually.
+ * This is of course slower, but as we do not use it often it might not have much impact.
+ *
+ * @param typeVariable
+ * @param bounds
+ * @return the typeVariable with the defined bounds.
+ */
+ public static TypeVariable createTypeVariable(TypeVariable typeVariable, Type... bounds)
+ {
+ TypeVariable tv = (TypeVariable) Proxy.newProxyInstance(OwbTypeVariableImpl.class.getClassLoader(), TYPE_VARIABLE_TYPES,
+ new OwbTypeVariableInvocationHandler(typeVariable, bounds));
+
+ return tv;
+ }
+
+
+
+ public static class OwbTypeVariableInvocationHandler implements InvocationHandler
+ {
+
+ private String name;
+ private GenericDeclaration genericDeclaration;
+ private Type[] bounds;
+
+
+ public OwbTypeVariableInvocationHandler(TypeVariable typeVariable, Type... bounds)
+ {
+ name = typeVariable.getName();
+ genericDeclaration = typeVariable.getGenericDeclaration();
+ if (bounds == null || bounds.length == 0)
+ {
+ this.bounds = typeVariable.getBounds();
+ }
+ else
+ {
+ this.bounds = bounds;
+ }
+ }
+
+
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+ {
+ String methodName = method.getName();
+ if ("equals".equals(methodName))
+ {
+ return typeVariableEquals(args[0]);
+ }
+ else if ("hashCode".equals(methodName))
+ {
+ return typeVariableHashCode();
+ }
+ else if ("toString".equals(methodName))
+ {
+ return typeVariableToString();
+ }
+ else if ("getName".equals(methodName))
+ {
+ return getName();
+ }
+ else if ("getGenericDeclaration".equals(methodName))
+ {
+ return getGenericDeclaration();
+ }
+ else if ("getBounds".equals(methodName))
+ {
+ return getBounds();
+ }
+
+
+ // new method from java8...
+ return null;
+ }
+
+ /** method from TypeVariable */
+ public String getName()
+ {
+ return name;
+ }
+
+ /** method from TypeVariable */
+ public GenericDeclaration getGenericDeclaration()
+ {
+ return genericDeclaration;
+ }
+
+ /** method from TypeVariable */
+ public Type[] getBounds()
+ {
+ return bounds.clone();
+ }
+
+ /** method from TypeVariable */
+ public int typeVariableHashCode()
+ {
+ return Arrays.hashCode(bounds) ^ name.hashCode() ^ genericDeclaration.hashCode();
+ }
+
+ /** method from TypeVariable */
+ public boolean typeVariableEquals(Object object)
+ {
+ if (this == object)
+ {
+ return true;
+ }
+ else if (object instanceof TypeVariable)
+ {
+ TypeVariable<?> that = (TypeVariable<?>)object;
+ return name.equals(that.getName()) && genericDeclaration.equals(that.getGenericDeclaration()) && Arrays.equals(bounds, that.getBounds());
+ }
+ else
+ {
+ return false;
+ }
+
+ }
+
+ /** method from TypeVariable */
+ public String typeVariableToString()
+ {
+ StringBuilder buffer = new StringBuilder();
+ buffer.append(name);
+ if (bounds.length > 0)
+ {
+ buffer.append(" extends ");
+ boolean first = true;
+ for (Type bound: bounds)
+ {
+ if (first)
+ {
+ first = false;
+ }
+ else
+ {
+ buffer.append(',');
+ }
+ buffer.append(' ').append(bound);
+ }
+ }
+ return buffer.toString();
+ }
+
+ }
+}
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/OwbWildcardTypeImpl.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/OwbWildcardTypeImpl.java
new file mode 100644
index 0000000..aebcfd0
--- /dev/null
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/OwbWildcardTypeImpl.java
@@ -0,0 +1,82 @@
+/*
+ * 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.maven.packaging.generics;
+
+import java.lang.reflect.Type;
+import java.lang.reflect.WildcardType;
+
+public class OwbWildcardTypeImpl implements WildcardType {
+
+ private Type[] upperBounds;
+ private Type[] lowerBounds;
+
+ public OwbWildcardTypeImpl(Type[] upperBounds, Type[] lowerBounds) {
+ this.upperBounds = upperBounds.clone();
+ this.lowerBounds = lowerBounds.clone();
+ }
+
+ @Override
+ public Type[] getUpperBounds() {
+ return upperBounds.clone();
+ }
+
+ @Override
+ public Type[] getLowerBounds() {
+ return lowerBounds.clone();
+ }
+
+ public String toString() {
+ StringBuilder buffer = new StringBuilder("?");
+ if (upperBounds.length > 0) {
+ buffer.append(" extends");
+ boolean first = true;
+ for (Type upperBound : upperBounds) {
+ if (first) {
+ first = false;
+ } else {
+ buffer.append(',');
+ }
+ buffer.append(' ');
+ if (upperBound instanceof Class) {
+ buffer.append(((Class<?>) upperBound).getSimpleName());
+ } else {
+ buffer.append(upperBound);
+ }
+ }
+ }
+ if (lowerBounds.length > 0) {
+ buffer.append(" super");
+ boolean first = true;
+ for (Type lowerBound : lowerBounds) {
+ if (first) {
+ first = false;
+ } else {
+ buffer.append(',');
+ }
+ buffer.append(' ');
+ if (lowerBound instanceof Class) {
+ buffer.append(((Class<?>) lowerBound).getSimpleName());
+ } else {
+ buffer.append(lowerBound);
+ }
+ }
+ }
+ return buffer.toString();
+ }
+}
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/EndpointOptionModel.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/EndpointOptionModel.java
index 87d8df8..3416df5 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/EndpointOptionModel.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/EndpointOptionModel.java
@@ -26,6 +26,7 @@ public class EndpointOptionModel {
private String displayName;
private String kind;
private String group;
+ private String label;
private String required;
private String type;
private String javaType;
@@ -74,6 +75,14 @@ public class EndpointOptionModel {
this.group = group;
}
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
public String getRequired() {
return required;
}
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/srcgen/GenericType.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/srcgen/GenericType.java
index 3004605..8baa0ac 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/srcgen/GenericType.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/srcgen/GenericType.java
@@ -35,7 +35,7 @@ public class GenericType {
private static final Map<String, Class> PRIMITIVE_CLASSES = new HashMap<>();
- enum BoundType {
+ public enum BoundType {
Exact, Extends, Super
}
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/srcgen/JavaClass.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/srcgen/JavaClass.java
index 22ae6ca..0be7f1d 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/srcgen/JavaClass.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/srcgen/JavaClass.java
@@ -25,6 +25,8 @@ import java.util.Set;
import java.util.TreeSet;
import java.util.stream.Collectors;
+import org.jboss.forge.roaster.model.util.Strings;
+
public class JavaClass {
ClassLoader classLoader;
@@ -38,6 +40,7 @@ public class JavaClass {
List<Field> fields = new ArrayList<>();
List<Method> methods = new ArrayList<>();
List<JavaClass> nested = new ArrayList<>();
+ List<String> values = new ArrayList<>();
Javadoc javadoc = new Javadoc();
boolean isStatic;
boolean isPublic = true;
@@ -57,6 +60,14 @@ public class JavaClass {
this.parent = parent;
}
+ protected ClassLoader getClassLoader() {
+ if (classLoader == null && parent != null) {
+ return parent.getClassLoader();
+ } else {
+ return classLoader;
+ }
+ }
+
public JavaClass setStatic(boolean aStatic) {
isStatic = aStatic;
return this;
@@ -72,6 +83,9 @@ public class JavaClass {
return this;
}
+ public String getPackage() {
+ return packageName;
+ }
public JavaClass setPackage(String packageName) {
this.packageName = packageName;
return this;
@@ -121,7 +135,7 @@ public class JavaClass {
public Annotation addAnnotation(String type) {
try {
- Class<?> cl = classLoader.loadClass(type);
+ Class<?> cl = getClassLoader().loadClass(type);
return addAnnotation(cl);
} catch (ClassNotFoundException e) {
throw new IllegalArgumentException("Unable to parse type", e);
@@ -139,9 +153,9 @@ public class JavaClass {
public Property addProperty(String type, String name) {
try {
- return addProperty(GenericType.parse(type, classLoader), name);
+ return addProperty(GenericType.parse(type, getClassLoader()), name);
} catch (ClassNotFoundException e) {
- throw new IllegalArgumentException("Unable to parse type", e);
+ throw new IllegalArgumentException("Unable to parse type " + type + " for property " + name, e);
}
}
@@ -173,6 +187,10 @@ public class JavaClass {
return clazz;
}
+ public void addValue(String value) {
+ values.add(value);
+ }
+
public boolean isClass() {
return isClass;
}
@@ -236,6 +254,21 @@ public class JavaClass {
printJavadoc(sb, indent, javadoc);
printAnnotations(sb, indent, annotations);
+ if (isEnum) {
+ sb.append(indent)
+ .append(isPublic ? "public " : "")
+ .append(isStatic ? "static " : "")
+ .append("enum ").append(name).append(" {\n")
+ .append(indent)
+ .append(" ")
+ .append(Strings.join(values, ", "))
+ .append(";\n")
+ .append(indent)
+ .append("}");
+ return;
+
+ }
+
StringBuilder sb2 = new StringBuilder();
sb2.append(indent);
if (isPublic) {
[camel] 02/02: Commit generated endpoints (not really a DSL at this
point)
Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch endpoint-dsl
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 225795a49877d7f96b592e712f76de57ecb81fad
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jun 5 23:00:50 2019 +0200
Commit generated endpoints (not really a DSL at this point)
---
.../apache/camel/model/endpoint/AMQPEndpoint.java | 1567 +++++++++++++++
.../apache/camel/model/endpoint/AS2Endpoint.java | 527 +++++
.../camel/model/endpoint/ActiveMQEndpoint.java | 1568 +++++++++++++++
.../apache/camel/model/endpoint/AhcEndpoint.java | 264 +++
.../apache/camel/model/endpoint/ApnsEndpoint.java | 362 ++++
.../camel/model/endpoint/AsteriskEndpoint.java | 182 ++
.../apache/camel/model/endpoint/AtmosEndpoint.java | 241 +++
.../apache/camel/model/endpoint/AtomEndpoint.java | 457 +++++
.../camel/model/endpoint/AtomixMapEndpoint.java | 315 +++
.../model/endpoint/AtomixMessagingEndpoint.java | 327 ++++
.../model/endpoint/AtomixMultiMapEndpoint.java | 316 +++
.../camel/model/endpoint/AtomixQueueEndpoint.java | 291 +++
.../camel/model/endpoint/AtomixSetEndpoint.java | 302 +++
.../camel/model/endpoint/AtomixValueEndpoint.java | 303 +++
.../apache/camel/model/endpoint/AvroEndpoint.java | 247 +++
.../apache/camel/model/endpoint/BeanEndpoint.java | 120 ++
.../model/endpoint/BeanValidatorEndpoint.java | 147 ++
.../camel/model/endpoint/BeanstalkEndpoint.java | 450 +++++
.../camel/model/endpoint/BlobServiceEndpoint.java | 333 ++++
.../camel/model/endpoint/BonitaEndpoint.java | 197 ++
.../apache/camel/model/endpoint/BoxEndpoint.java | 361 ++++
.../camel/model/endpoint/BraintreeEndpoint.java | 277 +++
.../camel/model/endpoint/BrowseEndpoint.java | 129 ++
.../apache/camel/model/endpoint/CMEndpoint.java | 135 ++
.../apache/camel/model/endpoint/CMISEndpoint.java | 247 +++
.../model/endpoint/CaffeineCacheEndpoint.java | 325 ++++
.../model/endpoint/CaffeineLoadCacheEndpoint.java | 330 ++++
.../camel/model/endpoint/CassandraEndpoint.java | 523 +++++
.../camel/model/endpoint/ChatScriptEndpoint.java | 130 ++
.../apache/camel/model/endpoint/ChunkEndpoint.java | 161 ++
.../camel/model/endpoint/CinderEndpoint.java | 176 ++
.../apache/camel/model/endpoint/ClassEndpoint.java | 120 ++
.../camel/model/endpoint/ClientEndpoint.java | 336 ++++
.../apache/camel/model/endpoint/CoAPEndpoint.java | 264 +++
.../camel/model/endpoint/CometdEndpoint.java | 317 +++
.../camel/model/endpoint/ConsulEndpoint.java | 129 ++
.../camel/model/endpoint/ControlBusEndpoint.java | 172 ++
.../apache/camel/model/endpoint/CordaEndpoint.java | 128 ++
.../camel/model/endpoint/CouchDbEndpoint.java | 273 +++
.../camel/model/endpoint/CouchbaseEndpoint.java | 722 +++++++
.../camel/model/endpoint/CryptoCmsEndpoint.java | 322 ++++
.../apache/camel/model/endpoint/CwEndpoint.java | 203 ++
.../apache/camel/model/endpoint/CxfEndpoint.java | 563 ++++++
.../apache/camel/model/endpoint/CxfRsEndpoint.java | 525 +++++
.../camel/model/endpoint/DataFormatEndpoint.java | 92 +
.../camel/model/endpoint/DataSetEndpoint.java | 327 ++++
.../camel/model/endpoint/DataSetTestEndpoint.java | 297 +++
.../apache/camel/model/endpoint/DdbEndpoint.java | 238 +++
.../camel/model/endpoint/DdbStreamEndpoint.java | 474 +++++
.../camel/model/endpoint/DigitalOceanEndpoint.java | 203 ++
.../model/endpoint/DigitalSignatureEndpoint.java | 359 ++++
.../camel/model/endpoint/DirectEndpoint.java | 169 ++
.../camel/model/endpoint/DirectVmEndpoint.java | 199 ++
.../camel/model/endpoint/DisruptorEndpoint.java | 262 +++
.../camel/model/endpoint/DisruptorVmEndpoint.java | 262 +++
.../apache/camel/model/endpoint/DnsEndpoint.java | 83 +
.../camel/model/endpoint/DockerEndpoint.java | 330 ++++
.../apache/camel/model/endpoint/DozerEndpoint.java | 169 ++
.../apache/camel/model/endpoint/DrillEndpoint.java | 136 ++
.../camel/model/endpoint/DropboxEndpoint.java | 247 +++
.../apache/camel/model/endpoint/EC2Endpoint.java | 174 ++
.../apache/camel/model/endpoint/ECSEndpoint.java | 171 ++
.../apache/camel/model/endpoint/EKSEndpoint.java | 171 ++
.../camel/model/endpoint/EhcacheEndpoint.java | 314 +++
.../apache/camel/model/endpoint/EjbEndpoint.java | 120 ++
.../model/endpoint/ElasticsearchEndpoint.java | 236 +++
.../apache/camel/model/endpoint/ElsqlEndpoint.java | 785 ++++++++
.../apache/camel/model/endpoint/EtcdEndpoint.java | 496 +++++
.../camel/model/endpoint/EventAdminEndpoint.java | 142 ++
.../apache/camel/model/endpoint/EventEndpoint.java | 127 ++
.../apache/camel/model/endpoint/ExecEndpoint.java | 178 ++
.../camel/model/endpoint/FacebookEndpoint.java | 1349 +++++++++++++
.../apache/camel/model/endpoint/FhirEndpoint.java | 439 +++++
.../apache/camel/model/endpoint/FileEndpoint.java | 1549 +++++++++++++++
.../camel/model/endpoint/FlatpackEndpoint.java | 444 +++++
.../apache/camel/model/endpoint/FlinkEndpoint.java | 148 ++
.../apache/camel/model/endpoint/FopEndpoint.java | 112 ++
.../camel/model/endpoint/FreemarkerEndpoint.java | 135 ++
.../apache/camel/model/endpoint/FtpEndpoint.java | 1851 ++++++++++++++++++
.../apache/camel/model/endpoint/FtpsEndpoint.java | 2034 ++++++++++++++++++++
.../camel/model/endpoint/GangliaEndpoint.java | 259 +++
.../camel/model/endpoint/GeoCoderEndpoint.java | 245 +++
.../apache/camel/model/endpoint/GitEndpoint.java | 242 +++
.../camel/model/endpoint/GitHubEndpoint.java | 247 +++
.../camel/model/endpoint/GlanceEndpoint.java | 164 ++
.../model/endpoint/GoogleBigQueryEndpoint.java | 129 ++
.../model/endpoint/GoogleBigQuerySQLEndpoint.java | 108 ++
.../model/endpoint/GoogleCalendarEndpoint.java | 281 +++
.../endpoint/GoogleCalendarStreamEndpoint.java | 503 +++++
.../camel/model/endpoint/GoogleDriveEndpoint.java | 259 +++
.../camel/model/endpoint/GoogleMailEndpoint.java | 227 +++
.../model/endpoint/GoogleMailStreamEndpoint.java | 472 +++++
.../camel/model/endpoint/GooglePubsubEndpoint.java | 210 ++
.../camel/model/endpoint/GoogleSheetsEndpoint.java | 227 +++
.../model/endpoint/GoogleSheetsStreamEndpoint.java | 516 +++++
.../apache/camel/model/endpoint/GoraEndpoint.java | 333 ++++
.../apache/camel/model/endpoint/GrapeEndpoint.java | 80 +
.../camel/model/endpoint/GridFsEndpoint.java | 315 +++
.../apache/camel/model/endpoint/GrpcEndpoint.java | 457 +++++
.../model/endpoint/GuavaEventBusEndpoint.java | 164 ++
.../apache/camel/model/endpoint/HBaseEndpoint.java | 300 +++
.../endpoint/HazelcastAtomicnumberEndpoint.java | 214 ++
.../model/endpoint/HazelcastInstanceEndpoint.java | 306 +++
.../model/endpoint/HazelcastListEndpoint.java | 301 +++
.../camel/model/endpoint/HazelcastMapEndpoint.java | 301 +++
.../model/endpoint/HazelcastMultimapEndpoint.java | 306 +++
.../model/endpoint/HazelcastQueueEndpoint.java | 301 +++
.../endpoint/HazelcastReplicatedmapEndpoint.java | 308 +++
.../endpoint/HazelcastRingbufferEndpoint.java | 214 ++
.../model/endpoint/HazelcastSedaEndpoint.java | 301 +++
.../camel/model/endpoint/HazelcastSetEndpoint.java | 301 +++
.../model/endpoint/HazelcastTopicEndpoint.java | 301 +++
.../apache/camel/model/endpoint/HdfsEndpoint.java | 652 +++++++
.../camel/model/endpoint/HipchatEndpoint.java | 416 ++++
.../apache/camel/model/endpoint/HttpEndpoint.java | 772 ++++++++
.../apache/camel/model/endpoint/IAMEndpoint.java | 172 ++
.../apache/camel/model/endpoint/IOTAEndpoint.java | 203 ++
.../apache/camel/model/endpoint/IPFSEndpoint.java | 92 +
.../camel/model/endpoint/IgniteCacheEndpoint.java | 300 +++
.../model/endpoint/IgniteComputeEndpoint.java | 186 ++
.../camel/model/endpoint/IgniteEventsEndpoint.java | 184 ++
.../camel/model/endpoint/IgniteIdGenEndpoint.java | 151 ++
.../model/endpoint/IgniteMessagingEndpoint.java | 201 ++
.../camel/model/endpoint/IgniteQueueEndpoint.java | 168 ++
.../camel/model/endpoint/IgniteSetEndpoint.java | 142 ++
.../camel/model/endpoint/InfinispanEndpoint.java | 351 ++++
.../camel/model/endpoint/InfluxDbEndpoint.java | 145 ++
.../apache/camel/model/endpoint/IrcEndpoint.java | 410 ++++
.../camel/model/endpoint/IronMQEndpoint.java | 497 +++++
.../apache/camel/model/endpoint/JBPMEndpoint.java | 474 +++++
.../camel/model/endpoint/JCacheEndpoint.java | 372 ++++
.../camel/model/endpoint/JGroupsEndpoint.java | 157 ++
.../camel/model/endpoint/JGroupsRaftEndpoint.java | 143 ++
.../apache/camel/model/endpoint/JMXEndpoint.java | 489 +++++
.../model/endpoint/JSR356WebSocketEndpoint.java | 155 ++
.../camel/model/endpoint/JcloudsEndpoint.java | 288 +++
.../apache/camel/model/endpoint/JcrEndpoint.java | 279 +++
.../apache/camel/model/endpoint/JdbcEndpoint.java | 267 +++
.../camel/model/endpoint/JettyHttpEndpoint9.java | 893 +++++++++
.../apache/camel/model/endpoint/JingEndpoint.java | 94 +
.../apache/camel/model/endpoint/JiraEndpoint.java | 273 +++
.../apache/camel/model/endpoint/JmsEndpoint.java | 1568 +++++++++++++++
.../apache/camel/model/endpoint/JoltEndpoint.java | 145 ++
.../apache/camel/model/endpoint/JooqEndpoint.java | 390 ++++
.../apache/camel/model/endpoint/JpaEndpoint.java | 683 +++++++
.../model/endpoint/JsonValidatorEndpoint.java | 164 ++
.../apache/camel/model/endpoint/Jt400Endpoint.java | 550 ++++++
.../apache/camel/model/endpoint/KMSEndpoint.java | 171 ++
.../apache/camel/model/endpoint/KafkaEndpoint.java | 1533 +++++++++++++++
.../camel/model/endpoint/KeystoneEndpoint.java | 164 ++
.../camel/model/endpoint/KinesisEndpoint.java | 506 +++++
.../model/endpoint/KinesisFirehoseEndpoint.java | 157 ++
.../endpoint/KubernetesConfigMapsEndpoint.java | 324 ++++
.../endpoint/KubernetesDeploymentsEndpoint.java | 436 +++++
.../model/endpoint/KubernetesHPAEndpoint.java | 430 +++++
.../model/endpoint/KubernetesJobEndpoint.java | 430 +++++
.../endpoint/KubernetesNamespacesEndpoint.java | 436 +++++
.../model/endpoint/KubernetesNodesEndpoint.java | 430 +++++
.../KubernetesPersistentVolumesClaimsEndpoint.java | 324 ++++
.../KubernetesPersistentVolumesEndpoint.java | 324 ++++
.../model/endpoint/KubernetesPodsEndpoint.java | 430 +++++
.../KubernetesReplicationControllersEndpoint.java | 437 +++++
.../endpoint/KubernetesResourcesQuotaEndpoint.java | 324 ++++
.../model/endpoint/KubernetesSecretsEndpoint.java | 322 ++++
.../KubernetesServiceAccountsEndpoint.java | 324 ++++
.../model/endpoint/KubernetesServicesEndpoint.java | 436 +++++
.../camel/model/endpoint/LambdaEndpoint.java | 172 ++
.../camel/model/endpoint/LanguageEndpoint.java | 160 ++
.../apache/camel/model/endpoint/LdapEndpoint.java | 142 ++
.../apache/camel/model/endpoint/LdifEndpoint.java | 82 +
.../camel/model/endpoint/LinkedInEndpoint.java | 330 ++++
.../apache/camel/model/endpoint/LogEndpoint.java | 411 ++++
.../camel/model/endpoint/LuceneEndpoint.java | 154 ++
.../camel/model/endpoint/LumberjackEndpoint.java | 155 ++
.../apache/camel/model/endpoint/MQEndpoint.java | 172 ++
.../apache/camel/model/endpoint/MQTTEndpoint.java | 631 ++++++
.../apache/camel/model/endpoint/MSKEndpoint.java | 171 ++
.../apache/camel/model/endpoint/MailEndpoint.java | 986 ++++++++++
.../camel/model/endpoint/MasterEndpoint.java | 142 ++
.../camel/model/endpoint/MetricsEndpoint.java | 177 ++
.../camel/model/endpoint/MicrometerEndpoint.java | 157 ++
.../camel/model/endpoint/MiloClientEndpoint.java | 419 ++++
.../camel/model/endpoint/MiloServerEndpoint.java | 127 ++
.../apache/camel/model/endpoint/Mina2Endpoint.java | 481 +++++
.../apache/camel/model/endpoint/MllpEndpoint.java | 469 +++++
.../apache/camel/model/endpoint/MockEndpoint.java | 241 +++
.../camel/model/endpoint/MongoDbEndpoint.java | 360 ++++
.../apache/camel/model/endpoint/MsvEndpoint.java | 207 ++
.../camel/model/endpoint/MustacheEndpoint.java | 135 ++
.../apache/camel/model/endpoint/MvelEndpoint.java | 109 ++
.../camel/model/endpoint/MyBatisBeanEndpoint.java | 148 ++
.../camel/model/endpoint/MyBatisEndpoint.java | 507 +++++
.../camel/model/endpoint/NagiosEndpoint.java | 180 ++
.../apache/camel/model/endpoint/NatsEndpoint.java | 399 ++++
.../camel/model/endpoint/NetWeaverEndpoint.java | 144 ++
.../apache/camel/model/endpoint/NettyEndpoint.java | 1148 +++++++++++
.../camel/model/endpoint/NettyHttpEndpoint.java | 1283 ++++++++++++
.../camel/model/endpoint/NeutronEndpoint.java | 176 ++
.../apache/camel/model/endpoint/NovaEndpoint.java | 176 ++
.../apache/camel/model/endpoint/NsqEndpoint.java | 279 +++
.../camel/model/endpoint/Olingo2Endpoint.java | 299 +++
.../camel/model/endpoint/Olingo4Endpoint.java | 299 +++
.../endpoint/OpenshiftBuildConfigsEndpoint.java | 324 ++++
.../model/endpoint/OpenshiftBuildsEndpoint.java | 318 +++
.../camel/model/endpoint/OptaPlannerEndpoint.java | 167 ++
.../apache/camel/model/endpoint/PahoEndpoint.java | 272 +++
.../camel/model/endpoint/PaxLoggingEndpoint.java | 130 ++
.../apache/camel/model/endpoint/PdfEndpoint.java | 193 ++
.../camel/model/endpoint/PgEventEndpoint.java | 203 ++
.../camel/model/endpoint/PrinterEndpoint.java | 233 +++
.../camel/model/endpoint/PropertiesEndpoint.java | 158 ++
.../camel/model/endpoint/PubNubEndpoint.java | 270 +++
.../camel/model/endpoint/PulsarEndpoint.java | 223 +++
.../camel/model/endpoint/QuartzEndpoint.java | 350 ++++
.../camel/model/endpoint/QueueServiceEndpoint.java | 208 ++
.../camel/model/endpoint/QuickfixjEndpoint.java | 161 ++
.../camel/model/endpoint/RabbitMQEndpoint.java | 860 +++++++++
.../model/endpoint/ReactiveStreamsEndpoint.java | 222 +++
.../apache/camel/model/endpoint/RedisEndpoint.java | 229 +++
.../apache/camel/model/endpoint/RefEndpoint.java | 129 ++
.../camel/model/endpoint/RestApiEndpoint.java | 173 ++
.../apache/camel/model/endpoint/RestEndpoint.java | 308 +++
.../camel/model/endpoint/RestSwaggerEndpoint.java | 188 ++
.../camel/model/endpoint/RestletEndpoint.java | 367 ++++
.../apache/camel/model/endpoint/RssEndpoint.java | 457 +++++
.../apache/camel/model/endpoint/S3Endpoint.java | 805 ++++++++
.../apache/camel/model/endpoint/SWFEndpoint.java | 475 +++++
.../apache/camel/model/endpoint/SagaEndpoint.java | 80 +
.../camel/model/endpoint/SalesforceEndpoint.java | 691 +++++++
.../camel/model/endpoint/SchedulerEndpoint.java | 362 ++++
.../camel/model/endpoint/SchematronEndpoint.java | 118 ++
.../apache/camel/model/endpoint/ScpEndpoint.java | 429 +++++
.../apache/camel/model/endpoint/SdbEndpoint.java | 199 ++
.../apache/camel/model/endpoint/SedaEndpoint.java | 326 ++++
.../camel/model/endpoint/ServerEndpoint.java | 349 ++++
.../camel/model/endpoint/ServiceEndpoint.java | 129 ++
.../camel/model/endpoint/ServiceNowEndpoint.java | 660 +++++++
.../camel/model/endpoint/ServletEndpoint.java | 403 ++++
.../apache/camel/model/endpoint/SesEndpoint.java | 210 ++
.../apache/camel/model/endpoint/SftpEndpoint.java | 1965 +++++++++++++++++++
.../apache/camel/model/endpoint/SipEndpoint.java | 675 +++++++
.../apache/camel/model/endpoint/Sjms2Endpoint.java | 619 ++++++
.../camel/model/endpoint/SjmsBatchEndpoint.java | 436 +++++
.../apache/camel/model/endpoint/SjmsEndpoint.java | 582 ++++++
.../apache/camel/model/endpoint/SlackEndpoint.java | 438 +++++
.../apache/camel/model/endpoint/SmppEndpoint.java | 650 +++++++
.../apache/camel/model/endpoint/SnmpEndpoint.java | 594 ++++++
.../apache/camel/model/endpoint/SnsEndpoint.java | 285 +++
.../apache/camel/model/endpoint/SolrEndpoint.java | 237 +++
.../camel/model/endpoint/SoroushBotEndpoint.java | 373 ++++
.../apache/camel/model/endpoint/SparkEndpoint.java | 253 +++
.../camel/model/endpoint/SplunkEndpoint.java | 640 ++++++
.../camel/model/endpoint/SpringBatchEndpoint.java | 119 ++
.../model/endpoint/SpringIntegrationEndpoint.java | 177 ++
.../camel/model/endpoint/SpringLdapEndpoint.java | 110 ++
.../model/endpoint/SpringWebserviceEndpoint.java | 454 +++++
.../apache/camel/model/endpoint/SqlEndpoint.java | 734 +++++++
.../camel/model/endpoint/SqlStoredEndpoint.java | 163 ++
.../apache/camel/model/endpoint/SqsEndpoint.java | 826 ++++++++
.../apache/camel/model/endpoint/SshEndpoint.java | 530 +++++
.../apache/camel/model/endpoint/StAXEndpoint.java | 80 +
.../apache/camel/model/endpoint/StompEndpoint.java | 206 ++
.../camel/model/endpoint/StreamEndpoint.java | 387 ++++
.../model/endpoint/StringTemplateEndpoint.java | 120 ++
.../apache/camel/model/endpoint/StubEndpoint.java | 326 ++++
.../apache/camel/model/endpoint/SwiftEndpoint.java | 176 ++
.../camel/model/endpoint/TelegramEndpoint.java | 433 +++++
.../camel/model/endpoint/ThriftEndpoint.java | 270 +++
.../apache/camel/model/endpoint/TikaEndpoint.java | 144 ++
.../apache/camel/model/endpoint/TimerEndpoint.java | 242 +++
.../camel/model/endpoint/TwilioEndpoint.java | 159 ++
.../endpoint/TwitterDirectMessageEndpoint.java | 671 +++++++
.../model/endpoint/TwitterSearchEndpoint.java | 664 +++++++
.../model/endpoint/TwitterStreamingEndpoint.java | 686 +++++++
.../model/endpoint/TwitterTimelineEndpoint.java | 682 +++++++
.../camel/model/endpoint/UndertowEndpoint.java | 378 ++++
.../camel/model/endpoint/ValidatorEndpoint.java | 207 ++
.../camel/model/endpoint/VelocityEndpoint.java | 135 ++
.../apache/camel/model/endpoint/VertxEndpoint.java | 142 ++
.../apache/camel/model/endpoint/VmEndpoint.java | 326 ++++
.../camel/model/endpoint/WeatherEndpoint.java | 715 +++++++
.../apache/camel/model/endpoint/Web3jEndpoint.java | 572 ++++++
.../camel/model/endpoint/WebhookEndpoint.java | 197 ++
.../camel/model/endpoint/WebsocketEndpoint.java | 352 ++++
.../camel/model/endpoint/WordpressEndpoint.java | 246 +++
.../apache/camel/model/endpoint/WsEndpoint.java | 290 +++
.../camel/model/endpoint/XChangeEndpoint.java | 132 ++
.../camel/model/endpoint/XQueryEndpoint.java | 510 +++++
.../camel/model/endpoint/XmlSignatureEndpoint.java | 679 +++++++
.../apache/camel/model/endpoint/XmppEndpoint.java | 354 ++++
.../apache/camel/model/endpoint/XsltEndpoint.java | 309 +++
.../camel/model/endpoint/YammerEndpoint.java | 476 +++++
.../camel/model/endpoint/ZendeskEndpoint.java | 200 ++
.../camel/model/endpoint/ZooKeeperEndpoint.java | 247 +++
294 files changed, 105042 insertions(+)
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AMQPEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AMQPEndpoint.java
new file mode 100644
index 0000000..f2ae17f
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AMQPEndpoint.java
@@ -0,0 +1,1567 @@
+/*
+ * 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.model.endpoint;
+
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.LoggingLevel;
+import org.apache.camel.spi.ExceptionHandler;
+import org.apache.camel.spi.HeaderFilterStrategy;
+
+/**
+ * Messaging with AMQP protocol using Apache QPid Client.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class AMQPEndpoint {
+
+
+ public static class AMQPCommon extends EndpointConfiguration {
+ /**
+ * The kind of destination to use. The option is a java.lang.String
+ * type.
+ */
+ private String destinationType;
+ /**
+ * Name of the queue or topic to use as destination. The option is a
+ * java.lang.String type.
+ */
+ private String destinationName;
+ /**
+ * Sets the JMS client ID to use. Note that this value, if specified,
+ * must be unique and can only be used by a single JMS connection
+ * instance. It is typically only required for durable topic
+ * subscriptions. If using Apache ActiveMQ you may prefer to use Virtual
+ * Topics instead. The option is a java.lang.String type.
+ */
+ private String clientId;
+ /**
+ * Sets the default connection factory to be used if a connection
+ * factory is not specified for either
+ * setTemplateConnectionFactory(ConnectionFactory) or
+ * setListenerConnectionFactory(ConnectionFactory). The option is a
+ * javax.jms.ConnectionFactory type.
+ */
+ private Object connectionFactory;
+ /**
+ * Specifies whether Camel ignores the JMSReplyTo header in messages. If
+ * true, Camel does not send a reply back to the destination specified
+ * in the JMSReplyTo header. You can use this option if you want Camel
+ * to consume from a route and you do not want Camel to automatically
+ * send back a reply message because another component in your code
+ * handles the reply message. You can also use this option if you want
+ * to use Camel as a proxy between different message brokers and you
+ * want to route message from one system to another. The option is a
+ * boolean type.
+ */
+ private boolean disableReplyTo;
+ /**
+ * The durable subscriber name for specifying durable topic
+ * subscriptions. The clientId option must be configured as well. The
+ * option is a java.lang.String type.
+ */
+ private String durableSubscriptionName;
+ /**
+ * Allows you to force the use of a specific javax.jms.Message
+ * implementation for sending JMS messages. Possible values are: Bytes,
+ * Map, Object, Stream, Text. By default, Camel would determine which
+ * JMS message type to use from the In body type. This option allows you
+ * to specify it. The option is a
+ * org.apache.camel.component.jms.JmsMessageType type.
+ */
+ private JmsMessageType jmsMessageType;
+ /**
+ * Specifies whether to test the connection on startup. This ensures
+ * that when Camel starts that all the JMS consumers have a valid
+ * connection to the JMS broker. If a connection cannot be granted then
+ * Camel throws an exception on startup. This ensures that Camel is not
+ * started with failed connections. The JMS producers is tested as well.
+ * The option is a boolean type.
+ */
+ private boolean testConnectionOnStartup;
+ /**
+ * Controls whether or not to include serialized headers. Applies only
+ * when isTransferExchange() is true. This requires that the objects are
+ * serializable. Camel will exclude any non-serializable objects and log
+ * it at WARN level. The option is a boolean type.
+ */
+ private boolean allowSerializedHeaders;
+ /**
+ * Whether to startup the JmsConsumer message listener asynchronously,
+ * when starting a route. For example if a JmsConsumer cannot get a
+ * connection to a remote JMS broker, then it may block while retrying
+ * and/or failover. This will cause Camel to block while starting
+ * routes. By setting this option to true, you will let routes startup,
+ * while the JmsConsumer connects to the JMS broker using a dedicated
+ * thread in asynchronous mode. If this option is used, then beware that
+ * if the connection could not be established, then an exception is
+ * logged at WARN level, and the consumer will not be able to receive
+ * messages; You can then restart the route to retry. The option is a
+ * boolean type.
+ */
+ private boolean asyncStartListener;
+ /**
+ * Whether to stop the JmsConsumer message listener asynchronously, when
+ * stopping a route. The option is a boolean type.
+ */
+ private boolean asyncStopListener;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * A pluggable
+ * org.springframework.jms.support.destination.DestinationResolver that
+ * allows you to use your own resolver (for example, to lookup the real
+ * destination in a JNDI registry). The option is a
+ * org.springframework.jms.support.destination.DestinationResolver type.
+ */
+ private Object destinationResolver;
+ /**
+ * Specifies a org.springframework.util.ErrorHandler to be invoked in
+ * case of any uncaught exceptions thrown while processing a Message. By
+ * default these exceptions will be logged at the WARN level, if no
+ * errorHandler has been configured. You can configure logging level and
+ * whether stack traces should be logged using errorHandlerLoggingLevel
+ * and errorHandlerLogStackTrace options. This makes it much easier to
+ * configure, than having to code a custom errorHandler. The option is a
+ * org.springframework.util.ErrorHandler type.
+ */
+ private Object errorHandler;
+ /**
+ * Specifies the JMS Exception Listener that is to be notified of any
+ * underlying JMS exceptions. The option is a
+ * javax.jms.ExceptionListener type.
+ */
+ private Object exceptionListener;
+ /**
+ * To use a custom HeaderFilterStrategy to filter header to and from
+ * Camel message. The option is a
+ * org.apache.camel.spi.HeaderFilterStrategy type.
+ */
+ private HeaderFilterStrategy headerFilterStrategy;
+ /**
+ * Specify the limit for the number of consumers that are allowed to be
+ * idle at any given time. The option is a int type.
+ */
+ private int idleConsumerLimit;
+ /**
+ * Specifies the limit for idle executions of a receive task, not having
+ * received any message within its execution. If this limit is reached,
+ * the task will shut down and leave receiving to other executing tasks
+ * (in the case of dynamic scheduling; see the maxConcurrentConsumers
+ * setting). There is additional doc available from Spring. The option
+ * is a int type.
+ */
+ private int idleTaskExecutionLimit;
+ /**
+ * Whether to include all JMSXxxx properties when mapping from JMS to
+ * Camel Message. Setting this to true will include properties such as
+ * JMSXAppID, and JMSXUserID etc. Note: If you are using a custom
+ * headerFilterStrategy then this option does not apply. The option is a
+ * boolean type.
+ */
+ private boolean includeAllJMSXProperties;
+ /**
+ * Pluggable strategy for encoding and decoding JMS keys so they can be
+ * compliant with the JMS specification. Camel provides two
+ * implementations out of the box: default and passthrough. The default
+ * strategy will safely marshal dots and hyphens (. and -). The
+ * passthrough strategy leaves the key as is. Can be used for JMS
+ * brokers which do not care whether JMS header keys contain illegal
+ * characters. You can provide your own implementation of the
+ * org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it
+ * using the # notation. The option is a java.lang.String type.
+ */
+ private Object jmsKeyFormatStrategy;
+ /**
+ * Specifies whether Camel should auto map the received JMS message to a
+ * suited payload type, such as javax.jms.TextMessage to a String etc.
+ * The option is a boolean type.
+ */
+ private boolean mapJmsMessage;
+ /**
+ * The number of messages per task. -1 is unlimited. If you use a range
+ * for concurrent consumers (eg min max), then this option can be used
+ * to set a value to eg 100 to control how fast the consumers will
+ * shrink when less work is required. The option is a int type.
+ */
+ private int maxMessagesPerTask;
+ /**
+ * To use a custom Spring
+ * org.springframework.jms.support.converter.MessageConverter so you can
+ * be in control how to map to/from a javax.jms.Message. The option is a
+ * org.springframework.jms.support.converter.MessageConverter type.
+ */
+ private Object messageConverter;
+ /**
+ * To use the given MessageCreatedStrategy which are invoked when Camel
+ * creates new instances of javax.jms.Message objects when Camel is
+ * sending a JMS message. The option is a
+ * org.apache.camel.component.jms.MessageCreatedStrategy type.
+ */
+ private Object messageCreatedStrategy;
+ /**
+ * When sending, specifies whether message IDs should be added. This is
+ * just an hint to the JMS Broker. If the JMS provider accepts this
+ * hint, these messages must have the message ID set to null; if the
+ * provider ignores the hint, the message ID must be set to its normal
+ * unique value. The option is a boolean type.
+ */
+ private boolean messageIdEnabled;
+ /**
+ * Registry ID of the MessageListenerContainerFactory used to determine
+ * what
+ * org.springframework.jms.listener.AbstractMessageListenerContainer to
+ * use to consume messages. Setting this will automatically set
+ * consumerType to Custom. The option is a
+ * org.apache.camel.component.jms.MessageListenerContainerFactory type.
+ */
+ private Object messageListenerContainerFactory;
+ /**
+ * Specifies whether timestamps should be enabled by default on sending
+ * messages. This is just an hint to the JMS Broker. If the JMS provider
+ * accepts this hint, these messages must have the timestamp set to
+ * zero; if the provider ignores the hint, the timestamp must be set to
+ * its normal value. The option is a boolean type.
+ */
+ private boolean messageTimestampEnabled;
+ /**
+ * Specifies whether to inhibit the delivery of messages published by
+ * its own connection. The option is a boolean type.
+ */
+ private boolean pubSubNoLocal;
+ /**
+ * The timeout for receiving messages (in milliseconds). The option is a
+ * long type.
+ */
+ private long receiveTimeout;
+ /**
+ * Specifies the interval between recovery attempts, i.e. when a
+ * connection is being refreshed, in milliseconds. The default is 5000
+ * ms, that is, 5 seconds. The option is a long type.
+ */
+ private long recoveryInterval;
+ /**
+ * Configures how often Camel should check for timed out Exchanges when
+ * doing request/reply over JMS. By default Camel checks once per
+ * second. But if you must react faster when a timeout occurs, then you
+ * can lower this interval, to check more frequently. The timeout is
+ * determined by the option requestTimeout. The option is a long type.
+ */
+ private long requestTimeoutCheckerInterval;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+ /**
+ * If enabled and you are using Request Reply messaging (InOut) and an
+ * Exchange failed on the consumer side, then the caused Exception will
+ * be send back in response as a javax.jms.ObjectMessage. If the client
+ * is Camel, the returned Exception is rethrown. This allows you to use
+ * Camel JMS as a bridge in your routing - for example, using persistent
+ * queues to enable robust routing. Notice that if you also have
+ * transferExchange enabled, this option takes precedence. The caught
+ * exception is required to be serializable. The original Exception on
+ * the consumer side can be wrapped in an outer exception such as
+ * org.apache.camel.RuntimeCamelException when returned to the producer.
+ * The option is a boolean type.
+ */
+ private boolean transferException;
+ /**
+ * You can transfer the exchange over the wire instead of just the body
+ * and headers. The following fields are transferred: In body, Out body,
+ * Fault body, In headers, Out headers, Fault headers, exchange
+ * properties, exchange exception. This requires that the objects are
+ * serializable. Camel will exclude any non-serializable objects and log
+ * it at WARN level. You must enable this option on both the producer
+ * and consumer side, so Camel knows the payloads is an Exchange and not
+ * a regular payload. The option is a boolean type.
+ */
+ private boolean transferExchange;
+ /**
+ * If enabled and you are using Request Reply messaging (InOut) and an
+ * Exchange failed with a SOAP fault (not exception) on the consumer
+ * side, then the fault flag on org.apache.camel.Message#isFault() will
+ * be send back in the response as a JMS header with the key
+ * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
+ * fault flag will be set on the
+ * org.apache.camel.Message#setFault(boolean). You may want to enable
+ * this when using Camel components that support faults such as SOAP
+ * based such as cxf or spring-ws. The option is a boolean type.
+ */
+ private boolean transferFault;
+ /**
+ * Specifies whether JMSMessageID should always be used as
+ * JMSCorrelationID for InOut messages. The option is a boolean type.
+ */
+ private boolean useMessageIDAsCorrelationID;
+ /**
+ * Number of times to wait for provisional correlation id to be updated
+ * to the actual correlation id when doing request/reply over JMS and
+ * when the option useMessageIDAsCorrelationID is enabled. The option is
+ * a int type.
+ */
+ private int waitForProvisionCorrelationToBeUpdatedCounter;
+ /**
+ * Interval in millis to sleep each time while waiting for provisional
+ * correlation id to be updated. The option is a long type.
+ */
+ private long waitForProvisionCorrelationToBeUpdatedThreadSleepingTime;
+ /**
+ * Password to use with the ConnectionFactory. You can also configure
+ * username/password directly on the ConnectionFactory. The option is a
+ * java.lang.String type.
+ */
+ private String password;
+ /**
+ * Username to use with the ConnectionFactory. You can also configure
+ * username/password directly on the ConnectionFactory. The option is a
+ * java.lang.String type.
+ */
+ private String username;
+ /**
+ * Specifies whether to use transacted mode. The option is a boolean
+ * type.
+ */
+ private boolean transacted;
+ /**
+ * If true, Camel will create a JmsTransactionManager, if there is no
+ * transactionManager injected when option transacted=true. The option
+ * is a boolean type.
+ */
+ private boolean lazyCreateTransactionManager;
+ /**
+ * The Spring transaction manager to use. The option is a
+ * org.springframework.transaction.PlatformTransactionManager type.
+ */
+ private Object transactionManager;
+ /**
+ * The name of the transaction to use. The option is a java.lang.String
+ * type.
+ */
+ private String transactionName;
+ /**
+ * The timeout value of the transaction (in seconds), if using
+ * transacted mode. The option is a int type.
+ */
+ private int transactionTimeout;
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public String getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(String clientId) {
+ this.clientId = clientId;
+ }
+
+ public Object getConnectionFactory() {
+ return connectionFactory;
+ }
+
+ public void setConnectionFactory(Object connectionFactory) {
+ this.connectionFactory = connectionFactory;
+ }
+
+ public boolean getDisableReplyTo() {
+ return disableReplyTo;
+ }
+
+ public void setDisableReplyTo(boolean disableReplyTo) {
+ this.disableReplyTo = disableReplyTo;
+ }
+
+ public String getDurableSubscriptionName() {
+ return durableSubscriptionName;
+ }
+
+ public void setDurableSubscriptionName(String durableSubscriptionName) {
+ this.durableSubscriptionName = durableSubscriptionName;
+ }
+
+ public JmsMessageType getJmsMessageType() {
+ return jmsMessageType;
+ }
+
+ public void setJmsMessageType(JmsMessageType jmsMessageType) {
+ this.jmsMessageType = jmsMessageType;
+ }
+
+ public boolean getTestConnectionOnStartup() {
+ return testConnectionOnStartup;
+ }
+
+ public void setTestConnectionOnStartup(boolean testConnectionOnStartup) {
+ this.testConnectionOnStartup = testConnectionOnStartup;
+ }
+
+ public boolean getAllowSerializedHeaders() {
+ return allowSerializedHeaders;
+ }
+
+ public void setAllowSerializedHeaders(boolean allowSerializedHeaders) {
+ this.allowSerializedHeaders = allowSerializedHeaders;
+ }
+
+ public boolean getAsyncStartListener() {
+ return asyncStartListener;
+ }
+
+ public void setAsyncStartListener(boolean asyncStartListener) {
+ this.asyncStartListener = asyncStartListener;
+ }
+
+ public boolean getAsyncStopListener() {
+ return asyncStopListener;
+ }
+
+ public void setAsyncStopListener(boolean asyncStopListener) {
+ this.asyncStopListener = asyncStopListener;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public Object getDestinationResolver() {
+ return destinationResolver;
+ }
+
+ public void setDestinationResolver(Object destinationResolver) {
+ this.destinationResolver = destinationResolver;
+ }
+
+ public Object getErrorHandler() {
+ return errorHandler;
+ }
+
+ public void setErrorHandler(Object errorHandler) {
+ this.errorHandler = errorHandler;
+ }
+
+ public Object getExceptionListener() {
+ return exceptionListener;
+ }
+
+ public void setExceptionListener(Object exceptionListener) {
+ this.exceptionListener = exceptionListener;
+ }
+
+ public HeaderFilterStrategy getHeaderFilterStrategy() {
+ return headerFilterStrategy;
+ }
+
+ public void setHeaderFilterStrategy(
+ HeaderFilterStrategy headerFilterStrategy) {
+ this.headerFilterStrategy = headerFilterStrategy;
+ }
+
+ public int getIdleConsumerLimit() {
+ return idleConsumerLimit;
+ }
+
+ public void setIdleConsumerLimit(int idleConsumerLimit) {
+ this.idleConsumerLimit = idleConsumerLimit;
+ }
+
+ public int getIdleTaskExecutionLimit() {
+ return idleTaskExecutionLimit;
+ }
+
+ public void setIdleTaskExecutionLimit(int idleTaskExecutionLimit) {
+ this.idleTaskExecutionLimit = idleTaskExecutionLimit;
+ }
+
+ public boolean getIncludeAllJMSXProperties() {
+ return includeAllJMSXProperties;
+ }
+
+ public void setIncludeAllJMSXProperties(boolean includeAllJMSXProperties) {
+ this.includeAllJMSXProperties = includeAllJMSXProperties;
+ }
+
+ public Object getJmsKeyFormatStrategy() {
+ return jmsKeyFormatStrategy;
+ }
+
+ public void setJmsKeyFormatStrategy(Object jmsKeyFormatStrategy) {
+ this.jmsKeyFormatStrategy = jmsKeyFormatStrategy;
+ }
+
+ public boolean getMapJmsMessage() {
+ return mapJmsMessage;
+ }
+
+ public void setMapJmsMessage(boolean mapJmsMessage) {
+ this.mapJmsMessage = mapJmsMessage;
+ }
+
+ public int getMaxMessagesPerTask() {
+ return maxMessagesPerTask;
+ }
+
+ public void setMaxMessagesPerTask(int maxMessagesPerTask) {
+ this.maxMessagesPerTask = maxMessagesPerTask;
+ }
+
+ public Object getMessageConverter() {
+ return messageConverter;
+ }
+
+ public void setMessageConverter(Object messageConverter) {
+ this.messageConverter = messageConverter;
+ }
+
+ public Object getMessageCreatedStrategy() {
+ return messageCreatedStrategy;
+ }
+
+ public void setMessageCreatedStrategy(Object messageCreatedStrategy) {
+ this.messageCreatedStrategy = messageCreatedStrategy;
+ }
+
+ public boolean getMessageIdEnabled() {
+ return messageIdEnabled;
+ }
+
+ public void setMessageIdEnabled(boolean messageIdEnabled) {
+ this.messageIdEnabled = messageIdEnabled;
+ }
+
+ public Object getMessageListenerContainerFactory() {
+ return messageListenerContainerFactory;
+ }
+
+ public void setMessageListenerContainerFactory(
+ Object messageListenerContainerFactory) {
+ this.messageListenerContainerFactory = messageListenerContainerFactory;
+ }
+
+ public boolean getMessageTimestampEnabled() {
+ return messageTimestampEnabled;
+ }
+
+ public void setMessageTimestampEnabled(boolean messageTimestampEnabled) {
+ this.messageTimestampEnabled = messageTimestampEnabled;
+ }
+
+ public boolean getPubSubNoLocal() {
+ return pubSubNoLocal;
+ }
+
+ public void setPubSubNoLocal(boolean pubSubNoLocal) {
+ this.pubSubNoLocal = pubSubNoLocal;
+ }
+
+ public long getReceiveTimeout() {
+ return receiveTimeout;
+ }
+
+ public void setReceiveTimeout(long receiveTimeout) {
+ this.receiveTimeout = receiveTimeout;
+ }
+
+ public long getRecoveryInterval() {
+ return recoveryInterval;
+ }
+
+ public void setRecoveryInterval(long recoveryInterval) {
+ this.recoveryInterval = recoveryInterval;
+ }
+
+ public long getRequestTimeoutCheckerInterval() {
+ return requestTimeoutCheckerInterval;
+ }
+
+ public void setRequestTimeoutCheckerInterval(
+ long requestTimeoutCheckerInterval) {
+ this.requestTimeoutCheckerInterval = requestTimeoutCheckerInterval;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+
+ public boolean getTransferException() {
+ return transferException;
+ }
+
+ public void setTransferException(boolean transferException) {
+ this.transferException = transferException;
+ }
+
+ public boolean getTransferExchange() {
+ return transferExchange;
+ }
+
+ public void setTransferExchange(boolean transferExchange) {
+ this.transferExchange = transferExchange;
+ }
+
+ public boolean getTransferFault() {
+ return transferFault;
+ }
+
+ public void setTransferFault(boolean transferFault) {
+ this.transferFault = transferFault;
+ }
+
+ public boolean getUseMessageIDAsCorrelationID() {
+ return useMessageIDAsCorrelationID;
+ }
+
+ public void setUseMessageIDAsCorrelationID(
+ boolean useMessageIDAsCorrelationID) {
+ this.useMessageIDAsCorrelationID = useMessageIDAsCorrelationID;
+ }
+
+ public int getWaitForProvisionCorrelationToBeUpdatedCounter() {
+ return waitForProvisionCorrelationToBeUpdatedCounter;
+ }
+
+ public void setWaitForProvisionCorrelationToBeUpdatedCounter(
+ int waitForProvisionCorrelationToBeUpdatedCounter) {
+ this.waitForProvisionCorrelationToBeUpdatedCounter = waitForProvisionCorrelationToBeUpdatedCounter;
+ }
+
+ public long getWaitForProvisionCorrelationToBeUpdatedThreadSleepingTime() {
+ return waitForProvisionCorrelationToBeUpdatedThreadSleepingTime;
+ }
+
+ public void setWaitForProvisionCorrelationToBeUpdatedThreadSleepingTime(
+ long waitForProvisionCorrelationToBeUpdatedThreadSleepingTime) {
+ this.waitForProvisionCorrelationToBeUpdatedThreadSleepingTime = waitForProvisionCorrelationToBeUpdatedThreadSleepingTime;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public boolean getTransacted() {
+ return transacted;
+ }
+
+ public void setTransacted(boolean transacted) {
+ this.transacted = transacted;
+ }
+
+ public boolean getLazyCreateTransactionManager() {
+ return lazyCreateTransactionManager;
+ }
+
+ public void setLazyCreateTransactionManager(
+ boolean lazyCreateTransactionManager) {
+ this.lazyCreateTransactionManager = lazyCreateTransactionManager;
+ }
+
+ public Object getTransactionManager() {
+ return transactionManager;
+ }
+
+ public void setTransactionManager(Object transactionManager) {
+ this.transactionManager = transactionManager;
+ }
+
+ public String getTransactionName() {
+ return transactionName;
+ }
+
+ public void setTransactionName(String transactionName) {
+ this.transactionName = transactionName;
+ }
+
+ public int getTransactionTimeout() {
+ return transactionTimeout;
+ }
+
+ public void setTransactionTimeout(int transactionTimeout) {
+ this.transactionTimeout = transactionTimeout;
+ }
+ }
+
+ public static class AMQPConsumer extends AMQPCommon {
+ /**
+ * The JMS acknowledgement name, which is one of: SESSION_TRANSACTED,
+ * CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE. The option
+ * is a java.lang.String type.
+ */
+ private String acknowledgementModeName;
+ /**
+ * Whether the JmsConsumer processes the Exchange asynchronously. If
+ * enabled then the JmsConsumer may pickup the next message from the JMS
+ * queue, while the previous message is being processed asynchronously
+ * (by the Asynchronous Routing Engine). This means that messages may be
+ * processed not 100% strictly in order. If disabled (as default) then
+ * the Exchange is fully processed before the JmsConsumer will pickup
+ * the next message from the JMS queue. Note if transacted has been
+ * enabled, then asyncConsumer=true does not run asynchronously, as
+ * transaction must be executed synchronously (Camel 3.0 may support
+ * async transactions). The option is a boolean type.
+ */
+ private boolean asyncConsumer;
+ /**
+ * Specifies whether the consumer container should auto-startup. The
+ * option is a boolean type.
+ */
+ private boolean autoStartup;
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * Sets the cache level by ID for the underlying JMS resources. See
+ * cacheLevelName option for more details. The option is a int type.
+ */
+ private int cacheLevel;
+ /**
+ * Sets the cache level by name for the underlying JMS resources.
+ * Possible values are: CACHE_AUTO, CACHE_CONNECTION, CACHE_CONSUMER,
+ * CACHE_NONE, and CACHE_SESSION. The default setting is CACHE_AUTO. See
+ * the Spring documentation and Transactions Cache Levels for more
+ * information. The option is a java.lang.String type.
+ */
+ private String cacheLevelName;
+ /**
+ * Specifies the default number of concurrent consumers when consuming
+ * from JMS (not for request/reply over JMS). See also the
+ * maxMessagesPerTask option to control dynamic scaling up/down of
+ * threads. When doing request/reply over JMS then the option
+ * replyToConcurrentConsumers is used to control number of concurrent
+ * consumers on the reply message listener. The option is a int type.
+ */
+ private int concurrentConsumers;
+ /**
+ * Specifies the maximum number of concurrent consumers when consuming
+ * from JMS (not for request/reply over JMS). See also the
+ * maxMessagesPerTask option to control dynamic scaling up/down of
+ * threads. When doing request/reply over JMS then the option
+ * replyToMaxConcurrentConsumers is used to control number of concurrent
+ * consumers on the reply message listener. The option is a int type.
+ */
+ private int maxConcurrentConsumers;
+ /**
+ * Provides an explicit ReplyTo destination, which overrides any
+ * incoming value of Message.getJMSReplyTo(). The option is a
+ * java.lang.String type.
+ */
+ private String replyTo;
+ /**
+ * Specifies whether to use persistent delivery by default for replies.
+ * The option is a boolean type.
+ */
+ private boolean replyToDeliveryPersistent;
+ /**
+ * Sets the JMS selector to use. The option is a java.lang.String type.
+ */
+ private String selector;
+ /**
+ * Set whether to make the subscription durable. The durable
+ * subscription name to be used can be specified through the
+ * subscriptionName property. Default is false. Set this to true to
+ * register a durable subscription, typically in combination with a
+ * subscriptionName value (unless your message listener class name is
+ * good enough as subscription name). Only makes sense when listening to
+ * a topic (pub-sub domain), therefore this method switches the
+ * pubSubDomain flag as well. The option is a boolean type.
+ */
+ private boolean subscriptionDurable;
+ /**
+ * Set the name of a subscription to create. To be applied in case of a
+ * topic (pub-sub domain) with a shared or durable subscription. The
+ * subscription name needs to be unique within this client's JMS client
+ * id. Default is the class name of the specified message listener.
+ * Note: Only 1 concurrent consumer (which is the default of this
+ * message listener container) is allowed for each subscription, except
+ * for a shared subscription (which requires JMS 2.0). The option is a
+ * java.lang.String type.
+ */
+ private String subscriptionName;
+ /**
+ * Set whether to make the subscription shared. The shared subscription
+ * name to be used can be specified through the subscriptionName
+ * property. Default is false. Set this to true to register a shared
+ * subscription, typically in combination with a subscriptionName value
+ * (unless your message listener class name is good enough as
+ * subscription name). Note that shared subscriptions may also be
+ * durable, so this flag can (and often will) be combined with
+ * subscriptionDurable as well. Only makes sense when listening to a
+ * topic (pub-sub domain), therefore this method switches the
+ * pubSubDomain flag as well. Requires a JMS 2.0 compatible message
+ * broker. The option is a boolean type.
+ */
+ private boolean subscriptionShared;
+ /**
+ * Specifies whether the consumer accept messages while it is stopping.
+ * You may consider enabling this option, if you start and stop JMS
+ * routes at runtime, while there are still messages enqueued on the
+ * queue. If this option is false, and you stop the JMS route, then
+ * messages may be rejected, and the JMS broker would have to attempt
+ * redeliveries, which yet again may be rejected, and eventually the
+ * message may be moved at a dead letter queue on the JMS broker. To
+ * avoid this its recommended to enable this option. The option is a
+ * boolean type.
+ */
+ private boolean acceptMessagesWhileStopping;
+ /**
+ * Whether the DefaultMessageListenerContainer used in the reply
+ * managers for request-reply messaging allow the
+ * DefaultMessageListenerContainer#runningAllowed() flag to quick stop
+ * in case JmsConfiguration#isAcceptMessagesWhileStopping() is enabled,
+ * and org.apache.camel.CamelContext is currently being stopped. This
+ * quick stop ability is enabled by default in the regular JMS consumers
+ * but to enable for reply managers you must enable this flag. The
+ * option is a boolean type.
+ */
+ private boolean allowReplyManagerQuickStop;
+ /**
+ * The consumer type to use, which can be one of: Simple, Default, or
+ * Custom. The consumer type determines which Spring JMS listener to
+ * use. Default will use
+ * org.springframework.jms.listener.DefaultMessageListenerContainer,
+ * Simple will use
+ * org.springframework.jms.listener.SimpleMessageListenerContainer. When
+ * Custom is specified, the MessageListenerContainerFactory defined by
+ * the messageListenerContainerFactory option will determine what
+ * org.springframework.jms.listener.AbstractMessageListenerContainer to
+ * use. The option is a org.apache.camel.component.jms.ConsumerType
+ * type.
+ */
+ private ConsumerType consumerType;
+ /**
+ * Specifies what default TaskExecutor type to use in the
+ * DefaultMessageListenerContainer, for both consumer endpoints and the
+ * ReplyTo consumer of producer endpoints. Possible values: SimpleAsync
+ * (uses Spring's SimpleAsyncTaskExecutor) or ThreadPool (uses Spring's
+ * ThreadPoolTaskExecutor with optimal values - cached threadpool-like).
+ * If not set, it defaults to the previous behaviour, which uses a
+ * cached thread pool for consumer endpoints and SimpleAsync for reply
+ * consumers. The use of ThreadPool is recommended to reduce thread
+ * trash in elastic configurations with dynamically increasing and
+ * decreasing concurrent consumers. The option is a
+ * org.apache.camel.component.jms.DefaultTaskExecutorType type.
+ */
+ private DefaultTaskExecutorType defaultTaskExecutorType;
+ /**
+ * Enables eager loading of JMS properties and payload as soon as a
+ * message is loaded which generally is inefficient as the JMS
+ * properties may not be required but sometimes can catch early any
+ * issues with the underlying JMS provider and the use of JMS
+ * properties. The option is a boolean type.
+ */
+ private boolean eagerLoadingOfProperties;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+ /**
+ * Specifies whether the listener session should be exposed when
+ * consuming messages. The option is a boolean type.
+ */
+ private boolean exposeListenerSession;
+ /**
+ * Whether a JMS consumer is allowed to send a reply message to the same
+ * destination that the consumer is using to consume from. This prevents
+ * an endless loop by consuming and sending back the same message to
+ * itself. The option is a boolean type.
+ */
+ private boolean replyToSameDestinationAllowed;
+ /**
+ * Allows you to specify a custom task executor for consuming messages.
+ * The option is a org.springframework.core.task.TaskExecutor type.
+ */
+ private Object taskExecutor;
+ /**
+ * Allows to configure the default errorHandler logging level for
+ * logging uncaught exceptions. The option is a
+ * org.apache.camel.LoggingLevel type.
+ */
+ private LoggingLevel errorHandlerLoggingLevel;
+ /**
+ * Allows to control whether stacktraces should be logged or not, by the
+ * default errorHandler. The option is a boolean type.
+ */
+ private boolean errorHandlerLogStackTrace;
+
+ public String getAcknowledgementModeName() {
+ return acknowledgementModeName;
+ }
+
+ public void setAcknowledgementModeName(String acknowledgementModeName) {
+ this.acknowledgementModeName = acknowledgementModeName;
+ }
+
+ public boolean getAsyncConsumer() {
+ return asyncConsumer;
+ }
+
+ public void setAsyncConsumer(boolean asyncConsumer) {
+ this.asyncConsumer = asyncConsumer;
+ }
+
+ public boolean getAutoStartup() {
+ return autoStartup;
+ }
+
+ public void setAutoStartup(boolean autoStartup) {
+ this.autoStartup = autoStartup;
+ }
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public int getCacheLevel() {
+ return cacheLevel;
+ }
+
+ public void setCacheLevel(int cacheLevel) {
+ this.cacheLevel = cacheLevel;
+ }
+
+ public String getCacheLevelName() {
+ return cacheLevelName;
+ }
+
+ public void setCacheLevelName(String cacheLevelName) {
+ this.cacheLevelName = cacheLevelName;
+ }
+
+ public int getConcurrentConsumers() {
+ return concurrentConsumers;
+ }
+
+ public void setConcurrentConsumers(int concurrentConsumers) {
+ this.concurrentConsumers = concurrentConsumers;
+ }
+
+ public int getMaxConcurrentConsumers() {
+ return maxConcurrentConsumers;
+ }
+
+ public void setMaxConcurrentConsumers(int maxConcurrentConsumers) {
+ this.maxConcurrentConsumers = maxConcurrentConsumers;
+ }
+
+ public String getReplyTo() {
+ return replyTo;
+ }
+
+ public void setReplyTo(String replyTo) {
+ this.replyTo = replyTo;
+ }
+
+ public boolean getReplyToDeliveryPersistent() {
+ return replyToDeliveryPersistent;
+ }
+
+ public void setReplyToDeliveryPersistent(
+ boolean replyToDeliveryPersistent) {
+ this.replyToDeliveryPersistent = replyToDeliveryPersistent;
+ }
+
+ public String getSelector() {
+ return selector;
+ }
+
+ public void setSelector(String selector) {
+ this.selector = selector;
+ }
+
+ public boolean getSubscriptionDurable() {
+ return subscriptionDurable;
+ }
+
+ public void setSubscriptionDurable(boolean subscriptionDurable) {
+ this.subscriptionDurable = subscriptionDurable;
+ }
+
+ public String getSubscriptionName() {
+ return subscriptionName;
+ }
+
+ public void setSubscriptionName(String subscriptionName) {
+ this.subscriptionName = subscriptionName;
+ }
+
+ public boolean getSubscriptionShared() {
+ return subscriptionShared;
+ }
+
+ public void setSubscriptionShared(boolean subscriptionShared) {
+ this.subscriptionShared = subscriptionShared;
+ }
+
+ public boolean getAcceptMessagesWhileStopping() {
+ return acceptMessagesWhileStopping;
+ }
+
+ public void setAcceptMessagesWhileStopping(
+ boolean acceptMessagesWhileStopping) {
+ this.acceptMessagesWhileStopping = acceptMessagesWhileStopping;
+ }
+
+ public boolean getAllowReplyManagerQuickStop() {
+ return allowReplyManagerQuickStop;
+ }
+
+ public void setAllowReplyManagerQuickStop(
+ boolean allowReplyManagerQuickStop) {
+ this.allowReplyManagerQuickStop = allowReplyManagerQuickStop;
+ }
+
+ public ConsumerType getConsumerType() {
+ return consumerType;
+ }
+
+ public void setConsumerType(ConsumerType consumerType) {
+ this.consumerType = consumerType;
+ }
+
+ public DefaultTaskExecutorType getDefaultTaskExecutorType() {
+ return defaultTaskExecutorType;
+ }
+
+ public void setDefaultTaskExecutorType(
+ DefaultTaskExecutorType defaultTaskExecutorType) {
+ this.defaultTaskExecutorType = defaultTaskExecutorType;
+ }
+
+ public boolean getEagerLoadingOfProperties() {
+ return eagerLoadingOfProperties;
+ }
+
+ public void setEagerLoadingOfProperties(boolean eagerLoadingOfProperties) {
+ this.eagerLoadingOfProperties = eagerLoadingOfProperties;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+
+ public boolean getExposeListenerSession() {
+ return exposeListenerSession;
+ }
+
+ public void setExposeListenerSession(boolean exposeListenerSession) {
+ this.exposeListenerSession = exposeListenerSession;
+ }
+
+ public boolean getReplyToSameDestinationAllowed() {
+ return replyToSameDestinationAllowed;
+ }
+
+ public void setReplyToSameDestinationAllowed(
+ boolean replyToSameDestinationAllowed) {
+ this.replyToSameDestinationAllowed = replyToSameDestinationAllowed;
+ }
+
+ public Object getTaskExecutor() {
+ return taskExecutor;
+ }
+
+ public void setTaskExecutor(Object taskExecutor) {
+ this.taskExecutor = taskExecutor;
+ }
+
+ public LoggingLevel getErrorHandlerLoggingLevel() {
+ return errorHandlerLoggingLevel;
+ }
+
+ public void setErrorHandlerLoggingLevel(
+ LoggingLevel errorHandlerLoggingLevel) {
+ this.errorHandlerLoggingLevel = errorHandlerLoggingLevel;
+ }
+
+ public boolean getErrorHandlerLogStackTrace() {
+ return errorHandlerLogStackTrace;
+ }
+
+ public void setErrorHandlerLogStackTrace(
+ boolean errorHandlerLogStackTrace) {
+ this.errorHandlerLogStackTrace = errorHandlerLogStackTrace;
+ }
+ }
+
+ public static class AMQPProducer extends AMQPCommon {
+ /**
+ * Specifies the delivery mode to be used. Possibles values are those
+ * defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT
+ * = 2. The option is a java.lang.Integer type.
+ */
+ private Integer deliveryMode;
+ /**
+ * Specifies whether persistent delivery is used by default. The option
+ * is a boolean type.
+ */
+ private boolean deliveryPersistent;
+ /**
+ * Set if the deliveryMode, priority or timeToLive qualities of service
+ * should be used when sending messages. This option is based on
+ * Spring's JmsTemplate. The deliveryMode, priority and timeToLive
+ * options are applied to the current endpoint. This contrasts with the
+ * preserveMessageQos option, which operates at message granularity,
+ * reading QoS properties exclusively from the Camel In message headers.
+ * The option is a java.lang.Boolean type.
+ */
+ private Boolean explicitQosEnabled;
+ /**
+ * Sets whether date headers should be formatted according to the ISO
+ * 8601 standard. The option is a boolean type.
+ */
+ private boolean formatDateHeadersToIso8601;
+ /**
+ * Set to true, if you want to send message using the QoS settings
+ * specified on the message, instead of the QoS settings on the JMS
+ * endpoint. The following three headers are considered JMSPriority,
+ * JMSDeliveryMode, and JMSExpiration. You can provide all or only some
+ * of them. If not provided, Camel will fall back to use the values from
+ * the endpoint instead. So, when using this option, the headers
+ * override the values from the endpoint. The explicitQosEnabled option,
+ * by contrast, will only use options set on the endpoint, and not
+ * values from the message header. The option is a boolean type.
+ */
+ private boolean preserveMessageQos;
+ /**
+ * Values greater than 1 specify the message priority when sending
+ * (where 0 is the lowest priority and 9 is the highest). The
+ * explicitQosEnabled option must also be enabled in order for this
+ * option to have any effect. The option is a int type.
+ */
+ private int priority;
+ /**
+ * Specifies the default number of concurrent consumers when doing
+ * request/reply over JMS. See also the maxMessagesPerTask option to
+ * control dynamic scaling up/down of threads. The option is a int type.
+ */
+ private int replyToConcurrentConsumers;
+ /**
+ * Specifies the maximum number of concurrent consumers when using
+ * request/reply over JMS. See also the maxMessagesPerTask option to
+ * control dynamic scaling up/down of threads. The option is a int type.
+ */
+ private int replyToMaxConcurrentConsumers;
+ /**
+ * Specifies the maximum number of concurrent consumers for continue
+ * routing when timeout occurred when using request/reply over JMS. The
+ * option is a int type.
+ */
+ private int replyToOnTimeoutMaxConcurrentConsumers;
+ /**
+ * Provides an explicit ReplyTo destination in the JMS message, which
+ * overrides the setting of replyTo. It is useful if you want to forward
+ * the message to a remote Queue and receive the reply message from the
+ * ReplyTo destination. The option is a java.lang.String type.
+ */
+ private String replyToOverride;
+ /**
+ * Allows for explicitly specifying which kind of strategy to use for
+ * replyTo queues when doing request/reply over JMS. Possible values
+ * are: Temporary, Shared, or Exclusive. By default Camel will use
+ * temporary queues. However if replyTo has been configured, then Shared
+ * is used by default. This option allows you to use exclusive queues
+ * instead of shared ones. See Camel JMS documentation for more details,
+ * and especially the notes about the implications if running in a
+ * clustered environment, and the fact that Shared reply queues has
+ * lower performance than its alternatives Temporary and Exclusive. The
+ * option is a org.apache.camel.component.jms.ReplyToType type.
+ */
+ private ReplyToType replyToType;
+ /**
+ * The timeout for waiting for a reply when using the InOut Exchange
+ * Pattern (in milliseconds). The default is 20 seconds. You can include
+ * the header CamelJmsRequestTimeout to override this endpoint
+ * configured timeout value, and thus have per message individual
+ * timeout values. See also the requestTimeoutCheckerInterval option.
+ * The option is a long type.
+ */
+ private long requestTimeout;
+ /**
+ * When sending messages, specifies the time-to-live of the message (in
+ * milliseconds). The option is a long type.
+ */
+ private long timeToLive;
+ /**
+ * This option is used to allow additional headers which may have values
+ * that are invalid according to JMS specification. For example some
+ * message systems such as WMQ do this with header names using prefix
+ * JMS_IBM_MQMD_ containing values with byte array or other invalid
+ * types. You can specify multiple header names separated by comma, and
+ * use as suffix for wildcard matching. The option is a java.lang.String
+ * type.
+ */
+ private String allowAdditionalHeaders;
+ /**
+ * Whether to allow sending messages with no body. If this option is
+ * false and the message body is null, then an JMSException is thrown.
+ * The option is a boolean type.
+ */
+ private boolean allowNullBody;
+ /**
+ * If true, Camel will always make a JMS message copy of the message
+ * when it is passed to the producer for sending. Copying the message is
+ * needed in some situations, such as when a
+ * replyToDestinationSelectorName is set (incidentally, Camel will set
+ * the alwaysCopyMessage option to true, if a
+ * replyToDestinationSelectorName is set). The option is a boolean type.
+ */
+ private boolean alwaysCopyMessage;
+ /**
+ * Use this JMS property to correlate messages in InOut exchange pattern
+ * (request-reply) instead of JMSCorrelationID property. This allows you
+ * to exchange messages with systems that do not correlate messages
+ * using JMSCorrelationID JMS property. If used JMSCorrelationID will
+ * not be used or set by Camel. The value of here named property will be
+ * generated if not supplied in the header of the message under the same
+ * name. The option is a java.lang.String type.
+ */
+ private String correlationProperty;
+ /**
+ * Use this option to force disabling time to live. For example when you
+ * do request/reply over JMS, then Camel will by default use the
+ * requestTimeout value as time to live on the message being sent. The
+ * problem is that the sender and receiver systems have to have their
+ * clocks synchronized, so they are in sync. This is not always so easy
+ * to archive. So you can use disableTimeToLive=true to not set a time
+ * to live value on the sent message. Then the message will not expire
+ * on the receiver system. See below in section About time to live for
+ * more details. The option is a boolean type.
+ */
+ private boolean disableTimeToLive;
+ /**
+ * When using mapJmsMessage=false Camel will create a new JMS message to
+ * send to a new JMS destination if you touch the headers (get or set)
+ * during the route. Set this option to true to force Camel to send the
+ * original JMS message that was received. The option is a boolean type.
+ */
+ private boolean forceSendOriginalMessage;
+ /**
+ * Only applicable when sending to JMS destination using InOnly (eg fire
+ * and forget). Enabling this option will enrich the Camel Exchange with
+ * the actual JMSMessageID that was used by the JMS client when the
+ * message was sent to the JMS destination. The option is a boolean
+ * type.
+ */
+ private boolean includeSentJMSMessageID;
+ /**
+ * Sets the cache level by name for the reply consumer when doing
+ * request/reply over JMS. This option only applies when using fixed
+ * reply queues (not temporary). Camel will by default use:
+ * CACHE_CONSUMER for exclusive or shared w/ replyToSelectorName. And
+ * CACHE_SESSION for shared without replyToSelectorName. Some JMS
+ * brokers such as IBM WebSphere may require to set the
+ * replyToCacheLevelName=CACHE_NONE to work. Note: If using temporary
+ * queues then CACHE_NONE is not allowed, and you must use a higher
+ * value such as CACHE_CONSUMER or CACHE_SESSION. The option is a
+ * java.lang.String type.
+ */
+ private String replyToCacheLevelName;
+ /**
+ * Sets the JMS Selector using the fixed name to be used so you can
+ * filter out your own replies from the others when using a shared queue
+ * (that is, if you are not using a temporary reply queue). The option
+ * is a java.lang.String type.
+ */
+ private String replyToDestinationSelectorName;
+ /**
+ * Sets whether StreamMessage type is enabled or not. Message payloads
+ * of streaming kind such as files, InputStream, etc will either by sent
+ * as BytesMessage or StreamMessage. This option controls which kind
+ * will be used. By default BytesMessage is used which enforces the
+ * entire message payload to be read into memory. By enabling this
+ * option the message payload is read into memory in chunks and each
+ * chunk is then written to the StreamMessage until no more data. The
+ * option is a boolean type.
+ */
+ private boolean streamMessageTypeEnabled;
+
+ public Integer getDeliveryMode() {
+ return deliveryMode;
+ }
+
+ public void setDeliveryMode(Integer deliveryMode) {
+ this.deliveryMode = deliveryMode;
+ }
+
+ public boolean getDeliveryPersistent() {
+ return deliveryPersistent;
+ }
+
+ public void setDeliveryPersistent(boolean deliveryPersistent) {
+ this.deliveryPersistent = deliveryPersistent;
+ }
+
+ public Boolean getExplicitQosEnabled() {
+ return explicitQosEnabled;
+ }
+
+ public void setExplicitQosEnabled(Boolean explicitQosEnabled) {
+ this.explicitQosEnabled = explicitQosEnabled;
+ }
+
+ public boolean getFormatDateHeadersToIso8601() {
+ return formatDateHeadersToIso8601;
+ }
+
+ public void setFormatDateHeadersToIso8601(
+ boolean formatDateHeadersToIso8601) {
+ this.formatDateHeadersToIso8601 = formatDateHeadersToIso8601;
+ }
+
+ public boolean getPreserveMessageQos() {
+ return preserveMessageQos;
+ }
+
+ public void setPreserveMessageQos(boolean preserveMessageQos) {
+ this.preserveMessageQos = preserveMessageQos;
+ }
+
+ public int getPriority() {
+ return priority;
+ }
+
+ public void setPriority(int priority) {
+ this.priority = priority;
+ }
+
+ public int getReplyToConcurrentConsumers() {
+ return replyToConcurrentConsumers;
+ }
+
+ public void setReplyToConcurrentConsumers(int replyToConcurrentConsumers) {
+ this.replyToConcurrentConsumers = replyToConcurrentConsumers;
+ }
+
+ public int getReplyToMaxConcurrentConsumers() {
+ return replyToMaxConcurrentConsumers;
+ }
+
+ public void setReplyToMaxConcurrentConsumers(
+ int replyToMaxConcurrentConsumers) {
+ this.replyToMaxConcurrentConsumers = replyToMaxConcurrentConsumers;
+ }
+
+ public int getReplyToOnTimeoutMaxConcurrentConsumers() {
+ return replyToOnTimeoutMaxConcurrentConsumers;
+ }
+
+ public void setReplyToOnTimeoutMaxConcurrentConsumers(
+ int replyToOnTimeoutMaxConcurrentConsumers) {
+ this.replyToOnTimeoutMaxConcurrentConsumers = replyToOnTimeoutMaxConcurrentConsumers;
+ }
+
+ public String getReplyToOverride() {
+ return replyToOverride;
+ }
+
+ public void setReplyToOverride(String replyToOverride) {
+ this.replyToOverride = replyToOverride;
+ }
+
+ public ReplyToType getReplyToType() {
+ return replyToType;
+ }
+
+ public void setReplyToType(ReplyToType replyToType) {
+ this.replyToType = replyToType;
+ }
+
+ public long getRequestTimeout() {
+ return requestTimeout;
+ }
+
+ public void setRequestTimeout(long requestTimeout) {
+ this.requestTimeout = requestTimeout;
+ }
+
+ public long getTimeToLive() {
+ return timeToLive;
+ }
+
+ public void setTimeToLive(long timeToLive) {
+ this.timeToLive = timeToLive;
+ }
+
+ public String getAllowAdditionalHeaders() {
+ return allowAdditionalHeaders;
+ }
+
+ public void setAllowAdditionalHeaders(String allowAdditionalHeaders) {
+ this.allowAdditionalHeaders = allowAdditionalHeaders;
+ }
+
+ public boolean getAllowNullBody() {
+ return allowNullBody;
+ }
+
+ public void setAllowNullBody(boolean allowNullBody) {
+ this.allowNullBody = allowNullBody;
+ }
+
+ public boolean getAlwaysCopyMessage() {
+ return alwaysCopyMessage;
+ }
+
+ public void setAlwaysCopyMessage(boolean alwaysCopyMessage) {
+ this.alwaysCopyMessage = alwaysCopyMessage;
+ }
+
+ public String getCorrelationProperty() {
+ return correlationProperty;
+ }
+
+ public void setCorrelationProperty(String correlationProperty) {
+ this.correlationProperty = correlationProperty;
+ }
+
+ public boolean getDisableTimeToLive() {
+ return disableTimeToLive;
+ }
+
+ public void setDisableTimeToLive(boolean disableTimeToLive) {
+ this.disableTimeToLive = disableTimeToLive;
+ }
+
+ public boolean getForceSendOriginalMessage() {
+ return forceSendOriginalMessage;
+ }
+
+ public void setForceSendOriginalMessage(boolean forceSendOriginalMessage) {
+ this.forceSendOriginalMessage = forceSendOriginalMessage;
+ }
+
+ public boolean getIncludeSentJMSMessageID() {
+ return includeSentJMSMessageID;
+ }
+
+ public void setIncludeSentJMSMessageID(boolean includeSentJMSMessageID) {
+ this.includeSentJMSMessageID = includeSentJMSMessageID;
+ }
+
+ public String getReplyToCacheLevelName() {
+ return replyToCacheLevelName;
+ }
+
+ public void setReplyToCacheLevelName(String replyToCacheLevelName) {
+ this.replyToCacheLevelName = replyToCacheLevelName;
+ }
+
+ public String getReplyToDestinationSelectorName() {
+ return replyToDestinationSelectorName;
+ }
+
+ public void setReplyToDestinationSelectorName(
+ String replyToDestinationSelectorName) {
+ this.replyToDestinationSelectorName = replyToDestinationSelectorName;
+ }
+
+ public boolean getStreamMessageTypeEnabled() {
+ return streamMessageTypeEnabled;
+ }
+
+ public void setStreamMessageTypeEnabled(boolean streamMessageTypeEnabled) {
+ this.streamMessageTypeEnabled = streamMessageTypeEnabled;
+ }
+ }
+
+ public static enum JmsMessageType {
+ Bytes, Map, Object, Stream, Text;
+ }
+
+ public static enum ConsumerType {
+ Simple, Default, Custom;
+ }
+
+ public static enum DefaultTaskExecutorType {
+ ThreadPool, SimpleAsync;
+ }
+
+ public static enum ReplyToType {
+ Temporary, Shared, Exclusive;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AS2Endpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AS2Endpoint.java
new file mode 100644
index 0000000..6b9dec7
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AS2Endpoint.java
@@ -0,0 +1,527 @@
+/*
+ * 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.model.endpoint;
+
+import java.security.PrivateKey;
+import java.security.cert.Certificate;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * Component used for transferring data secure and reliable over the internet
+ * using the AS2 protocol.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class AS2Endpoint {
+
+
+ public static class AS2Common extends EndpointConfiguration {
+ /**
+ * What kind of operation to perform. The option is a
+ * org.apache.camel.component.as2.internal.AS2ApiName type.
+ */
+ private AS2ApiName apiName;
+ /**
+ * What sub operation to use for the selected operation. The option is a
+ * java.lang.String type.
+ */
+ private String methodName;
+ /**
+ * The value of the AS2From header of AS2 message. The option is a
+ * java.lang.String type.
+ */
+ private String as2From;
+ /**
+ * The structure of AS2 Message. One of: PLAIN - No encryption, no
+ * signature, SIGNED - No encryption, signature, ENCRYPTED - Encryption,
+ * no signature, ENCRYPTED_SIGNED - Encryption, signature. The option is
+ * a org.apache.camel.component.as2.api.AS2MessageStructure type.
+ */
+ private AS2MessageStructure as2MessageStructure;
+ /**
+ * The value of the AS2To header of AS2 message. The option is a
+ * java.lang.String type.
+ */
+ private String as2To;
+ /**
+ * The version of the AS2 protocol. The option is a java.lang.String
+ * type.
+ */
+ private String as2Version;
+ /**
+ * The Client Fully Qualified Domain Name (FQDN). Used in message ids
+ * sent by endpoint. The option is a java.lang.String type.
+ */
+ private String clientFqdn;
+ /**
+ * The algorithm used to compress EDI message. The option is a
+ * org.apache.camel.component.as2.api.AS2CompressionAlgorithm type.
+ */
+ private AS2CompressionAlgorithm compressionAlgorithm;
+ /**
+ * The key used to encrypt the EDI message. The option is a
+ * java.security.PrivateKey type.
+ */
+ private PrivateKey decryptingPrivateKey;
+ /**
+ * The value of the Disposition-Notification-To header. Assigning a
+ * value to this parameter requests a message disposition notification
+ * (MDN) for the AS2 message. The option is a java.lang.String type.
+ */
+ private String dispositionNotificationTo;
+ /**
+ * The transfer encoding of EDI message. The option is a
+ * java.lang.String type.
+ */
+ private String ediMessageTransferEncoding;
+ /**
+ * The content type of EDI message. One of application/edifact,
+ * application/edi-x12, application/edi-consent. The option is a
+ * org.apache.http.entity.ContentType type.
+ */
+ private Object ediMessageType;
+ /**
+ * The algorithm used to encrypt EDI message. The option is a
+ * org.apache.camel.component.as2.api.AS2EncryptionAlgorithm type.
+ */
+ private AS2EncryptionAlgorithm encryptingAlgorithm;
+ /**
+ * The chain of certificates used to encrypt EDI message. The option is
+ * a java.security.cert.Certificate[] type.
+ */
+ private Certificate[] encryptingCertificateChain;
+ /**
+ * The value of the From header of AS2 message. The option is a
+ * java.lang.String type.
+ */
+ private String from;
+ /**
+ * Sets the name of a parameter to be passed in the exchange In Body.
+ * The option is a java.lang.String type.
+ */
+ private String inBody;
+ /**
+ * The template used to format MDN message. The option is a
+ * java.lang.String type.
+ */
+ private String mdnMessageTemplate;
+ /**
+ * The request URI of EDI message. The option is a java.lang.String
+ * type.
+ */
+ private String requestUri;
+ /**
+ * The value included in the Server message header identifying the AS2
+ * Server. The option is a java.lang.String type.
+ */
+ private String server;
+ /**
+ * The Server Fully Qualified Domain Name (FQDN). Used in message ids
+ * sent by endpoint. The option is a java.lang.String type.
+ */
+ private String serverFqdn;
+ /**
+ * The port number of server. The option is a java.lang.Integer type.
+ */
+ private Integer serverPortNumber;
+ /**
+ * The list of algorithms, in order of preference, requested to generate
+ * a message integrity check (MIC) returned in message dispostion
+ * notification (MDN). The option is a java.lang.String[] type.
+ */
+ private String[] signedReceiptMicAlgorithms;
+ /**
+ * The algorithm used to sign EDI message. The option is a
+ * org.apache.camel.component.as2.api.AS2SignatureAlgorithm type.
+ */
+ private AS2SignatureAlgorithm signingAlgorithm;
+ /**
+ * The chain of certificates used to sign EDI message. The option is a
+ * java.security.cert.Certificate[] type.
+ */
+ private Certificate[] signingCertificateChain;
+ /**
+ * The key used to sign the EDI message. The option is a
+ * java.security.PrivateKey type.
+ */
+ private PrivateKey signingPrivateKey;
+ /**
+ * The value of Subject header of AS2 message. The option is a
+ * java.lang.String type.
+ */
+ private String subject;
+ /**
+ * The host name (IP or DNS name) of target host. The option is a
+ * java.lang.String type.
+ */
+ private String targetHostname;
+ /**
+ * The port number of target host. -1 indicates the scheme default port.
+ * The option is a java.lang.Integer type.
+ */
+ private Integer targetPortNumber;
+ /**
+ * The value included in the User-Agent message header identifying the
+ * AS2 user agent. The option is a java.lang.String type.
+ */
+ private String userAgent;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public AS2ApiName getApiName() {
+ return apiName;
+ }
+
+ public void setApiName(AS2ApiName apiName) {
+ this.apiName = apiName;
+ }
+
+ public String getMethodName() {
+ return methodName;
+ }
+
+ public void setMethodName(String methodName) {
+ this.methodName = methodName;
+ }
+
+ public String getAs2From() {
+ return as2From;
+ }
+
+ public void setAs2From(String as2From) {
+ this.as2From = as2From;
+ }
+
+ public AS2MessageStructure getAs2MessageStructure() {
+ return as2MessageStructure;
+ }
+
+ public void setAs2MessageStructure(
+ AS2MessageStructure as2MessageStructure) {
+ this.as2MessageStructure = as2MessageStructure;
+ }
+
+ public String getAs2To() {
+ return as2To;
+ }
+
+ public void setAs2To(String as2To) {
+ this.as2To = as2To;
+ }
+
+ public String getAs2Version() {
+ return as2Version;
+ }
+
+ public void setAs2Version(String as2Version) {
+ this.as2Version = as2Version;
+ }
+
+ public String getClientFqdn() {
+ return clientFqdn;
+ }
+
+ public void setClientFqdn(String clientFqdn) {
+ this.clientFqdn = clientFqdn;
+ }
+
+ public AS2CompressionAlgorithm getCompressionAlgorithm() {
+ return compressionAlgorithm;
+ }
+
+ public void setCompressionAlgorithm(
+ AS2CompressionAlgorithm compressionAlgorithm) {
+ this.compressionAlgorithm = compressionAlgorithm;
+ }
+
+ public PrivateKey getDecryptingPrivateKey() {
+ return decryptingPrivateKey;
+ }
+
+ public void setDecryptingPrivateKey(PrivateKey decryptingPrivateKey) {
+ this.decryptingPrivateKey = decryptingPrivateKey;
+ }
+
+ public String getDispositionNotificationTo() {
+ return dispositionNotificationTo;
+ }
+
+ public void setDispositionNotificationTo(
+ String dispositionNotificationTo) {
+ this.dispositionNotificationTo = dispositionNotificationTo;
+ }
+
+ public String getEdiMessageTransferEncoding() {
+ return ediMessageTransferEncoding;
+ }
+
+ public void setEdiMessageTransferEncoding(
+ String ediMessageTransferEncoding) {
+ this.ediMessageTransferEncoding = ediMessageTransferEncoding;
+ }
+
+ public Object getEdiMessageType() {
+ return ediMessageType;
+ }
+
+ public void setEdiMessageType(Object ediMessageType) {
+ this.ediMessageType = ediMessageType;
+ }
+
+ public AS2EncryptionAlgorithm getEncryptingAlgorithm() {
+ return encryptingAlgorithm;
+ }
+
+ public void setEncryptingAlgorithm(
+ AS2EncryptionAlgorithm encryptingAlgorithm) {
+ this.encryptingAlgorithm = encryptingAlgorithm;
+ }
+
+ public Certificate[] getEncryptingCertificateChain() {
+ return encryptingCertificateChain;
+ }
+
+ public void setEncryptingCertificateChain(
+ Certificate[] encryptingCertificateChain) {
+ this.encryptingCertificateChain = encryptingCertificateChain;
+ }
+
+ public String getFrom() {
+ return from;
+ }
+
+ public void setFrom(String from) {
+ this.from = from;
+ }
+
+ public String getInBody() {
+ return inBody;
+ }
+
+ public void setInBody(String inBody) {
+ this.inBody = inBody;
+ }
+
+ public String getMdnMessageTemplate() {
+ return mdnMessageTemplate;
+ }
+
+ public void setMdnMessageTemplate(String mdnMessageTemplate) {
+ this.mdnMessageTemplate = mdnMessageTemplate;
+ }
+
+ public String getRequestUri() {
+ return requestUri;
+ }
+
+ public void setRequestUri(String requestUri) {
+ this.requestUri = requestUri;
+ }
+
+ public String getServer() {
+ return server;
+ }
+
+ public void setServer(String server) {
+ this.server = server;
+ }
+
+ public String getServerFqdn() {
+ return serverFqdn;
+ }
+
+ public void setServerFqdn(String serverFqdn) {
+ this.serverFqdn = serverFqdn;
+ }
+
+ public Integer getServerPortNumber() {
+ return serverPortNumber;
+ }
+
+ public void setServerPortNumber(Integer serverPortNumber) {
+ this.serverPortNumber = serverPortNumber;
+ }
+
+ public String[] getSignedReceiptMicAlgorithms() {
+ return signedReceiptMicAlgorithms;
+ }
+
+ public void setSignedReceiptMicAlgorithms(
+ String[] signedReceiptMicAlgorithms) {
+ this.signedReceiptMicAlgorithms = signedReceiptMicAlgorithms;
+ }
+
+ public AS2SignatureAlgorithm getSigningAlgorithm() {
+ return signingAlgorithm;
+ }
+
+ public void setSigningAlgorithm(AS2SignatureAlgorithm signingAlgorithm) {
+ this.signingAlgorithm = signingAlgorithm;
+ }
+
+ public Certificate[] getSigningCertificateChain() {
+ return signingCertificateChain;
+ }
+
+ public void setSigningCertificateChain(
+ Certificate[] signingCertificateChain) {
+ this.signingCertificateChain = signingCertificateChain;
+ }
+
+ public PrivateKey getSigningPrivateKey() {
+ return signingPrivateKey;
+ }
+
+ public void setSigningPrivateKey(PrivateKey signingPrivateKey) {
+ this.signingPrivateKey = signingPrivateKey;
+ }
+
+ public String getSubject() {
+ return subject;
+ }
+
+ public void setSubject(String subject) {
+ this.subject = subject;
+ }
+
+ public String getTargetHostname() {
+ return targetHostname;
+ }
+
+ public void setTargetHostname(String targetHostname) {
+ this.targetHostname = targetHostname;
+ }
+
+ public Integer getTargetPortNumber() {
+ return targetPortNumber;
+ }
+
+ public void setTargetPortNumber(Integer targetPortNumber) {
+ this.targetPortNumber = targetPortNumber;
+ }
+
+ public String getUserAgent() {
+ return userAgent;
+ }
+
+ public void setUserAgent(String userAgent) {
+ this.userAgent = userAgent;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class AS2Consumer extends AS2Common {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class AS2Producer extends AS2Common {
+ }
+
+ public static enum AS2ApiName {
+ CLIENT, SERVER;
+ }
+
+ public static enum AS2MessageStructure {
+ PLAIN, SIGNED, ENCRYPTED, SIGNED_ENCRYPTED, PLAIN_COMPRESSED, SIGNED_COMPRESSED, ENCRYPTED_COMPRESSED, ENCRYPTED_COMPRESSED_SIGNED;
+ }
+
+ public static enum AS2CompressionAlgorithm {
+ ZLIB;
+ }
+
+ public static enum AS2EncryptionAlgorithm {
+ AES128_CBC, AES192_CBC, AES256_CBC, AES128_CCM, AES192_CCM, AES256_CCM, AES128_GCM, AES192_GCM, AES256_GCM, CAMELLIA128_CBC, CAMELLIA192_CBC, CAMELLIA256_CBC, CAST5_CBC, DES_CBC, DES_EDE3_CBC, GOST28147_GCFB, IDEA_CBC, RC2_CBC, RC4, SEED_CBC;
+ }
+
+ public static enum AS2SignatureAlgorithm {
+ SHA3_224WITHRSA, SHA3_256WITHRSA, SHA3_384withRSA, SHA3_512WITHRSA, MD5WITHRSA, SHA1WITHRSA, MD2WITHRSA, SHA224WITHRSA, SHA256WITHRSA, SHA384WITHRSA, SHA512WITHRSA, RIPEMD128WITHRSA, RIPEMD160WITHRSA, RIPEMD256WITHRSA, SHA224WITHDSA, SHA256WITHDSA, SHA384WITHDSA, SHA512WITHDSA, SHA3_224WITHDSA, SHA3_256WITHDSA, SHA3_384WITHDSA, SHA3_512WITHDSA, SHA1WITHDSA, SHA3_224WITHECDSA, SHA3_256WITHECDSA, SHA3_384WITHECDSA, SHA3_512WITHECDSA, SHA1WITHECDSA, SHA224WITHECDSA, SHA256WITHECDSA, [...]
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/ActiveMQEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/ActiveMQEndpoint.java
new file mode 100644
index 0000000..3283a95
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/ActiveMQEndpoint.java
@@ -0,0 +1,1568 @@
+/*
+ * 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.model.endpoint;
+
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.LoggingLevel;
+import org.apache.camel.spi.ExceptionHandler;
+import org.apache.camel.spi.HeaderFilterStrategy;
+
+/**
+ * The activemq component allows messages to be sent to (or consumed from)
+ * Apache ActiveMQ. This component extends the Camel JMS component.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class ActiveMQEndpoint {
+
+
+ public static class ActiveMQCommon extends EndpointConfiguration {
+ /**
+ * The kind of destination to use. The option is a java.lang.String
+ * type.
+ */
+ private String destinationType;
+ /**
+ * Name of the queue or topic to use as destination. The option is a
+ * java.lang.String type.
+ */
+ private String destinationName;
+ /**
+ * Sets the JMS client ID to use. Note that this value, if specified,
+ * must be unique and can only be used by a single JMS connection
+ * instance. It is typically only required for durable topic
+ * subscriptions. If using Apache ActiveMQ you may prefer to use Virtual
+ * Topics instead. The option is a java.lang.String type.
+ */
+ private String clientId;
+ /**
+ * Sets the default connection factory to be used if a connection
+ * factory is not specified for either
+ * setTemplateConnectionFactory(ConnectionFactory) or
+ * setListenerConnectionFactory(ConnectionFactory). The option is a
+ * javax.jms.ConnectionFactory type.
+ */
+ private Object connectionFactory;
+ /**
+ * Specifies whether Camel ignores the JMSReplyTo header in messages. If
+ * true, Camel does not send a reply back to the destination specified
+ * in the JMSReplyTo header. You can use this option if you want Camel
+ * to consume from a route and you do not want Camel to automatically
+ * send back a reply message because another component in your code
+ * handles the reply message. You can also use this option if you want
+ * to use Camel as a proxy between different message brokers and you
+ * want to route message from one system to another. The option is a
+ * boolean type.
+ */
+ private boolean disableReplyTo;
+ /**
+ * The durable subscriber name for specifying durable topic
+ * subscriptions. The clientId option must be configured as well. The
+ * option is a java.lang.String type.
+ */
+ private String durableSubscriptionName;
+ /**
+ * Allows you to force the use of a specific javax.jms.Message
+ * implementation for sending JMS messages. Possible values are: Bytes,
+ * Map, Object, Stream, Text. By default, Camel would determine which
+ * JMS message type to use from the In body type. This option allows you
+ * to specify it. The option is a
+ * org.apache.camel.component.jms.JmsMessageType type.
+ */
+ private JmsMessageType jmsMessageType;
+ /**
+ * Specifies whether to test the connection on startup. This ensures
+ * that when Camel starts that all the JMS consumers have a valid
+ * connection to the JMS broker. If a connection cannot be granted then
+ * Camel throws an exception on startup. This ensures that Camel is not
+ * started with failed connections. The JMS producers is tested as well.
+ * The option is a boolean type.
+ */
+ private boolean testConnectionOnStartup;
+ /**
+ * Controls whether or not to include serialized headers. Applies only
+ * when isTransferExchange() is true. This requires that the objects are
+ * serializable. Camel will exclude any non-serializable objects and log
+ * it at WARN level. The option is a boolean type.
+ */
+ private boolean allowSerializedHeaders;
+ /**
+ * Whether to startup the JmsConsumer message listener asynchronously,
+ * when starting a route. For example if a JmsConsumer cannot get a
+ * connection to a remote JMS broker, then it may block while retrying
+ * and/or failover. This will cause Camel to block while starting
+ * routes. By setting this option to true, you will let routes startup,
+ * while the JmsConsumer connects to the JMS broker using a dedicated
+ * thread in asynchronous mode. If this option is used, then beware that
+ * if the connection could not be established, then an exception is
+ * logged at WARN level, and the consumer will not be able to receive
+ * messages; You can then restart the route to retry. The option is a
+ * boolean type.
+ */
+ private boolean asyncStartListener;
+ /**
+ * Whether to stop the JmsConsumer message listener asynchronously, when
+ * stopping a route. The option is a boolean type.
+ */
+ private boolean asyncStopListener;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * A pluggable
+ * org.springframework.jms.support.destination.DestinationResolver that
+ * allows you to use your own resolver (for example, to lookup the real
+ * destination in a JNDI registry). The option is a
+ * org.springframework.jms.support.destination.DestinationResolver type.
+ */
+ private Object destinationResolver;
+ /**
+ * Specifies a org.springframework.util.ErrorHandler to be invoked in
+ * case of any uncaught exceptions thrown while processing a Message. By
+ * default these exceptions will be logged at the WARN level, if no
+ * errorHandler has been configured. You can configure logging level and
+ * whether stack traces should be logged using errorHandlerLoggingLevel
+ * and errorHandlerLogStackTrace options. This makes it much easier to
+ * configure, than having to code a custom errorHandler. The option is a
+ * org.springframework.util.ErrorHandler type.
+ */
+ private Object errorHandler;
+ /**
+ * Specifies the JMS Exception Listener that is to be notified of any
+ * underlying JMS exceptions. The option is a
+ * javax.jms.ExceptionListener type.
+ */
+ private Object exceptionListener;
+ /**
+ * To use a custom HeaderFilterStrategy to filter header to and from
+ * Camel message. The option is a
+ * org.apache.camel.spi.HeaderFilterStrategy type.
+ */
+ private HeaderFilterStrategy headerFilterStrategy;
+ /**
+ * Specify the limit for the number of consumers that are allowed to be
+ * idle at any given time. The option is a int type.
+ */
+ private int idleConsumerLimit;
+ /**
+ * Specifies the limit for idle executions of a receive task, not having
+ * received any message within its execution. If this limit is reached,
+ * the task will shut down and leave receiving to other executing tasks
+ * (in the case of dynamic scheduling; see the maxConcurrentConsumers
+ * setting). There is additional doc available from Spring. The option
+ * is a int type.
+ */
+ private int idleTaskExecutionLimit;
+ /**
+ * Whether to include all JMSXxxx properties when mapping from JMS to
+ * Camel Message. Setting this to true will include properties such as
+ * JMSXAppID, and JMSXUserID etc. Note: If you are using a custom
+ * headerFilterStrategy then this option does not apply. The option is a
+ * boolean type.
+ */
+ private boolean includeAllJMSXProperties;
+ /**
+ * Pluggable strategy for encoding and decoding JMS keys so they can be
+ * compliant with the JMS specification. Camel provides two
+ * implementations out of the box: default and passthrough. The default
+ * strategy will safely marshal dots and hyphens (. and -). The
+ * passthrough strategy leaves the key as is. Can be used for JMS
+ * brokers which do not care whether JMS header keys contain illegal
+ * characters. You can provide your own implementation of the
+ * org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it
+ * using the # notation. The option is a java.lang.String type.
+ */
+ private Object jmsKeyFormatStrategy;
+ /**
+ * Specifies whether Camel should auto map the received JMS message to a
+ * suited payload type, such as javax.jms.TextMessage to a String etc.
+ * The option is a boolean type.
+ */
+ private boolean mapJmsMessage;
+ /**
+ * The number of messages per task. -1 is unlimited. If you use a range
+ * for concurrent consumers (eg min max), then this option can be used
+ * to set a value to eg 100 to control how fast the consumers will
+ * shrink when less work is required. The option is a int type.
+ */
+ private int maxMessagesPerTask;
+ /**
+ * To use a custom Spring
+ * org.springframework.jms.support.converter.MessageConverter so you can
+ * be in control how to map to/from a javax.jms.Message. The option is a
+ * org.springframework.jms.support.converter.MessageConverter type.
+ */
+ private Object messageConverter;
+ /**
+ * To use the given MessageCreatedStrategy which are invoked when Camel
+ * creates new instances of javax.jms.Message objects when Camel is
+ * sending a JMS message. The option is a
+ * org.apache.camel.component.jms.MessageCreatedStrategy type.
+ */
+ private Object messageCreatedStrategy;
+ /**
+ * When sending, specifies whether message IDs should be added. This is
+ * just an hint to the JMS Broker. If the JMS provider accepts this
+ * hint, these messages must have the message ID set to null; if the
+ * provider ignores the hint, the message ID must be set to its normal
+ * unique value. The option is a boolean type.
+ */
+ private boolean messageIdEnabled;
+ /**
+ * Registry ID of the MessageListenerContainerFactory used to determine
+ * what
+ * org.springframework.jms.listener.AbstractMessageListenerContainer to
+ * use to consume messages. Setting this will automatically set
+ * consumerType to Custom. The option is a
+ * org.apache.camel.component.jms.MessageListenerContainerFactory type.
+ */
+ private Object messageListenerContainerFactory;
+ /**
+ * Specifies whether timestamps should be enabled by default on sending
+ * messages. This is just an hint to the JMS Broker. If the JMS provider
+ * accepts this hint, these messages must have the timestamp set to
+ * zero; if the provider ignores the hint, the timestamp must be set to
+ * its normal value. The option is a boolean type.
+ */
+ private boolean messageTimestampEnabled;
+ /**
+ * Specifies whether to inhibit the delivery of messages published by
+ * its own connection. The option is a boolean type.
+ */
+ private boolean pubSubNoLocal;
+ /**
+ * The timeout for receiving messages (in milliseconds). The option is a
+ * long type.
+ */
+ private long receiveTimeout;
+ /**
+ * Specifies the interval between recovery attempts, i.e. when a
+ * connection is being refreshed, in milliseconds. The default is 5000
+ * ms, that is, 5 seconds. The option is a long type.
+ */
+ private long recoveryInterval;
+ /**
+ * Configures how often Camel should check for timed out Exchanges when
+ * doing request/reply over JMS. By default Camel checks once per
+ * second. But if you must react faster when a timeout occurs, then you
+ * can lower this interval, to check more frequently. The timeout is
+ * determined by the option requestTimeout. The option is a long type.
+ */
+ private long requestTimeoutCheckerInterval;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+ /**
+ * If enabled and you are using Request Reply messaging (InOut) and an
+ * Exchange failed on the consumer side, then the caused Exception will
+ * be send back in response as a javax.jms.ObjectMessage. If the client
+ * is Camel, the returned Exception is rethrown. This allows you to use
+ * Camel JMS as a bridge in your routing - for example, using persistent
+ * queues to enable robust routing. Notice that if you also have
+ * transferExchange enabled, this option takes precedence. The caught
+ * exception is required to be serializable. The original Exception on
+ * the consumer side can be wrapped in an outer exception such as
+ * org.apache.camel.RuntimeCamelException when returned to the producer.
+ * The option is a boolean type.
+ */
+ private boolean transferException;
+ /**
+ * You can transfer the exchange over the wire instead of just the body
+ * and headers. The following fields are transferred: In body, Out body,
+ * Fault body, In headers, Out headers, Fault headers, exchange
+ * properties, exchange exception. This requires that the objects are
+ * serializable. Camel will exclude any non-serializable objects and log
+ * it at WARN level. You must enable this option on both the producer
+ * and consumer side, so Camel knows the payloads is an Exchange and not
+ * a regular payload. The option is a boolean type.
+ */
+ private boolean transferExchange;
+ /**
+ * If enabled and you are using Request Reply messaging (InOut) and an
+ * Exchange failed with a SOAP fault (not exception) on the consumer
+ * side, then the fault flag on org.apache.camel.Message#isFault() will
+ * be send back in the response as a JMS header with the key
+ * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
+ * fault flag will be set on the
+ * org.apache.camel.Message#setFault(boolean). You may want to enable
+ * this when using Camel components that support faults such as SOAP
+ * based such as cxf or spring-ws. The option is a boolean type.
+ */
+ private boolean transferFault;
+ /**
+ * Specifies whether JMSMessageID should always be used as
+ * JMSCorrelationID for InOut messages. The option is a boolean type.
+ */
+ private boolean useMessageIDAsCorrelationID;
+ /**
+ * Number of times to wait for provisional correlation id to be updated
+ * to the actual correlation id when doing request/reply over JMS and
+ * when the option useMessageIDAsCorrelationID is enabled. The option is
+ * a int type.
+ */
+ private int waitForProvisionCorrelationToBeUpdatedCounter;
+ /**
+ * Interval in millis to sleep each time while waiting for provisional
+ * correlation id to be updated. The option is a long type.
+ */
+ private long waitForProvisionCorrelationToBeUpdatedThreadSleepingTime;
+ /**
+ * Password to use with the ConnectionFactory. You can also configure
+ * username/password directly on the ConnectionFactory. The option is a
+ * java.lang.String type.
+ */
+ private String password;
+ /**
+ * Username to use with the ConnectionFactory. You can also configure
+ * username/password directly on the ConnectionFactory. The option is a
+ * java.lang.String type.
+ */
+ private String username;
+ /**
+ * Specifies whether to use transacted mode. The option is a boolean
+ * type.
+ */
+ private boolean transacted;
+ /**
+ * If true, Camel will create a JmsTransactionManager, if there is no
+ * transactionManager injected when option transacted=true. The option
+ * is a boolean type.
+ */
+ private boolean lazyCreateTransactionManager;
+ /**
+ * The Spring transaction manager to use. The option is a
+ * org.springframework.transaction.PlatformTransactionManager type.
+ */
+ private Object transactionManager;
+ /**
+ * The name of the transaction to use. The option is a java.lang.String
+ * type.
+ */
+ private String transactionName;
+ /**
+ * The timeout value of the transaction (in seconds), if using
+ * transacted mode. The option is a int type.
+ */
+ private int transactionTimeout;
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public String getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(String clientId) {
+ this.clientId = clientId;
+ }
+
+ public Object getConnectionFactory() {
+ return connectionFactory;
+ }
+
+ public void setConnectionFactory(Object connectionFactory) {
+ this.connectionFactory = connectionFactory;
+ }
+
+ public boolean getDisableReplyTo() {
+ return disableReplyTo;
+ }
+
+ public void setDisableReplyTo(boolean disableReplyTo) {
+ this.disableReplyTo = disableReplyTo;
+ }
+
+ public String getDurableSubscriptionName() {
+ return durableSubscriptionName;
+ }
+
+ public void setDurableSubscriptionName(String durableSubscriptionName) {
+ this.durableSubscriptionName = durableSubscriptionName;
+ }
+
+ public JmsMessageType getJmsMessageType() {
+ return jmsMessageType;
+ }
+
+ public void setJmsMessageType(JmsMessageType jmsMessageType) {
+ this.jmsMessageType = jmsMessageType;
+ }
+
+ public boolean getTestConnectionOnStartup() {
+ return testConnectionOnStartup;
+ }
+
+ public void setTestConnectionOnStartup(boolean testConnectionOnStartup) {
+ this.testConnectionOnStartup = testConnectionOnStartup;
+ }
+
+ public boolean getAllowSerializedHeaders() {
+ return allowSerializedHeaders;
+ }
+
+ public void setAllowSerializedHeaders(boolean allowSerializedHeaders) {
+ this.allowSerializedHeaders = allowSerializedHeaders;
+ }
+
+ public boolean getAsyncStartListener() {
+ return asyncStartListener;
+ }
+
+ public void setAsyncStartListener(boolean asyncStartListener) {
+ this.asyncStartListener = asyncStartListener;
+ }
+
+ public boolean getAsyncStopListener() {
+ return asyncStopListener;
+ }
+
+ public void setAsyncStopListener(boolean asyncStopListener) {
+ this.asyncStopListener = asyncStopListener;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public Object getDestinationResolver() {
+ return destinationResolver;
+ }
+
+ public void setDestinationResolver(Object destinationResolver) {
+ this.destinationResolver = destinationResolver;
+ }
+
+ public Object getErrorHandler() {
+ return errorHandler;
+ }
+
+ public void setErrorHandler(Object errorHandler) {
+ this.errorHandler = errorHandler;
+ }
+
+ public Object getExceptionListener() {
+ return exceptionListener;
+ }
+
+ public void setExceptionListener(Object exceptionListener) {
+ this.exceptionListener = exceptionListener;
+ }
+
+ public HeaderFilterStrategy getHeaderFilterStrategy() {
+ return headerFilterStrategy;
+ }
+
+ public void setHeaderFilterStrategy(
+ HeaderFilterStrategy headerFilterStrategy) {
+ this.headerFilterStrategy = headerFilterStrategy;
+ }
+
+ public int getIdleConsumerLimit() {
+ return idleConsumerLimit;
+ }
+
+ public void setIdleConsumerLimit(int idleConsumerLimit) {
+ this.idleConsumerLimit = idleConsumerLimit;
+ }
+
+ public int getIdleTaskExecutionLimit() {
+ return idleTaskExecutionLimit;
+ }
+
+ public void setIdleTaskExecutionLimit(int idleTaskExecutionLimit) {
+ this.idleTaskExecutionLimit = idleTaskExecutionLimit;
+ }
+
+ public boolean getIncludeAllJMSXProperties() {
+ return includeAllJMSXProperties;
+ }
+
+ public void setIncludeAllJMSXProperties(boolean includeAllJMSXProperties) {
+ this.includeAllJMSXProperties = includeAllJMSXProperties;
+ }
+
+ public Object getJmsKeyFormatStrategy() {
+ return jmsKeyFormatStrategy;
+ }
+
+ public void setJmsKeyFormatStrategy(Object jmsKeyFormatStrategy) {
+ this.jmsKeyFormatStrategy = jmsKeyFormatStrategy;
+ }
+
+ public boolean getMapJmsMessage() {
+ return mapJmsMessage;
+ }
+
+ public void setMapJmsMessage(boolean mapJmsMessage) {
+ this.mapJmsMessage = mapJmsMessage;
+ }
+
+ public int getMaxMessagesPerTask() {
+ return maxMessagesPerTask;
+ }
+
+ public void setMaxMessagesPerTask(int maxMessagesPerTask) {
+ this.maxMessagesPerTask = maxMessagesPerTask;
+ }
+
+ public Object getMessageConverter() {
+ return messageConverter;
+ }
+
+ public void setMessageConverter(Object messageConverter) {
+ this.messageConverter = messageConverter;
+ }
+
+ public Object getMessageCreatedStrategy() {
+ return messageCreatedStrategy;
+ }
+
+ public void setMessageCreatedStrategy(Object messageCreatedStrategy) {
+ this.messageCreatedStrategy = messageCreatedStrategy;
+ }
+
+ public boolean getMessageIdEnabled() {
+ return messageIdEnabled;
+ }
+
+ public void setMessageIdEnabled(boolean messageIdEnabled) {
+ this.messageIdEnabled = messageIdEnabled;
+ }
+
+ public Object getMessageListenerContainerFactory() {
+ return messageListenerContainerFactory;
+ }
+
+ public void setMessageListenerContainerFactory(
+ Object messageListenerContainerFactory) {
+ this.messageListenerContainerFactory = messageListenerContainerFactory;
+ }
+
+ public boolean getMessageTimestampEnabled() {
+ return messageTimestampEnabled;
+ }
+
+ public void setMessageTimestampEnabled(boolean messageTimestampEnabled) {
+ this.messageTimestampEnabled = messageTimestampEnabled;
+ }
+
+ public boolean getPubSubNoLocal() {
+ return pubSubNoLocal;
+ }
+
+ public void setPubSubNoLocal(boolean pubSubNoLocal) {
+ this.pubSubNoLocal = pubSubNoLocal;
+ }
+
+ public long getReceiveTimeout() {
+ return receiveTimeout;
+ }
+
+ public void setReceiveTimeout(long receiveTimeout) {
+ this.receiveTimeout = receiveTimeout;
+ }
+
+ public long getRecoveryInterval() {
+ return recoveryInterval;
+ }
+
+ public void setRecoveryInterval(long recoveryInterval) {
+ this.recoveryInterval = recoveryInterval;
+ }
+
+ public long getRequestTimeoutCheckerInterval() {
+ return requestTimeoutCheckerInterval;
+ }
+
+ public void setRequestTimeoutCheckerInterval(
+ long requestTimeoutCheckerInterval) {
+ this.requestTimeoutCheckerInterval = requestTimeoutCheckerInterval;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+
+ public boolean getTransferException() {
+ return transferException;
+ }
+
+ public void setTransferException(boolean transferException) {
+ this.transferException = transferException;
+ }
+
+ public boolean getTransferExchange() {
+ return transferExchange;
+ }
+
+ public void setTransferExchange(boolean transferExchange) {
+ this.transferExchange = transferExchange;
+ }
+
+ public boolean getTransferFault() {
+ return transferFault;
+ }
+
+ public void setTransferFault(boolean transferFault) {
+ this.transferFault = transferFault;
+ }
+
+ public boolean getUseMessageIDAsCorrelationID() {
+ return useMessageIDAsCorrelationID;
+ }
+
+ public void setUseMessageIDAsCorrelationID(
+ boolean useMessageIDAsCorrelationID) {
+ this.useMessageIDAsCorrelationID = useMessageIDAsCorrelationID;
+ }
+
+ public int getWaitForProvisionCorrelationToBeUpdatedCounter() {
+ return waitForProvisionCorrelationToBeUpdatedCounter;
+ }
+
+ public void setWaitForProvisionCorrelationToBeUpdatedCounter(
+ int waitForProvisionCorrelationToBeUpdatedCounter) {
+ this.waitForProvisionCorrelationToBeUpdatedCounter = waitForProvisionCorrelationToBeUpdatedCounter;
+ }
+
+ public long getWaitForProvisionCorrelationToBeUpdatedThreadSleepingTime() {
+ return waitForProvisionCorrelationToBeUpdatedThreadSleepingTime;
+ }
+
+ public void setWaitForProvisionCorrelationToBeUpdatedThreadSleepingTime(
+ long waitForProvisionCorrelationToBeUpdatedThreadSleepingTime) {
+ this.waitForProvisionCorrelationToBeUpdatedThreadSleepingTime = waitForProvisionCorrelationToBeUpdatedThreadSleepingTime;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public boolean getTransacted() {
+ return transacted;
+ }
+
+ public void setTransacted(boolean transacted) {
+ this.transacted = transacted;
+ }
+
+ public boolean getLazyCreateTransactionManager() {
+ return lazyCreateTransactionManager;
+ }
+
+ public void setLazyCreateTransactionManager(
+ boolean lazyCreateTransactionManager) {
+ this.lazyCreateTransactionManager = lazyCreateTransactionManager;
+ }
+
+ public Object getTransactionManager() {
+ return transactionManager;
+ }
+
+ public void setTransactionManager(Object transactionManager) {
+ this.transactionManager = transactionManager;
+ }
+
+ public String getTransactionName() {
+ return transactionName;
+ }
+
+ public void setTransactionName(String transactionName) {
+ this.transactionName = transactionName;
+ }
+
+ public int getTransactionTimeout() {
+ return transactionTimeout;
+ }
+
+ public void setTransactionTimeout(int transactionTimeout) {
+ this.transactionTimeout = transactionTimeout;
+ }
+ }
+
+ public static class ActiveMQConsumer extends ActiveMQCommon {
+ /**
+ * The JMS acknowledgement name, which is one of: SESSION_TRANSACTED,
+ * CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE. The option
+ * is a java.lang.String type.
+ */
+ private String acknowledgementModeName;
+ /**
+ * Whether the JmsConsumer processes the Exchange asynchronously. If
+ * enabled then the JmsConsumer may pickup the next message from the JMS
+ * queue, while the previous message is being processed asynchronously
+ * (by the Asynchronous Routing Engine). This means that messages may be
+ * processed not 100% strictly in order. If disabled (as default) then
+ * the Exchange is fully processed before the JmsConsumer will pickup
+ * the next message from the JMS queue. Note if transacted has been
+ * enabled, then asyncConsumer=true does not run asynchronously, as
+ * transaction must be executed synchronously (Camel 3.0 may support
+ * async transactions). The option is a boolean type.
+ */
+ private boolean asyncConsumer;
+ /**
+ * Specifies whether the consumer container should auto-startup. The
+ * option is a boolean type.
+ */
+ private boolean autoStartup;
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * Sets the cache level by ID for the underlying JMS resources. See
+ * cacheLevelName option for more details. The option is a int type.
+ */
+ private int cacheLevel;
+ /**
+ * Sets the cache level by name for the underlying JMS resources.
+ * Possible values are: CACHE_AUTO, CACHE_CONNECTION, CACHE_CONSUMER,
+ * CACHE_NONE, and CACHE_SESSION. The default setting is CACHE_AUTO. See
+ * the Spring documentation and Transactions Cache Levels for more
+ * information. The option is a java.lang.String type.
+ */
+ private String cacheLevelName;
+ /**
+ * Specifies the default number of concurrent consumers when consuming
+ * from JMS (not for request/reply over JMS). See also the
+ * maxMessagesPerTask option to control dynamic scaling up/down of
+ * threads. When doing request/reply over JMS then the option
+ * replyToConcurrentConsumers is used to control number of concurrent
+ * consumers on the reply message listener. The option is a int type.
+ */
+ private int concurrentConsumers;
+ /**
+ * Specifies the maximum number of concurrent consumers when consuming
+ * from JMS (not for request/reply over JMS). See also the
+ * maxMessagesPerTask option to control dynamic scaling up/down of
+ * threads. When doing request/reply over JMS then the option
+ * replyToMaxConcurrentConsumers is used to control number of concurrent
+ * consumers on the reply message listener. The option is a int type.
+ */
+ private int maxConcurrentConsumers;
+ /**
+ * Provides an explicit ReplyTo destination, which overrides any
+ * incoming value of Message.getJMSReplyTo(). The option is a
+ * java.lang.String type.
+ */
+ private String replyTo;
+ /**
+ * Specifies whether to use persistent delivery by default for replies.
+ * The option is a boolean type.
+ */
+ private boolean replyToDeliveryPersistent;
+ /**
+ * Sets the JMS selector to use. The option is a java.lang.String type.
+ */
+ private String selector;
+ /**
+ * Set whether to make the subscription durable. The durable
+ * subscription name to be used can be specified through the
+ * subscriptionName property. Default is false. Set this to true to
+ * register a durable subscription, typically in combination with a
+ * subscriptionName value (unless your message listener class name is
+ * good enough as subscription name). Only makes sense when listening to
+ * a topic (pub-sub domain), therefore this method switches the
+ * pubSubDomain flag as well. The option is a boolean type.
+ */
+ private boolean subscriptionDurable;
+ /**
+ * Set the name of a subscription to create. To be applied in case of a
+ * topic (pub-sub domain) with a shared or durable subscription. The
+ * subscription name needs to be unique within this client's JMS client
+ * id. Default is the class name of the specified message listener.
+ * Note: Only 1 concurrent consumer (which is the default of this
+ * message listener container) is allowed for each subscription, except
+ * for a shared subscription (which requires JMS 2.0). The option is a
+ * java.lang.String type.
+ */
+ private String subscriptionName;
+ /**
+ * Set whether to make the subscription shared. The shared subscription
+ * name to be used can be specified through the subscriptionName
+ * property. Default is false. Set this to true to register a shared
+ * subscription, typically in combination with a subscriptionName value
+ * (unless your message listener class name is good enough as
+ * subscription name). Note that shared subscriptions may also be
+ * durable, so this flag can (and often will) be combined with
+ * subscriptionDurable as well. Only makes sense when listening to a
+ * topic (pub-sub domain), therefore this method switches the
+ * pubSubDomain flag as well. Requires a JMS 2.0 compatible message
+ * broker. The option is a boolean type.
+ */
+ private boolean subscriptionShared;
+ /**
+ * Specifies whether the consumer accept messages while it is stopping.
+ * You may consider enabling this option, if you start and stop JMS
+ * routes at runtime, while there are still messages enqueued on the
+ * queue. If this option is false, and you stop the JMS route, then
+ * messages may be rejected, and the JMS broker would have to attempt
+ * redeliveries, which yet again may be rejected, and eventually the
+ * message may be moved at a dead letter queue on the JMS broker. To
+ * avoid this its recommended to enable this option. The option is a
+ * boolean type.
+ */
+ private boolean acceptMessagesWhileStopping;
+ /**
+ * Whether the DefaultMessageListenerContainer used in the reply
+ * managers for request-reply messaging allow the
+ * DefaultMessageListenerContainer#runningAllowed() flag to quick stop
+ * in case JmsConfiguration#isAcceptMessagesWhileStopping() is enabled,
+ * and org.apache.camel.CamelContext is currently being stopped. This
+ * quick stop ability is enabled by default in the regular JMS consumers
+ * but to enable for reply managers you must enable this flag. The
+ * option is a boolean type.
+ */
+ private boolean allowReplyManagerQuickStop;
+ /**
+ * The consumer type to use, which can be one of: Simple, Default, or
+ * Custom. The consumer type determines which Spring JMS listener to
+ * use. Default will use
+ * org.springframework.jms.listener.DefaultMessageListenerContainer,
+ * Simple will use
+ * org.springframework.jms.listener.SimpleMessageListenerContainer. When
+ * Custom is specified, the MessageListenerContainerFactory defined by
+ * the messageListenerContainerFactory option will determine what
+ * org.springframework.jms.listener.AbstractMessageListenerContainer to
+ * use. The option is a org.apache.camel.component.jms.ConsumerType
+ * type.
+ */
+ private ConsumerType consumerType;
+ /**
+ * Specifies what default TaskExecutor type to use in the
+ * DefaultMessageListenerContainer, for both consumer endpoints and the
+ * ReplyTo consumer of producer endpoints. Possible values: SimpleAsync
+ * (uses Spring's SimpleAsyncTaskExecutor) or ThreadPool (uses Spring's
+ * ThreadPoolTaskExecutor with optimal values - cached threadpool-like).
+ * If not set, it defaults to the previous behaviour, which uses a
+ * cached thread pool for consumer endpoints and SimpleAsync for reply
+ * consumers. The use of ThreadPool is recommended to reduce thread
+ * trash in elastic configurations with dynamically increasing and
+ * decreasing concurrent consumers. The option is a
+ * org.apache.camel.component.jms.DefaultTaskExecutorType type.
+ */
+ private DefaultTaskExecutorType defaultTaskExecutorType;
+ /**
+ * Enables eager loading of JMS properties and payload as soon as a
+ * message is loaded which generally is inefficient as the JMS
+ * properties may not be required but sometimes can catch early any
+ * issues with the underlying JMS provider and the use of JMS
+ * properties. The option is a boolean type.
+ */
+ private boolean eagerLoadingOfProperties;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+ /**
+ * Specifies whether the listener session should be exposed when
+ * consuming messages. The option is a boolean type.
+ */
+ private boolean exposeListenerSession;
+ /**
+ * Whether a JMS consumer is allowed to send a reply message to the same
+ * destination that the consumer is using to consume from. This prevents
+ * an endless loop by consuming and sending back the same message to
+ * itself. The option is a boolean type.
+ */
+ private boolean replyToSameDestinationAllowed;
+ /**
+ * Allows you to specify a custom task executor for consuming messages.
+ * The option is a org.springframework.core.task.TaskExecutor type.
+ */
+ private Object taskExecutor;
+ /**
+ * Allows to configure the default errorHandler logging level for
+ * logging uncaught exceptions. The option is a
+ * org.apache.camel.LoggingLevel type.
+ */
+ private LoggingLevel errorHandlerLoggingLevel;
+ /**
+ * Allows to control whether stacktraces should be logged or not, by the
+ * default errorHandler. The option is a boolean type.
+ */
+ private boolean errorHandlerLogStackTrace;
+
+ public String getAcknowledgementModeName() {
+ return acknowledgementModeName;
+ }
+
+ public void setAcknowledgementModeName(String acknowledgementModeName) {
+ this.acknowledgementModeName = acknowledgementModeName;
+ }
+
+ public boolean getAsyncConsumer() {
+ return asyncConsumer;
+ }
+
+ public void setAsyncConsumer(boolean asyncConsumer) {
+ this.asyncConsumer = asyncConsumer;
+ }
+
+ public boolean getAutoStartup() {
+ return autoStartup;
+ }
+
+ public void setAutoStartup(boolean autoStartup) {
+ this.autoStartup = autoStartup;
+ }
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public int getCacheLevel() {
+ return cacheLevel;
+ }
+
+ public void setCacheLevel(int cacheLevel) {
+ this.cacheLevel = cacheLevel;
+ }
+
+ public String getCacheLevelName() {
+ return cacheLevelName;
+ }
+
+ public void setCacheLevelName(String cacheLevelName) {
+ this.cacheLevelName = cacheLevelName;
+ }
+
+ public int getConcurrentConsumers() {
+ return concurrentConsumers;
+ }
+
+ public void setConcurrentConsumers(int concurrentConsumers) {
+ this.concurrentConsumers = concurrentConsumers;
+ }
+
+ public int getMaxConcurrentConsumers() {
+ return maxConcurrentConsumers;
+ }
+
+ public void setMaxConcurrentConsumers(int maxConcurrentConsumers) {
+ this.maxConcurrentConsumers = maxConcurrentConsumers;
+ }
+
+ public String getReplyTo() {
+ return replyTo;
+ }
+
+ public void setReplyTo(String replyTo) {
+ this.replyTo = replyTo;
+ }
+
+ public boolean getReplyToDeliveryPersistent() {
+ return replyToDeliveryPersistent;
+ }
+
+ public void setReplyToDeliveryPersistent(
+ boolean replyToDeliveryPersistent) {
+ this.replyToDeliveryPersistent = replyToDeliveryPersistent;
+ }
+
+ public String getSelector() {
+ return selector;
+ }
+
+ public void setSelector(String selector) {
+ this.selector = selector;
+ }
+
+ public boolean getSubscriptionDurable() {
+ return subscriptionDurable;
+ }
+
+ public void setSubscriptionDurable(boolean subscriptionDurable) {
+ this.subscriptionDurable = subscriptionDurable;
+ }
+
+ public String getSubscriptionName() {
+ return subscriptionName;
+ }
+
+ public void setSubscriptionName(String subscriptionName) {
+ this.subscriptionName = subscriptionName;
+ }
+
+ public boolean getSubscriptionShared() {
+ return subscriptionShared;
+ }
+
+ public void setSubscriptionShared(boolean subscriptionShared) {
+ this.subscriptionShared = subscriptionShared;
+ }
+
+ public boolean getAcceptMessagesWhileStopping() {
+ return acceptMessagesWhileStopping;
+ }
+
+ public void setAcceptMessagesWhileStopping(
+ boolean acceptMessagesWhileStopping) {
+ this.acceptMessagesWhileStopping = acceptMessagesWhileStopping;
+ }
+
+ public boolean getAllowReplyManagerQuickStop() {
+ return allowReplyManagerQuickStop;
+ }
+
+ public void setAllowReplyManagerQuickStop(
+ boolean allowReplyManagerQuickStop) {
+ this.allowReplyManagerQuickStop = allowReplyManagerQuickStop;
+ }
+
+ public ConsumerType getConsumerType() {
+ return consumerType;
+ }
+
+ public void setConsumerType(ConsumerType consumerType) {
+ this.consumerType = consumerType;
+ }
+
+ public DefaultTaskExecutorType getDefaultTaskExecutorType() {
+ return defaultTaskExecutorType;
+ }
+
+ public void setDefaultTaskExecutorType(
+ DefaultTaskExecutorType defaultTaskExecutorType) {
+ this.defaultTaskExecutorType = defaultTaskExecutorType;
+ }
+
+ public boolean getEagerLoadingOfProperties() {
+ return eagerLoadingOfProperties;
+ }
+
+ public void setEagerLoadingOfProperties(boolean eagerLoadingOfProperties) {
+ this.eagerLoadingOfProperties = eagerLoadingOfProperties;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+
+ public boolean getExposeListenerSession() {
+ return exposeListenerSession;
+ }
+
+ public void setExposeListenerSession(boolean exposeListenerSession) {
+ this.exposeListenerSession = exposeListenerSession;
+ }
+
+ public boolean getReplyToSameDestinationAllowed() {
+ return replyToSameDestinationAllowed;
+ }
+
+ public void setReplyToSameDestinationAllowed(
+ boolean replyToSameDestinationAllowed) {
+ this.replyToSameDestinationAllowed = replyToSameDestinationAllowed;
+ }
+
+ public Object getTaskExecutor() {
+ return taskExecutor;
+ }
+
+ public void setTaskExecutor(Object taskExecutor) {
+ this.taskExecutor = taskExecutor;
+ }
+
+ public LoggingLevel getErrorHandlerLoggingLevel() {
+ return errorHandlerLoggingLevel;
+ }
+
+ public void setErrorHandlerLoggingLevel(
+ LoggingLevel errorHandlerLoggingLevel) {
+ this.errorHandlerLoggingLevel = errorHandlerLoggingLevel;
+ }
+
+ public boolean getErrorHandlerLogStackTrace() {
+ return errorHandlerLogStackTrace;
+ }
+
+ public void setErrorHandlerLogStackTrace(
+ boolean errorHandlerLogStackTrace) {
+ this.errorHandlerLogStackTrace = errorHandlerLogStackTrace;
+ }
+ }
+
+ public static class ActiveMQProducer extends ActiveMQCommon {
+ /**
+ * Specifies the delivery mode to be used. Possibles values are those
+ * defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT
+ * = 2. The option is a java.lang.Integer type.
+ */
+ private Integer deliveryMode;
+ /**
+ * Specifies whether persistent delivery is used by default. The option
+ * is a boolean type.
+ */
+ private boolean deliveryPersistent;
+ /**
+ * Set if the deliveryMode, priority or timeToLive qualities of service
+ * should be used when sending messages. This option is based on
+ * Spring's JmsTemplate. The deliveryMode, priority and timeToLive
+ * options are applied to the current endpoint. This contrasts with the
+ * preserveMessageQos option, which operates at message granularity,
+ * reading QoS properties exclusively from the Camel In message headers.
+ * The option is a java.lang.Boolean type.
+ */
+ private Boolean explicitQosEnabled;
+ /**
+ * Sets whether date headers should be formatted according to the ISO
+ * 8601 standard. The option is a boolean type.
+ */
+ private boolean formatDateHeadersToIso8601;
+ /**
+ * Set to true, if you want to send message using the QoS settings
+ * specified on the message, instead of the QoS settings on the JMS
+ * endpoint. The following three headers are considered JMSPriority,
+ * JMSDeliveryMode, and JMSExpiration. You can provide all or only some
+ * of them. If not provided, Camel will fall back to use the values from
+ * the endpoint instead. So, when using this option, the headers
+ * override the values from the endpoint. The explicitQosEnabled option,
+ * by contrast, will only use options set on the endpoint, and not
+ * values from the message header. The option is a boolean type.
+ */
+ private boolean preserveMessageQos;
+ /**
+ * Values greater than 1 specify the message priority when sending
+ * (where 0 is the lowest priority and 9 is the highest). The
+ * explicitQosEnabled option must also be enabled in order for this
+ * option to have any effect. The option is a int type.
+ */
+ private int priority;
+ /**
+ * Specifies the default number of concurrent consumers when doing
+ * request/reply over JMS. See also the maxMessagesPerTask option to
+ * control dynamic scaling up/down of threads. The option is a int type.
+ */
+ private int replyToConcurrentConsumers;
+ /**
+ * Specifies the maximum number of concurrent consumers when using
+ * request/reply over JMS. See also the maxMessagesPerTask option to
+ * control dynamic scaling up/down of threads. The option is a int type.
+ */
+ private int replyToMaxConcurrentConsumers;
+ /**
+ * Specifies the maximum number of concurrent consumers for continue
+ * routing when timeout occurred when using request/reply over JMS. The
+ * option is a int type.
+ */
+ private int replyToOnTimeoutMaxConcurrentConsumers;
+ /**
+ * Provides an explicit ReplyTo destination in the JMS message, which
+ * overrides the setting of replyTo. It is useful if you want to forward
+ * the message to a remote Queue and receive the reply message from the
+ * ReplyTo destination. The option is a java.lang.String type.
+ */
+ private String replyToOverride;
+ /**
+ * Allows for explicitly specifying which kind of strategy to use for
+ * replyTo queues when doing request/reply over JMS. Possible values
+ * are: Temporary, Shared, or Exclusive. By default Camel will use
+ * temporary queues. However if replyTo has been configured, then Shared
+ * is used by default. This option allows you to use exclusive queues
+ * instead of shared ones. See Camel JMS documentation for more details,
+ * and especially the notes about the implications if running in a
+ * clustered environment, and the fact that Shared reply queues has
+ * lower performance than its alternatives Temporary and Exclusive. The
+ * option is a org.apache.camel.component.jms.ReplyToType type.
+ */
+ private ReplyToType replyToType;
+ /**
+ * The timeout for waiting for a reply when using the InOut Exchange
+ * Pattern (in milliseconds). The default is 20 seconds. You can include
+ * the header CamelJmsRequestTimeout to override this endpoint
+ * configured timeout value, and thus have per message individual
+ * timeout values. See also the requestTimeoutCheckerInterval option.
+ * The option is a long type.
+ */
+ private long requestTimeout;
+ /**
+ * When sending messages, specifies the time-to-live of the message (in
+ * milliseconds). The option is a long type.
+ */
+ private long timeToLive;
+ /**
+ * This option is used to allow additional headers which may have values
+ * that are invalid according to JMS specification. For example some
+ * message systems such as WMQ do this with header names using prefix
+ * JMS_IBM_MQMD_ containing values with byte array or other invalid
+ * types. You can specify multiple header names separated by comma, and
+ * use as suffix for wildcard matching. The option is a java.lang.String
+ * type.
+ */
+ private String allowAdditionalHeaders;
+ /**
+ * Whether to allow sending messages with no body. If this option is
+ * false and the message body is null, then an JMSException is thrown.
+ * The option is a boolean type.
+ */
+ private boolean allowNullBody;
+ /**
+ * If true, Camel will always make a JMS message copy of the message
+ * when it is passed to the producer for sending. Copying the message is
+ * needed in some situations, such as when a
+ * replyToDestinationSelectorName is set (incidentally, Camel will set
+ * the alwaysCopyMessage option to true, if a
+ * replyToDestinationSelectorName is set). The option is a boolean type.
+ */
+ private boolean alwaysCopyMessage;
+ /**
+ * Use this JMS property to correlate messages in InOut exchange pattern
+ * (request-reply) instead of JMSCorrelationID property. This allows you
+ * to exchange messages with systems that do not correlate messages
+ * using JMSCorrelationID JMS property. If used JMSCorrelationID will
+ * not be used or set by Camel. The value of here named property will be
+ * generated if not supplied in the header of the message under the same
+ * name. The option is a java.lang.String type.
+ */
+ private String correlationProperty;
+ /**
+ * Use this option to force disabling time to live. For example when you
+ * do request/reply over JMS, then Camel will by default use the
+ * requestTimeout value as time to live on the message being sent. The
+ * problem is that the sender and receiver systems have to have their
+ * clocks synchronized, so they are in sync. This is not always so easy
+ * to archive. So you can use disableTimeToLive=true to not set a time
+ * to live value on the sent message. Then the message will not expire
+ * on the receiver system. See below in section About time to live for
+ * more details. The option is a boolean type.
+ */
+ private boolean disableTimeToLive;
+ /**
+ * When using mapJmsMessage=false Camel will create a new JMS message to
+ * send to a new JMS destination if you touch the headers (get or set)
+ * during the route. Set this option to true to force Camel to send the
+ * original JMS message that was received. The option is a boolean type.
+ */
+ private boolean forceSendOriginalMessage;
+ /**
+ * Only applicable when sending to JMS destination using InOnly (eg fire
+ * and forget). Enabling this option will enrich the Camel Exchange with
+ * the actual JMSMessageID that was used by the JMS client when the
+ * message was sent to the JMS destination. The option is a boolean
+ * type.
+ */
+ private boolean includeSentJMSMessageID;
+ /**
+ * Sets the cache level by name for the reply consumer when doing
+ * request/reply over JMS. This option only applies when using fixed
+ * reply queues (not temporary). Camel will by default use:
+ * CACHE_CONSUMER for exclusive or shared w/ replyToSelectorName. And
+ * CACHE_SESSION for shared without replyToSelectorName. Some JMS
+ * brokers such as IBM WebSphere may require to set the
+ * replyToCacheLevelName=CACHE_NONE to work. Note: If using temporary
+ * queues then CACHE_NONE is not allowed, and you must use a higher
+ * value such as CACHE_CONSUMER or CACHE_SESSION. The option is a
+ * java.lang.String type.
+ */
+ private String replyToCacheLevelName;
+ /**
+ * Sets the JMS Selector using the fixed name to be used so you can
+ * filter out your own replies from the others when using a shared queue
+ * (that is, if you are not using a temporary reply queue). The option
+ * is a java.lang.String type.
+ */
+ private String replyToDestinationSelectorName;
+ /**
+ * Sets whether StreamMessage type is enabled or not. Message payloads
+ * of streaming kind such as files, InputStream, etc will either by sent
+ * as BytesMessage or StreamMessage. This option controls which kind
+ * will be used. By default BytesMessage is used which enforces the
+ * entire message payload to be read into memory. By enabling this
+ * option the message payload is read into memory in chunks and each
+ * chunk is then written to the StreamMessage until no more data. The
+ * option is a boolean type.
+ */
+ private boolean streamMessageTypeEnabled;
+
+ public Integer getDeliveryMode() {
+ return deliveryMode;
+ }
+
+ public void setDeliveryMode(Integer deliveryMode) {
+ this.deliveryMode = deliveryMode;
+ }
+
+ public boolean getDeliveryPersistent() {
+ return deliveryPersistent;
+ }
+
+ public void setDeliveryPersistent(boolean deliveryPersistent) {
+ this.deliveryPersistent = deliveryPersistent;
+ }
+
+ public Boolean getExplicitQosEnabled() {
+ return explicitQosEnabled;
+ }
+
+ public void setExplicitQosEnabled(Boolean explicitQosEnabled) {
+ this.explicitQosEnabled = explicitQosEnabled;
+ }
+
+ public boolean getFormatDateHeadersToIso8601() {
+ return formatDateHeadersToIso8601;
+ }
+
+ public void setFormatDateHeadersToIso8601(
+ boolean formatDateHeadersToIso8601) {
+ this.formatDateHeadersToIso8601 = formatDateHeadersToIso8601;
+ }
+
+ public boolean getPreserveMessageQos() {
+ return preserveMessageQos;
+ }
+
+ public void setPreserveMessageQos(boolean preserveMessageQos) {
+ this.preserveMessageQos = preserveMessageQos;
+ }
+
+ public int getPriority() {
+ return priority;
+ }
+
+ public void setPriority(int priority) {
+ this.priority = priority;
+ }
+
+ public int getReplyToConcurrentConsumers() {
+ return replyToConcurrentConsumers;
+ }
+
+ public void setReplyToConcurrentConsumers(int replyToConcurrentConsumers) {
+ this.replyToConcurrentConsumers = replyToConcurrentConsumers;
+ }
+
+ public int getReplyToMaxConcurrentConsumers() {
+ return replyToMaxConcurrentConsumers;
+ }
+
+ public void setReplyToMaxConcurrentConsumers(
+ int replyToMaxConcurrentConsumers) {
+ this.replyToMaxConcurrentConsumers = replyToMaxConcurrentConsumers;
+ }
+
+ public int getReplyToOnTimeoutMaxConcurrentConsumers() {
+ return replyToOnTimeoutMaxConcurrentConsumers;
+ }
+
+ public void setReplyToOnTimeoutMaxConcurrentConsumers(
+ int replyToOnTimeoutMaxConcurrentConsumers) {
+ this.replyToOnTimeoutMaxConcurrentConsumers = replyToOnTimeoutMaxConcurrentConsumers;
+ }
+
+ public String getReplyToOverride() {
+ return replyToOverride;
+ }
+
+ public void setReplyToOverride(String replyToOverride) {
+ this.replyToOverride = replyToOverride;
+ }
+
+ public ReplyToType getReplyToType() {
+ return replyToType;
+ }
+
+ public void setReplyToType(ReplyToType replyToType) {
+ this.replyToType = replyToType;
+ }
+
+ public long getRequestTimeout() {
+ return requestTimeout;
+ }
+
+ public void setRequestTimeout(long requestTimeout) {
+ this.requestTimeout = requestTimeout;
+ }
+
+ public long getTimeToLive() {
+ return timeToLive;
+ }
+
+ public void setTimeToLive(long timeToLive) {
+ this.timeToLive = timeToLive;
+ }
+
+ public String getAllowAdditionalHeaders() {
+ return allowAdditionalHeaders;
+ }
+
+ public void setAllowAdditionalHeaders(String allowAdditionalHeaders) {
+ this.allowAdditionalHeaders = allowAdditionalHeaders;
+ }
+
+ public boolean getAllowNullBody() {
+ return allowNullBody;
+ }
+
+ public void setAllowNullBody(boolean allowNullBody) {
+ this.allowNullBody = allowNullBody;
+ }
+
+ public boolean getAlwaysCopyMessage() {
+ return alwaysCopyMessage;
+ }
+
+ public void setAlwaysCopyMessage(boolean alwaysCopyMessage) {
+ this.alwaysCopyMessage = alwaysCopyMessage;
+ }
+
+ public String getCorrelationProperty() {
+ return correlationProperty;
+ }
+
+ public void setCorrelationProperty(String correlationProperty) {
+ this.correlationProperty = correlationProperty;
+ }
+
+ public boolean getDisableTimeToLive() {
+ return disableTimeToLive;
+ }
+
+ public void setDisableTimeToLive(boolean disableTimeToLive) {
+ this.disableTimeToLive = disableTimeToLive;
+ }
+
+ public boolean getForceSendOriginalMessage() {
+ return forceSendOriginalMessage;
+ }
+
+ public void setForceSendOriginalMessage(boolean forceSendOriginalMessage) {
+ this.forceSendOriginalMessage = forceSendOriginalMessage;
+ }
+
+ public boolean getIncludeSentJMSMessageID() {
+ return includeSentJMSMessageID;
+ }
+
+ public void setIncludeSentJMSMessageID(boolean includeSentJMSMessageID) {
+ this.includeSentJMSMessageID = includeSentJMSMessageID;
+ }
+
+ public String getReplyToCacheLevelName() {
+ return replyToCacheLevelName;
+ }
+
+ public void setReplyToCacheLevelName(String replyToCacheLevelName) {
+ this.replyToCacheLevelName = replyToCacheLevelName;
+ }
+
+ public String getReplyToDestinationSelectorName() {
+ return replyToDestinationSelectorName;
+ }
+
+ public void setReplyToDestinationSelectorName(
+ String replyToDestinationSelectorName) {
+ this.replyToDestinationSelectorName = replyToDestinationSelectorName;
+ }
+
+ public boolean getStreamMessageTypeEnabled() {
+ return streamMessageTypeEnabled;
+ }
+
+ public void setStreamMessageTypeEnabled(boolean streamMessageTypeEnabled) {
+ this.streamMessageTypeEnabled = streamMessageTypeEnabled;
+ }
+ }
+
+ public static enum JmsMessageType {
+ Bytes, Map, Object, Stream, Text;
+ }
+
+ public static enum ConsumerType {
+ Simple, Default, Custom;
+ }
+
+ public static enum DefaultTaskExecutorType {
+ ThreadPool, SimpleAsync;
+ }
+
+ public static enum ReplyToType {
+ Temporary, Shared, Exclusive;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AhcEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AhcEndpoint.java
new file mode 100644
index 0000000..dff83b5
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AhcEndpoint.java
@@ -0,0 +1,264 @@
+/*
+ * 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.model.endpoint;
+
+import java.net.URI;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.apache.camel.spi.HeaderFilterStrategy;
+
+/**
+ * To call external HTTP services using Async Http Client.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class AhcEndpoint {
+
+
+ public static class AhcCommon extends EndpointConfiguration {
+ /**
+ * The URI to use such as http://hostname:port/path. The option is a
+ * java.net.URI type.
+ */
+ private URI httpUri;
+ /**
+ * If the option is true, then the Exchange.HTTP_URI header is ignored,
+ * and use the endpoint's URI for request. You may also set the
+ * throwExceptionOnFailure to be false to let the AhcProducer send all
+ * the fault response back. The option is a boolean type.
+ */
+ private boolean bridgeEndpoint;
+ /**
+ * The initial in-memory buffer size used when transferring data between
+ * Camel and AHC Client. The option is a int type.
+ */
+ private int bufferSize;
+ /**
+ * To use a custom HeaderFilterStrategy to filter header to and from
+ * Camel message. The option is a
+ * org.apache.camel.spi.HeaderFilterStrategy type.
+ */
+ private HeaderFilterStrategy headerFilterStrategy;
+ /**
+ * Option to disable throwing the AhcOperationFailedException in case of
+ * failed responses from the remote server. This allows you to get all
+ * responses regardless of the HTTP status code. The option is a boolean
+ * type.
+ */
+ private boolean throwExceptionOnFailure;
+ /**
+ * If enabled and an Exchange failed processing on the consumer side,
+ * and if the caused Exception was send back serialized in the response
+ * as a application/x-java-serialized-object content type (for example
+ * using Jetty or Servlet Camel components). On the producer side the
+ * exception will be deserialized and thrown as is, instead of the
+ * AhcOperationFailedException. The caused exception is required to be
+ * serialized. This is by default turned off. If you enable this then be
+ * aware that Java will deserialize the incoming data from the request
+ * to Java and that can be a potential security risk. The option is a
+ * boolean type.
+ */
+ private boolean transferException;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * To use a custom AhcBinding which allows to control how to bind
+ * between AHC and Camel. The option is a
+ * org.apache.camel.component.ahc.AhcBinding type.
+ */
+ private Object binding;
+ /**
+ * To configure the AsyncHttpClient to use a custom
+ * com.ning.http.client.AsyncHttpClientConfig instance. The option is a
+ * org.asynchttpclient.AsyncHttpClientConfig type.
+ */
+ private Object clientConfig;
+ /**
+ * To configure the AsyncHttpClientConfig using the key/values from the
+ * Map. The option is a java.util.Map<java.lang.String,java.lang.Object>
+ * type.
+ */
+ private Map<String, Object> clientConfigOptions;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+ /**
+ * To configure the AsyncHttpClientConfig Realm using the key/values
+ * from the Map. The option is a
+ * java.util.Map<java.lang.String,java.lang.Object> type.
+ */
+ private Map<String, Object> clientConfigRealmOptions;
+ /**
+ * Reference to a org.apache.camel.support.jsse.SSLContextParameters in
+ * the Registry. This reference overrides any configured
+ * SSLContextParameters at the component level. See Using the JSSE
+ * Configuration Utility. Note that configuring this option will
+ * override any SSL/TLS configuration options provided through the
+ * clientConfig option at the endpoint or component level. The option is
+ * a org.apache.camel.support.jsse.SSLContextParameters type.
+ */
+ private Object sslContextParameters;
+
+ public URI getHttpUri() {
+ return httpUri;
+ }
+
+ public void setHttpUri(URI httpUri) {
+ this.httpUri = httpUri;
+ }
+
+ public boolean getBridgeEndpoint() {
+ return bridgeEndpoint;
+ }
+
+ public void setBridgeEndpoint(boolean bridgeEndpoint) {
+ this.bridgeEndpoint = bridgeEndpoint;
+ }
+
+ public int getBufferSize() {
+ return bufferSize;
+ }
+
+ public void setBufferSize(int bufferSize) {
+ this.bufferSize = bufferSize;
+ }
+
+ public HeaderFilterStrategy getHeaderFilterStrategy() {
+ return headerFilterStrategy;
+ }
+
+ public void setHeaderFilterStrategy(
+ HeaderFilterStrategy headerFilterStrategy) {
+ this.headerFilterStrategy = headerFilterStrategy;
+ }
+
+ public boolean getThrowExceptionOnFailure() {
+ return throwExceptionOnFailure;
+ }
+
+ public void setThrowExceptionOnFailure(boolean throwExceptionOnFailure) {
+ this.throwExceptionOnFailure = throwExceptionOnFailure;
+ }
+
+ public boolean getTransferException() {
+ return transferException;
+ }
+
+ public void setTransferException(boolean transferException) {
+ this.transferException = transferException;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public Object getBinding() {
+ return binding;
+ }
+
+ public void setBinding(Object binding) {
+ this.binding = binding;
+ }
+
+ public Object getClientConfig() {
+ return clientConfig;
+ }
+
+ public void setClientConfig(Object clientConfig) {
+ this.clientConfig = clientConfig;
+ }
+
+ public Map<String, Object> getClientConfigOptions() {
+ return clientConfigOptions;
+ }
+
+ public void setClientConfigOptions(
+ Map<String, Object> clientConfigOptions) {
+ this.clientConfigOptions = clientConfigOptions;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+
+ public Map<String, Object> getClientConfigRealmOptions() {
+ return clientConfigRealmOptions;
+ }
+
+ public void setClientConfigRealmOptions(
+ Map<String, Object> clientConfigRealmOptions) {
+ this.clientConfigRealmOptions = clientConfigRealmOptions;
+ }
+
+ public Object getSslContextParameters() {
+ return sslContextParameters;
+ }
+
+ public void setSslContextParameters(Object sslContextParameters) {
+ this.sslContextParameters = sslContextParameters;
+ }
+ }
+
+ public static class AhcConsumer extends AhcCommon {
+ }
+
+ public static class AhcProducer extends AhcCommon {
+ /**
+ * Define if the Connection Close header has to be added to HTTP
+ * Request. This parameter is false by default. The option is a boolean
+ * type.
+ */
+ private boolean connectionClose;
+ /**
+ * Configure a cookie handler to maintain a HTTP session. The option is
+ * a org.apache.camel.http.common.cookie.CookieHandler type.
+ */
+ private Object cookieHandler;
+
+ public boolean getConnectionClose() {
+ return connectionClose;
+ }
+
+ public void setConnectionClose(boolean connectionClose) {
+ this.connectionClose = connectionClose;
+ }
+
+ public Object getCookieHandler() {
+ return cookieHandler;
+ }
+
+ public void setCookieHandler(Object cookieHandler) {
+ this.cookieHandler = cookieHandler;
+ }
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/ApnsEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/ApnsEndpoint.java
new file mode 100644
index 0000000..4d33fc1
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/ApnsEndpoint.java
@@ -0,0 +1,362 @@
+/*
+ * 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.model.endpoint;
+
+import java.util.Map;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.LoggingLevel;
+import org.apache.camel.spi.ExceptionHandler;
+import org.apache.camel.spi.PollingConsumerPollStrategy;
+import org.apache.camel.spi.ScheduledPollConsumerScheduler;
+
+/**
+ * For sending notifications to Apple iOS devices.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class ApnsEndpoint {
+
+
+ public static class ApnsCommon extends EndpointConfiguration {
+ /**
+ * Name of the endpoint. The option is a java.lang.String type.
+ */
+ private String name;
+ /**
+ * Configure this property in case you want to statically declare tokens
+ * related to devices you want to notify. Tokens are separated by comma.
+ * The option is a java.lang.String type.
+ */
+ private String tokens;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getTokens() {
+ return tokens;
+ }
+
+ public void setTokens(String tokens) {
+ this.tokens = tokens;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class ApnsConsumer extends ApnsCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * If the polling consumer did not poll any files, you can enable this
+ * option to send an empty message (no body) instead. The option is a
+ * boolean type.
+ */
+ private boolean sendEmptyMessageWhenIdle;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+ /**
+ * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing
+ * you to provide your custom implementation to control error handling
+ * usually occurred during the poll operation before an Exchange have
+ * been created and being routed in Camel. The option is a
+ * org.apache.camel.spi.PollingConsumerPollStrategy type.
+ */
+ private PollingConsumerPollStrategy pollStrategy;
+ /**
+ * The number of subsequent error polls (failed due some error) that
+ * should happen before the backoffMultipler should kick-in. The option
+ * is a int type.
+ */
+ private int backoffErrorThreshold;
+ /**
+ * The number of subsequent idle polls that should happen before the
+ * backoffMultipler should kick-in. The option is a int type.
+ */
+ private int backoffIdleThreshold;
+ /**
+ * To let the scheduled polling consumer backoff if there has been a
+ * number of subsequent idles/errors in a row. The multiplier is then
+ * the number of polls that will be skipped before the next actual
+ * attempt is happening again. When this option is in use then
+ * backoffIdleThreshold and/or backoffErrorThreshold must also be
+ * configured. The option is a int type.
+ */
+ private int backoffMultiplier;
+ /**
+ * Milliseconds before the next poll. You can also specify time values
+ * using units, such as 60s (60 seconds), 5m30s (5 minutes and 30
+ * seconds), and 1h (1 hour). The option is a long type.
+ */
+ private long delay;
+ /**
+ * If greedy is enabled, then the ScheduledPollConsumer will run
+ * immediately again, if the previous run polled 1 or more messages. The
+ * option is a boolean type.
+ */
+ private boolean greedy;
+ /**
+ * Milliseconds before the first poll starts. You can also specify time
+ * values using units, such as 60s (60 seconds), 5m30s (5 minutes and 30
+ * seconds), and 1h (1 hour). The option is a long type.
+ */
+ private long initialDelay;
+ /**
+ * The consumer logs a start/complete log line when it polls. This
+ * option allows you to configure the logging level for that. The option
+ * is a org.apache.camel.LoggingLevel type.
+ */
+ private LoggingLevel runLoggingLevel;
+ /**
+ * Allows for configuring a custom/shared thread pool to use for the
+ * consumer. By default each consumer has its own single threaded thread
+ * pool. The option is a java.util.concurrent.ScheduledExecutorService
+ * type.
+ */
+ private ScheduledExecutorService scheduledExecutorService;
+ /**
+ * To use a cron scheduler from either camel-spring or camel-quartz2
+ * component. The option is a
+ * org.apache.camel.spi.ScheduledPollConsumerScheduler type.
+ */
+ private ScheduledPollConsumerScheduler scheduler;
+ /**
+ * To configure additional properties when using a custom scheduler or
+ * any of the Quartz2, Spring based scheduler. The option is a
+ * java.util.Map<java.lang.String,java.lang.Object> type.
+ */
+ private Map<String, Object> schedulerProperties;
+ /**
+ * Whether the scheduler should be auto started. The option is a boolean
+ * type.
+ */
+ private boolean startScheduler;
+ /**
+ * Time unit for initialDelay and delay options. The option is a
+ * java.util.concurrent.TimeUnit type.
+ */
+ private TimeUnit timeUnit;
+ /**
+ * Controls if fixed delay or fixed rate is used. See
+ * ScheduledExecutorService in JDK for details. The option is a boolean
+ * type.
+ */
+ private boolean useFixedDelay;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public boolean getSendEmptyMessageWhenIdle() {
+ return sendEmptyMessageWhenIdle;
+ }
+
+ public void setSendEmptyMessageWhenIdle(boolean sendEmptyMessageWhenIdle) {
+ this.sendEmptyMessageWhenIdle = sendEmptyMessageWhenIdle;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+
+ public PollingConsumerPollStrategy getPollStrategy() {
+ return pollStrategy;
+ }
+
+ public void setPollStrategy(PollingConsumerPollStrategy pollStrategy) {
+ this.pollStrategy = pollStrategy;
+ }
+
+ public int getBackoffErrorThreshold() {
+ return backoffErrorThreshold;
+ }
+
+ public void setBackoffErrorThreshold(int backoffErrorThreshold) {
+ this.backoffErrorThreshold = backoffErrorThreshold;
+ }
+
+ public int getBackoffIdleThreshold() {
+ return backoffIdleThreshold;
+ }
+
+ public void setBackoffIdleThreshold(int backoffIdleThreshold) {
+ this.backoffIdleThreshold = backoffIdleThreshold;
+ }
+
+ public int getBackoffMultiplier() {
+ return backoffMultiplier;
+ }
+
+ public void setBackoffMultiplier(int backoffMultiplier) {
+ this.backoffMultiplier = backoffMultiplier;
+ }
+
+ public long getDelay() {
+ return delay;
+ }
+
+ public void setDelay(long delay) {
+ this.delay = delay;
+ }
+
+ public boolean getGreedy() {
+ return greedy;
+ }
+
+ public void setGreedy(boolean greedy) {
+ this.greedy = greedy;
+ }
+
+ public long getInitialDelay() {
+ return initialDelay;
+ }
+
+ public void setInitialDelay(long initialDelay) {
+ this.initialDelay = initialDelay;
+ }
+
+ public LoggingLevel getRunLoggingLevel() {
+ return runLoggingLevel;
+ }
+
+ public void setRunLoggingLevel(LoggingLevel runLoggingLevel) {
+ this.runLoggingLevel = runLoggingLevel;
+ }
+
+ public ScheduledExecutorService getScheduledExecutorService() {
+ return scheduledExecutorService;
+ }
+
+ public void setScheduledExecutorService(
+ ScheduledExecutorService scheduledExecutorService) {
+ this.scheduledExecutorService = scheduledExecutorService;
+ }
+
+ public ScheduledPollConsumerScheduler getScheduler() {
+ return scheduler;
+ }
+
+ public void setScheduler(ScheduledPollConsumerScheduler scheduler) {
+ this.scheduler = scheduler;
+ }
+
+ public Map<String, Object> getSchedulerProperties() {
+ return schedulerProperties;
+ }
+
+ public void setSchedulerProperties(
+ Map<String, Object> schedulerProperties) {
+ this.schedulerProperties = schedulerProperties;
+ }
+
+ public boolean getStartScheduler() {
+ return startScheduler;
+ }
+
+ public void setStartScheduler(boolean startScheduler) {
+ this.startScheduler = startScheduler;
+ }
+
+ public TimeUnit getTimeUnit() {
+ return timeUnit;
+ }
+
+ public void setTimeUnit(TimeUnit timeUnit) {
+ this.timeUnit = timeUnit;
+ }
+
+ public boolean getUseFixedDelay() {
+ return useFixedDelay;
+ }
+
+ public void setUseFixedDelay(boolean useFixedDelay) {
+ this.useFixedDelay = useFixedDelay;
+ }
+ }
+
+ public static class ApnsProducer extends ApnsCommon {
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AsteriskEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AsteriskEndpoint.java
new file mode 100644
index 0000000..156cc0c
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AsteriskEndpoint.java
@@ -0,0 +1,182 @@
+/*
+ * 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.model.endpoint;
+
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * The asterisk component is used to interact with Asterisk PBX Server.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class AsteriskEndpoint {
+
+
+ public static class AsteriskCommon extends EndpointConfiguration {
+ /**
+ * Logical name. The option is a java.lang.String type.
+ */
+ private String name;
+ /**
+ * The hostname of the asterisk server. The option is a java.lang.String
+ * type.
+ */
+ private String hostname;
+ /**
+ * Login password. The option is a java.lang.String type.
+ */
+ private String password;
+ /**
+ * Login username. The option is a java.lang.String type.
+ */
+ private String username;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getHostname() {
+ return hostname;
+ }
+
+ public void setHostname(String hostname) {
+ this.hostname = hostname;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class AsteriskConsumer extends AsteriskCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class AsteriskProducer extends AsteriskCommon {
+ /**
+ * What action to perform such as getting queue status, sip peers or
+ * extension state. The option is a
+ * org.apache.camel.component.asterisk.AsteriskAction type.
+ */
+ private AsteriskAction action;
+
+ public AsteriskAction getAction() {
+ return action;
+ }
+
+ public void setAction(AsteriskAction action) {
+ this.action = action;
+ }
+ }
+
+ public static enum AsteriskAction {
+ QUEUE_STATUS, SIP_PEERS, EXTENSION_STATE;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtmosEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtmosEndpoint.java
new file mode 100644
index 0000000..972660a
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtmosEndpoint.java
@@ -0,0 +1,241 @@
+/*
+ * 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.model.endpoint;
+
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * The atmos component is used for integrating with EMC's Atomos Storage.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class AtmosEndpoint {
+
+
+ public static class AtmosCommon extends EndpointConfiguration {
+ /**
+ * Atmos name. The option is a java.lang.String type.
+ */
+ private String name;
+ /**
+ * Operation to perform. The option is a
+ * org.apache.camel.component.atmos.util.AtmosOperation type.
+ */
+ private AtmosOperation operation;
+ /**
+ * Atmos SSL validation. The option is a boolean type.
+ */
+ private boolean enableSslValidation;
+ /**
+ * Atmos client fullTokenId. The option is a java.lang.String type.
+ */
+ private String fullTokenId;
+ /**
+ * Local path to put files. The option is a java.lang.String type.
+ */
+ private String localPath;
+ /**
+ * New path on Atmos when moving files. The option is a java.lang.String
+ * type.
+ */
+ private String newRemotePath;
+ /**
+ * Search query on Atmos. The option is a java.lang.String type.
+ */
+ private String query;
+ /**
+ * Where to put files on Atmos. The option is a java.lang.String type.
+ */
+ private String remotePath;
+ /**
+ * Atmos shared secret. The option is a java.lang.String type.
+ */
+ private String secretKey;
+ /**
+ * Atomos server uri. The option is a java.lang.String type.
+ */
+ private String uri;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public AtmosOperation getOperation() {
+ return operation;
+ }
+
+ public void setOperation(AtmosOperation operation) {
+ this.operation = operation;
+ }
+
+ public boolean getEnableSslValidation() {
+ return enableSslValidation;
+ }
+
+ public void setEnableSslValidation(boolean enableSslValidation) {
+ this.enableSslValidation = enableSslValidation;
+ }
+
+ public String getFullTokenId() {
+ return fullTokenId;
+ }
+
+ public void setFullTokenId(String fullTokenId) {
+ this.fullTokenId = fullTokenId;
+ }
+
+ public String getLocalPath() {
+ return localPath;
+ }
+
+ public void setLocalPath(String localPath) {
+ this.localPath = localPath;
+ }
+
+ public String getNewRemotePath() {
+ return newRemotePath;
+ }
+
+ public void setNewRemotePath(String newRemotePath) {
+ this.newRemotePath = newRemotePath;
+ }
+
+ public String getQuery() {
+ return query;
+ }
+
+ public void setQuery(String query) {
+ this.query = query;
+ }
+
+ public String getRemotePath() {
+ return remotePath;
+ }
+
+ public void setRemotePath(String remotePath) {
+ this.remotePath = remotePath;
+ }
+
+ public String getSecretKey() {
+ return secretKey;
+ }
+
+ public void setSecretKey(String secretKey) {
+ this.secretKey = secretKey;
+ }
+
+ public String getUri() {
+ return uri;
+ }
+
+ public void setUri(String uri) {
+ this.uri = uri;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class AtmosConsumer extends AtmosCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class AtmosProducer extends AtmosCommon {
+ }
+
+ public static enum AtmosOperation {
+ put, del, search, get, move;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomEndpoint.java
new file mode 100644
index 0000000..cf42c10
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomEndpoint.java
@@ -0,0 +1,457 @@
+/*
+ * 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.model.endpoint;
+
+import java.util.Date;
+import java.util.Map;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.LoggingLevel;
+import org.apache.camel.spi.ExceptionHandler;
+import org.apache.camel.spi.PollingConsumerPollStrategy;
+import org.apache.camel.spi.ScheduledPollConsumerScheduler;
+
+/**
+ * The atom component is used for consuming Atom RSS feeds.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class AtomEndpoint {
+
+
+ public static class AtomCommon extends EndpointConfiguration {
+ /**
+ * The URI to the feed to poll. The option is a java.lang.String type.
+ */
+ private String feedUri;
+ /**
+ * Sets whether to add the feed object as a header. The option is a
+ * boolean type.
+ */
+ private boolean feedHeader;
+ /**
+ * Sets whether to use filtering or not of the entries. The option is a
+ * boolean type.
+ */
+ private boolean filter;
+ /**
+ * Sets the timestamp to be used for filtering entries from the atom
+ * feeds. This options is only in conjunction with the splitEntries. The
+ * option is a java.util.Date type.
+ */
+ private Date lastUpdate;
+ /**
+ * Sets the password to be used for basic authentication when polling
+ * from a HTTP feed. The option is a java.lang.String type.
+ */
+ private String password;
+ /**
+ * Sets whether to sort entries by published date. Only works when
+ * splitEntries = true. The option is a boolean type.
+ */
+ private boolean sortEntries;
+ /**
+ * Sets whether or not entries should be sent individually or whether
+ * the entire feed should be sent as a single message. The option is a
+ * boolean type.
+ */
+ private boolean splitEntries;
+ /**
+ * Sets whether all entries identified in a single feed poll should be
+ * delivered immediately. If true, only one entry is processed per
+ * consumer.delay. Only applicable when splitEntries = true. The option
+ * is a boolean type.
+ */
+ private boolean throttleEntries;
+ /**
+ * Sets the username to be used for basic authentication when polling
+ * from a HTTP feed. The option is a java.lang.String type.
+ */
+ private String username;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getFeedUri() {
+ return feedUri;
+ }
+
+ public void setFeedUri(String feedUri) {
+ this.feedUri = feedUri;
+ }
+
+ public boolean getFeedHeader() {
+ return feedHeader;
+ }
+
+ public void setFeedHeader(boolean feedHeader) {
+ this.feedHeader = feedHeader;
+ }
+
+ public boolean getFilter() {
+ return filter;
+ }
+
+ public void setFilter(boolean filter) {
+ this.filter = filter;
+ }
+
+ public Date getLastUpdate() {
+ return lastUpdate;
+ }
+
+ public void setLastUpdate(Date lastUpdate) {
+ this.lastUpdate = lastUpdate;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public boolean getSortEntries() {
+ return sortEntries;
+ }
+
+ public void setSortEntries(boolean sortEntries) {
+ this.sortEntries = sortEntries;
+ }
+
+ public boolean getSplitEntries() {
+ return splitEntries;
+ }
+
+ public void setSplitEntries(boolean splitEntries) {
+ this.splitEntries = splitEntries;
+ }
+
+ public boolean getThrottleEntries() {
+ return throttleEntries;
+ }
+
+ public void setThrottleEntries(boolean throttleEntries) {
+ this.throttleEntries = throttleEntries;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class AtomConsumer extends AtomCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * If the polling consumer did not poll any files, you can enable this
+ * option to send an empty message (no body) instead. The option is a
+ * boolean type.
+ */
+ private boolean sendEmptyMessageWhenIdle;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+ /**
+ * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing
+ * you to provide your custom implementation to control error handling
+ * usually occurred during the poll operation before an Exchange have
+ * been created and being routed in Camel. The option is a
+ * org.apache.camel.spi.PollingConsumerPollStrategy type.
+ */
+ private PollingConsumerPollStrategy pollStrategy;
+ /**
+ * The number of subsequent error polls (failed due some error) that
+ * should happen before the backoffMultipler should kick-in. The option
+ * is a int type.
+ */
+ private int backoffErrorThreshold;
+ /**
+ * The number of subsequent idle polls that should happen before the
+ * backoffMultipler should kick-in. The option is a int type.
+ */
+ private int backoffIdleThreshold;
+ /**
+ * To let the scheduled polling consumer backoff if there has been a
+ * number of subsequent idles/errors in a row. The multiplier is then
+ * the number of polls that will be skipped before the next actual
+ * attempt is happening again. When this option is in use then
+ * backoffIdleThreshold and/or backoffErrorThreshold must also be
+ * configured. The option is a int type.
+ */
+ private int backoffMultiplier;
+ /**
+ * Milliseconds before the next poll. You can also specify time values
+ * using units, such as 60s (60 seconds), 5m30s (5 minutes and 30
+ * seconds), and 1h (1 hour). The option is a long type.
+ */
+ private long delay;
+ /**
+ * If greedy is enabled, then the ScheduledPollConsumer will run
+ * immediately again, if the previous run polled 1 or more messages. The
+ * option is a boolean type.
+ */
+ private boolean greedy;
+ /**
+ * Milliseconds before the first poll starts. You can also specify time
+ * values using units, such as 60s (60 seconds), 5m30s (5 minutes and 30
+ * seconds), and 1h (1 hour). The option is a long type.
+ */
+ private long initialDelay;
+ /**
+ * The consumer logs a start/complete log line when it polls. This
+ * option allows you to configure the logging level for that. The option
+ * is a org.apache.camel.LoggingLevel type.
+ */
+ private LoggingLevel runLoggingLevel;
+ /**
+ * Allows for configuring a custom/shared thread pool to use for the
+ * consumer. By default each consumer has its own single threaded thread
+ * pool. The option is a java.util.concurrent.ScheduledExecutorService
+ * type.
+ */
+ private ScheduledExecutorService scheduledExecutorService;
+ /**
+ * To use a cron scheduler from either camel-spring or camel-quartz2
+ * component. The option is a
+ * org.apache.camel.spi.ScheduledPollConsumerScheduler type.
+ */
+ private ScheduledPollConsumerScheduler scheduler;
+ /**
+ * To configure additional properties when using a custom scheduler or
+ * any of the Quartz2, Spring based scheduler. The option is a
+ * java.util.Map<java.lang.String,java.lang.Object> type.
+ */
+ private Map<String, Object> schedulerProperties;
+ /**
+ * Whether the scheduler should be auto started. The option is a boolean
+ * type.
+ */
+ private boolean startScheduler;
+ /**
+ * Time unit for initialDelay and delay options. The option is a
+ * java.util.concurrent.TimeUnit type.
+ */
+ private TimeUnit timeUnit;
+ /**
+ * Controls if fixed delay or fixed rate is used. See
+ * ScheduledExecutorService in JDK for details. The option is a boolean
+ * type.
+ */
+ private boolean useFixedDelay;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public boolean getSendEmptyMessageWhenIdle() {
+ return sendEmptyMessageWhenIdle;
+ }
+
+ public void setSendEmptyMessageWhenIdle(boolean sendEmptyMessageWhenIdle) {
+ this.sendEmptyMessageWhenIdle = sendEmptyMessageWhenIdle;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+
+ public PollingConsumerPollStrategy getPollStrategy() {
+ return pollStrategy;
+ }
+
+ public void setPollStrategy(PollingConsumerPollStrategy pollStrategy) {
+ this.pollStrategy = pollStrategy;
+ }
+
+ public int getBackoffErrorThreshold() {
+ return backoffErrorThreshold;
+ }
+
+ public void setBackoffErrorThreshold(int backoffErrorThreshold) {
+ this.backoffErrorThreshold = backoffErrorThreshold;
+ }
+
+ public int getBackoffIdleThreshold() {
+ return backoffIdleThreshold;
+ }
+
+ public void setBackoffIdleThreshold(int backoffIdleThreshold) {
+ this.backoffIdleThreshold = backoffIdleThreshold;
+ }
+
+ public int getBackoffMultiplier() {
+ return backoffMultiplier;
+ }
+
+ public void setBackoffMultiplier(int backoffMultiplier) {
+ this.backoffMultiplier = backoffMultiplier;
+ }
+
+ public long getDelay() {
+ return delay;
+ }
+
+ public void setDelay(long delay) {
+ this.delay = delay;
+ }
+
+ public boolean getGreedy() {
+ return greedy;
+ }
+
+ public void setGreedy(boolean greedy) {
+ this.greedy = greedy;
+ }
+
+ public long getInitialDelay() {
+ return initialDelay;
+ }
+
+ public void setInitialDelay(long initialDelay) {
+ this.initialDelay = initialDelay;
+ }
+
+ public LoggingLevel getRunLoggingLevel() {
+ return runLoggingLevel;
+ }
+
+ public void setRunLoggingLevel(LoggingLevel runLoggingLevel) {
+ this.runLoggingLevel = runLoggingLevel;
+ }
+
+ public ScheduledExecutorService getScheduledExecutorService() {
+ return scheduledExecutorService;
+ }
+
+ public void setScheduledExecutorService(
+ ScheduledExecutorService scheduledExecutorService) {
+ this.scheduledExecutorService = scheduledExecutorService;
+ }
+
+ public ScheduledPollConsumerScheduler getScheduler() {
+ return scheduler;
+ }
+
+ public void setScheduler(ScheduledPollConsumerScheduler scheduler) {
+ this.scheduler = scheduler;
+ }
+
+ public Map<String, Object> getSchedulerProperties() {
+ return schedulerProperties;
+ }
+
+ public void setSchedulerProperties(
+ Map<String, Object> schedulerProperties) {
+ this.schedulerProperties = schedulerProperties;
+ }
+
+ public boolean getStartScheduler() {
+ return startScheduler;
+ }
+
+ public void setStartScheduler(boolean startScheduler) {
+ this.startScheduler = startScheduler;
+ }
+
+ public TimeUnit getTimeUnit() {
+ return timeUnit;
+ }
+
+ public void setTimeUnit(TimeUnit timeUnit) {
+ this.timeUnit = timeUnit;
+ }
+
+ public boolean getUseFixedDelay() {
+ return useFixedDelay;
+ }
+
+ public void setUseFixedDelay(boolean useFixedDelay) {
+ this.useFixedDelay = useFixedDelay;
+ }
+ }
+
+ public static class AtomProducer extends AtomCommon {
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixMapEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixMapEndpoint.java
new file mode 100644
index 0000000..66b9a48
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixMapEndpoint.java
@@ -0,0 +1,315 @@
+/*
+ * 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.model.endpoint;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * The atomix-map component is used to access Atomix's distributed map.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class AtomixMapEndpoint {
+
+
+ public static class AtomixMapCommon extends EndpointConfiguration {
+ /**
+ * The distributed resource name. The option is a java.lang.String type.
+ */
+ private String resourceName;
+ /**
+ * The Atomix instance to use. The option is a io.atomix.Atomix type.
+ */
+ private Object atomix;
+ /**
+ * The Atomix configuration uri. The option is a java.lang.String type.
+ */
+ private String configurationUri;
+ /**
+ * The default action. The option is a
+ * org.apache.camel.component.atomix.client.map.AtomixMap.Action type.
+ */
+ private Object defaultAction;
+ /**
+ * The key to use if none is set in the header or to listen for events
+ * for a specific key. The option is a java.lang.Object type.
+ */
+ private Object key;
+ /**
+ * The address of the nodes composing the cluster. The option is a
+ * java.lang.String type.
+ */
+ private List<Object> nodes;
+ /**
+ * The header that wil carry the result. The option is a
+ * java.lang.String type.
+ */
+ private String resultHeader;
+ /**
+ * Sets the Atomix transport. The option is a
+ * io.atomix.catalyst.transport.Transport type.
+ */
+ private Class<Object> transport;
+ /**
+ * The resource ttl. The option is a long type.
+ */
+ private long ttl;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * The cluster wide default resource configuration. The option is a
+ * java.util.Properties type.
+ */
+ private Properties defaultResourceConfig;
+ /**
+ * The local default resource options. The option is a
+ * java.util.Properties type.
+ */
+ private Properties defaultResourceOptions;
+ /**
+ * Sets if the local member should join groups as PersistentMember or
+ * not. If set to ephemeral the local member will receive an auto
+ * generated ID thus the local one is ignored. The option is a boolean
+ * type.
+ */
+ private boolean ephemeral;
+ /**
+ * The read consistency level. The option is a
+ * io.atomix.resource.ReadConsistency type.
+ */
+ private ReadConsistency readConsistency;
+ /**
+ * Cluster wide resources configuration. The option is a
+ * java.util.Map<java.lang.String,java.util.Properties> type.
+ */
+ private Map<String, Properties> resourceConfigs;
+ /**
+ * Local resources configurations. The option is a
+ * java.util.Map<java.lang.String,java.util.Properties> type.
+ */
+ private Map<String, Properties> resourceOptions;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ public Object getAtomix() {
+ return atomix;
+ }
+
+ public void setAtomix(Object atomix) {
+ this.atomix = atomix;
+ }
+
+ public String getConfigurationUri() {
+ return configurationUri;
+ }
+
+ public void setConfigurationUri(String configurationUri) {
+ this.configurationUri = configurationUri;
+ }
+
+ public Object getDefaultAction() {
+ return defaultAction;
+ }
+
+ public void setDefaultAction(Object defaultAction) {
+ this.defaultAction = defaultAction;
+ }
+
+ public Object getKey() {
+ return key;
+ }
+
+ public void setKey(Object key) {
+ this.key = key;
+ }
+
+ public List<Object> getNodes() {
+ return nodes;
+ }
+
+ public void setNodes(List<Object> nodes) {
+ this.nodes = nodes;
+ }
+
+ public String getResultHeader() {
+ return resultHeader;
+ }
+
+ public void setResultHeader(String resultHeader) {
+ this.resultHeader = resultHeader;
+ }
+
+ public Class<Object> getTransport() {
+ return transport;
+ }
+
+ public void setTransport(Class<Object> transport) {
+ this.transport = transport;
+ }
+
+ public long getTtl() {
+ return ttl;
+ }
+
+ public void setTtl(long ttl) {
+ this.ttl = ttl;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public Properties getDefaultResourceConfig() {
+ return defaultResourceConfig;
+ }
+
+ public void setDefaultResourceConfig(Properties defaultResourceConfig) {
+ this.defaultResourceConfig = defaultResourceConfig;
+ }
+
+ public Properties getDefaultResourceOptions() {
+ return defaultResourceOptions;
+ }
+
+ public void setDefaultResourceOptions(Properties defaultResourceOptions) {
+ this.defaultResourceOptions = defaultResourceOptions;
+ }
+
+ public boolean getEphemeral() {
+ return ephemeral;
+ }
+
+ public void setEphemeral(boolean ephemeral) {
+ this.ephemeral = ephemeral;
+ }
+
+ public ReadConsistency getReadConsistency() {
+ return readConsistency;
+ }
+
+ public void setReadConsistency(ReadConsistency readConsistency) {
+ this.readConsistency = readConsistency;
+ }
+
+ public Map<String, Properties> getResourceConfigs() {
+ return resourceConfigs;
+ }
+
+ public void setResourceConfigs(Map<String, Properties> resourceConfigs) {
+ this.resourceConfigs = resourceConfigs;
+ }
+
+ public Map<String, Properties> getResourceOptions() {
+ return resourceOptions;
+ }
+
+ public void setResourceOptions(Map<String, Properties> resourceOptions) {
+ this.resourceOptions = resourceOptions;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class AtomixMapConsumer extends AtomixMapCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class AtomixMapProducer extends AtomixMapCommon {
+ }
+
+ public static enum ReadConsistency {
+ ATOMIC, ATOMIC_LEASE, SEQUENTIAL, LOCAL;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixMessagingEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixMessagingEndpoint.java
new file mode 100644
index 0000000..a5fd400
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixMessagingEndpoint.java
@@ -0,0 +1,327 @@
+/*
+ * 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.model.endpoint;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * The atomix-messaging component is used to access Atomix's group messaging.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class AtomixMessagingEndpoint {
+
+
+ public static class AtomixMessagingCommon extends EndpointConfiguration {
+ /**
+ * The distributed resource name. The option is a java.lang.String type.
+ */
+ private String resourceName;
+ /**
+ * The Atomix instance to use. The option is a io.atomix.Atomix type.
+ */
+ private Object atomix;
+ /**
+ * The broadcast type. The option is a
+ * org.apache.camel.component.atomix.client.messaging.AtomixMessaging.BroadcastType type.
+ */
+ private Object broadcastType;
+ /**
+ * The messaging channel name. The option is a java.lang.String type.
+ */
+ private String channelName;
+ /**
+ * The Atomix configuration uri. The option is a java.lang.String type.
+ */
+ private String configurationUri;
+ /**
+ * The default action. The option is a
+ * org.apache.camel.component.atomix.client.messaging.AtomixMessaging.Action type.
+ */
+ private Object defaultAction;
+ /**
+ * The Atomix Group member name. The option is a java.lang.String type.
+ */
+ private String memberName;
+ /**
+ * The address of the nodes composing the cluster. The option is a
+ * java.lang.String type.
+ */
+ private List<Object> nodes;
+ /**
+ * The header that wil carry the result. The option is a
+ * java.lang.String type.
+ */
+ private String resultHeader;
+ /**
+ * Sets the Atomix transport. The option is a
+ * io.atomix.catalyst.transport.Transport type.
+ */
+ private Class<Object> transport;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * The cluster wide default resource configuration. The option is a
+ * java.util.Properties type.
+ */
+ private Properties defaultResourceConfig;
+ /**
+ * The local default resource options. The option is a
+ * java.util.Properties type.
+ */
+ private Properties defaultResourceOptions;
+ /**
+ * Sets if the local member should join groups as PersistentMember or
+ * not. If set to ephemeral the local member will receive an auto
+ * generated ID thus the local one is ignored. The option is a boolean
+ * type.
+ */
+ private boolean ephemeral;
+ /**
+ * The read consistency level. The option is a
+ * io.atomix.resource.ReadConsistency type.
+ */
+ private ReadConsistency readConsistency;
+ /**
+ * Cluster wide resources configuration. The option is a
+ * java.util.Map<java.lang.String,java.util.Properties> type.
+ */
+ private Map<String, Properties> resourceConfigs;
+ /**
+ * Local resources configurations. The option is a
+ * java.util.Map<java.lang.String,java.util.Properties> type.
+ */
+ private Map<String, Properties> resourceOptions;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ public Object getAtomix() {
+ return atomix;
+ }
+
+ public void setAtomix(Object atomix) {
+ this.atomix = atomix;
+ }
+
+ public Object getBroadcastType() {
+ return broadcastType;
+ }
+
+ public void setBroadcastType(Object broadcastType) {
+ this.broadcastType = broadcastType;
+ }
+
+ public String getChannelName() {
+ return channelName;
+ }
+
+ public void setChannelName(String channelName) {
+ this.channelName = channelName;
+ }
+
+ public String getConfigurationUri() {
+ return configurationUri;
+ }
+
+ public void setConfigurationUri(String configurationUri) {
+ this.configurationUri = configurationUri;
+ }
+
+ public Object getDefaultAction() {
+ return defaultAction;
+ }
+
+ public void setDefaultAction(Object defaultAction) {
+ this.defaultAction = defaultAction;
+ }
+
+ public String getMemberName() {
+ return memberName;
+ }
+
+ public void setMemberName(String memberName) {
+ this.memberName = memberName;
+ }
+
+ public List<Object> getNodes() {
+ return nodes;
+ }
+
+ public void setNodes(List<Object> nodes) {
+ this.nodes = nodes;
+ }
+
+ public String getResultHeader() {
+ return resultHeader;
+ }
+
+ public void setResultHeader(String resultHeader) {
+ this.resultHeader = resultHeader;
+ }
+
+ public Class<Object> getTransport() {
+ return transport;
+ }
+
+ public void setTransport(Class<Object> transport) {
+ this.transport = transport;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public Properties getDefaultResourceConfig() {
+ return defaultResourceConfig;
+ }
+
+ public void setDefaultResourceConfig(Properties defaultResourceConfig) {
+ this.defaultResourceConfig = defaultResourceConfig;
+ }
+
+ public Properties getDefaultResourceOptions() {
+ return defaultResourceOptions;
+ }
+
+ public void setDefaultResourceOptions(Properties defaultResourceOptions) {
+ this.defaultResourceOptions = defaultResourceOptions;
+ }
+
+ public boolean getEphemeral() {
+ return ephemeral;
+ }
+
+ public void setEphemeral(boolean ephemeral) {
+ this.ephemeral = ephemeral;
+ }
+
+ public ReadConsistency getReadConsistency() {
+ return readConsistency;
+ }
+
+ public void setReadConsistency(ReadConsistency readConsistency) {
+ this.readConsistency = readConsistency;
+ }
+
+ public Map<String, Properties> getResourceConfigs() {
+ return resourceConfigs;
+ }
+
+ public void setResourceConfigs(Map<String, Properties> resourceConfigs) {
+ this.resourceConfigs = resourceConfigs;
+ }
+
+ public Map<String, Properties> getResourceOptions() {
+ return resourceOptions;
+ }
+
+ public void setResourceOptions(Map<String, Properties> resourceOptions) {
+ this.resourceOptions = resourceOptions;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class AtomixMessagingConsumer extends AtomixMessagingCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class AtomixMessagingProducer extends AtomixMessagingCommon {
+ }
+
+ public static enum ReadConsistency {
+ ATOMIC, ATOMIC_LEASE, SEQUENTIAL, LOCAL;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixMultiMapEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixMultiMapEndpoint.java
new file mode 100644
index 0000000..8c9fc42
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixMultiMapEndpoint.java
@@ -0,0 +1,316 @@
+/*
+ * 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.model.endpoint;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * The atomix-multimap component is used to access Atomix's distributed multi
+ * map.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class AtomixMultiMapEndpoint {
+
+
+ public static class AtomixMultiMapCommon extends EndpointConfiguration {
+ /**
+ * The distributed resource name. The option is a java.lang.String type.
+ */
+ private String resourceName;
+ /**
+ * The Atomix instance to use. The option is a io.atomix.Atomix type.
+ */
+ private Object atomix;
+ /**
+ * The Atomix configuration uri. The option is a java.lang.String type.
+ */
+ private String configurationUri;
+ /**
+ * The default action. The option is a
+ * org.apache.camel.component.atomix.client.multimap.AtomixMultiMap.Action type.
+ */
+ private Object defaultAction;
+ /**
+ * The key to use if none is set in the header or to listen for events
+ * for a specific key. The option is a java.lang.Object type.
+ */
+ private Object key;
+ /**
+ * The address of the nodes composing the cluster. The option is a
+ * java.lang.String type.
+ */
+ private List<Object> nodes;
+ /**
+ * The header that wil carry the result. The option is a
+ * java.lang.String type.
+ */
+ private String resultHeader;
+ /**
+ * Sets the Atomix transport. The option is a
+ * io.atomix.catalyst.transport.Transport type.
+ */
+ private Class<Object> transport;
+ /**
+ * The resource ttl. The option is a long type.
+ */
+ private long ttl;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * The cluster wide default resource configuration. The option is a
+ * java.util.Properties type.
+ */
+ private Properties defaultResourceConfig;
+ /**
+ * The local default resource options. The option is a
+ * java.util.Properties type.
+ */
+ private Properties defaultResourceOptions;
+ /**
+ * Sets if the local member should join groups as PersistentMember or
+ * not. If set to ephemeral the local member will receive an auto
+ * generated ID thus the local one is ignored. The option is a boolean
+ * type.
+ */
+ private boolean ephemeral;
+ /**
+ * The read consistency level. The option is a
+ * io.atomix.resource.ReadConsistency type.
+ */
+ private ReadConsistency readConsistency;
+ /**
+ * Cluster wide resources configuration. The option is a
+ * java.util.Map<java.lang.String,java.util.Properties> type.
+ */
+ private Map<String, Properties> resourceConfigs;
+ /**
+ * Local resources configurations. The option is a
+ * java.util.Map<java.lang.String,java.util.Properties> type.
+ */
+ private Map<String, Properties> resourceOptions;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ public Object getAtomix() {
+ return atomix;
+ }
+
+ public void setAtomix(Object atomix) {
+ this.atomix = atomix;
+ }
+
+ public String getConfigurationUri() {
+ return configurationUri;
+ }
+
+ public void setConfigurationUri(String configurationUri) {
+ this.configurationUri = configurationUri;
+ }
+
+ public Object getDefaultAction() {
+ return defaultAction;
+ }
+
+ public void setDefaultAction(Object defaultAction) {
+ this.defaultAction = defaultAction;
+ }
+
+ public Object getKey() {
+ return key;
+ }
+
+ public void setKey(Object key) {
+ this.key = key;
+ }
+
+ public List<Object> getNodes() {
+ return nodes;
+ }
+
+ public void setNodes(List<Object> nodes) {
+ this.nodes = nodes;
+ }
+
+ public String getResultHeader() {
+ return resultHeader;
+ }
+
+ public void setResultHeader(String resultHeader) {
+ this.resultHeader = resultHeader;
+ }
+
+ public Class<Object> getTransport() {
+ return transport;
+ }
+
+ public void setTransport(Class<Object> transport) {
+ this.transport = transport;
+ }
+
+ public long getTtl() {
+ return ttl;
+ }
+
+ public void setTtl(long ttl) {
+ this.ttl = ttl;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public Properties getDefaultResourceConfig() {
+ return defaultResourceConfig;
+ }
+
+ public void setDefaultResourceConfig(Properties defaultResourceConfig) {
+ this.defaultResourceConfig = defaultResourceConfig;
+ }
+
+ public Properties getDefaultResourceOptions() {
+ return defaultResourceOptions;
+ }
+
+ public void setDefaultResourceOptions(Properties defaultResourceOptions) {
+ this.defaultResourceOptions = defaultResourceOptions;
+ }
+
+ public boolean getEphemeral() {
+ return ephemeral;
+ }
+
+ public void setEphemeral(boolean ephemeral) {
+ this.ephemeral = ephemeral;
+ }
+
+ public ReadConsistency getReadConsistency() {
+ return readConsistency;
+ }
+
+ public void setReadConsistency(ReadConsistency readConsistency) {
+ this.readConsistency = readConsistency;
+ }
+
+ public Map<String, Properties> getResourceConfigs() {
+ return resourceConfigs;
+ }
+
+ public void setResourceConfigs(Map<String, Properties> resourceConfigs) {
+ this.resourceConfigs = resourceConfigs;
+ }
+
+ public Map<String, Properties> getResourceOptions() {
+ return resourceOptions;
+ }
+
+ public void setResourceOptions(Map<String, Properties> resourceOptions) {
+ this.resourceOptions = resourceOptions;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class AtomixMultiMapConsumer extends AtomixMultiMapCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class AtomixMultiMapProducer extends AtomixMultiMapCommon {
+ }
+
+ public static enum ReadConsistency {
+ ATOMIC, ATOMIC_LEASE, SEQUENTIAL, LOCAL;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixQueueEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixQueueEndpoint.java
new file mode 100644
index 0000000..fc5dab7
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixQueueEndpoint.java
@@ -0,0 +1,291 @@
+/*
+ * 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.model.endpoint;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * The atomix-queue component is used to access Atomix's distributed queue.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class AtomixQueueEndpoint {
+
+
+ public static class AtomixQueueCommon extends EndpointConfiguration {
+ /**
+ * The distributed resource name. The option is a java.lang.String type.
+ */
+ private String resourceName;
+ /**
+ * The Atomix instance to use. The option is a io.atomix.Atomix type.
+ */
+ private Object atomix;
+ /**
+ * The Atomix configuration uri. The option is a java.lang.String type.
+ */
+ private String configurationUri;
+ /**
+ * The default action. The option is a
+ * org.apache.camel.component.atomix.client.queue.AtomixQueue.Action
+ * type.
+ */
+ private Object defaultAction;
+ /**
+ * The address of the nodes composing the cluster. The option is a
+ * java.lang.String type.
+ */
+ private List<Object> nodes;
+ /**
+ * The header that wil carry the result. The option is a
+ * java.lang.String type.
+ */
+ private String resultHeader;
+ /**
+ * Sets the Atomix transport. The option is a
+ * io.atomix.catalyst.transport.Transport type.
+ */
+ private Class<Object> transport;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * The cluster wide default resource configuration. The option is a
+ * java.util.Properties type.
+ */
+ private Properties defaultResourceConfig;
+ /**
+ * The local default resource options. The option is a
+ * java.util.Properties type.
+ */
+ private Properties defaultResourceOptions;
+ /**
+ * Sets if the local member should join groups as PersistentMember or
+ * not. If set to ephemeral the local member will receive an auto
+ * generated ID thus the local one is ignored. The option is a boolean
+ * type.
+ */
+ private boolean ephemeral;
+ /**
+ * The read consistency level. The option is a
+ * io.atomix.resource.ReadConsistency type.
+ */
+ private ReadConsistency readConsistency;
+ /**
+ * Cluster wide resources configuration. The option is a
+ * java.util.Map<java.lang.String,java.util.Properties> type.
+ */
+ private Map<String, Properties> resourceConfigs;
+ /**
+ * Local resources configurations. The option is a
+ * java.util.Map<java.lang.String,java.util.Properties> type.
+ */
+ private Map<String, Properties> resourceOptions;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ public Object getAtomix() {
+ return atomix;
+ }
+
+ public void setAtomix(Object atomix) {
+ this.atomix = atomix;
+ }
+
+ public String getConfigurationUri() {
+ return configurationUri;
+ }
+
+ public void setConfigurationUri(String configurationUri) {
+ this.configurationUri = configurationUri;
+ }
+
+ public Object getDefaultAction() {
+ return defaultAction;
+ }
+
+ public void setDefaultAction(Object defaultAction) {
+ this.defaultAction = defaultAction;
+ }
+
+ public List<Object> getNodes() {
+ return nodes;
+ }
+
+ public void setNodes(List<Object> nodes) {
+ this.nodes = nodes;
+ }
+
+ public String getResultHeader() {
+ return resultHeader;
+ }
+
+ public void setResultHeader(String resultHeader) {
+ this.resultHeader = resultHeader;
+ }
+
+ public Class<Object> getTransport() {
+ return transport;
+ }
+
+ public void setTransport(Class<Object> transport) {
+ this.transport = transport;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public Properties getDefaultResourceConfig() {
+ return defaultResourceConfig;
+ }
+
+ public void setDefaultResourceConfig(Properties defaultResourceConfig) {
+ this.defaultResourceConfig = defaultResourceConfig;
+ }
+
+ public Properties getDefaultResourceOptions() {
+ return defaultResourceOptions;
+ }
+
+ public void setDefaultResourceOptions(Properties defaultResourceOptions) {
+ this.defaultResourceOptions = defaultResourceOptions;
+ }
+
+ public boolean getEphemeral() {
+ return ephemeral;
+ }
+
+ public void setEphemeral(boolean ephemeral) {
+ this.ephemeral = ephemeral;
+ }
+
+ public ReadConsistency getReadConsistency() {
+ return readConsistency;
+ }
+
+ public void setReadConsistency(ReadConsistency readConsistency) {
+ this.readConsistency = readConsistency;
+ }
+
+ public Map<String, Properties> getResourceConfigs() {
+ return resourceConfigs;
+ }
+
+ public void setResourceConfigs(Map<String, Properties> resourceConfigs) {
+ this.resourceConfigs = resourceConfigs;
+ }
+
+ public Map<String, Properties> getResourceOptions() {
+ return resourceOptions;
+ }
+
+ public void setResourceOptions(Map<String, Properties> resourceOptions) {
+ this.resourceOptions = resourceOptions;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class AtomixQueueConsumer extends AtomixQueueCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class AtomixQueueProducer extends AtomixQueueCommon {
+ }
+
+ public static enum ReadConsistency {
+ ATOMIC, ATOMIC_LEASE, SEQUENTIAL, LOCAL;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixSetEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixSetEndpoint.java
new file mode 100644
index 0000000..5bc6f42
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixSetEndpoint.java
@@ -0,0 +1,302 @@
+/*
+ * 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.model.endpoint;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * The atomix-set component is used to access Atomix's distributed set.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class AtomixSetEndpoint {
+
+
+ public static class AtomixSetCommon extends EndpointConfiguration {
+ /**
+ * The distributed resource name. The option is a java.lang.String type.
+ */
+ private String resourceName;
+ /**
+ * The Atomix instance to use. The option is a io.atomix.Atomix type.
+ */
+ private Object atomix;
+ /**
+ * The Atomix configuration uri. The option is a java.lang.String type.
+ */
+ private String configurationUri;
+ /**
+ * The default action. The option is a
+ * org.apache.camel.component.atomix.client.set.AtomixSet.Action type.
+ */
+ private Object defaultAction;
+ /**
+ * The address of the nodes composing the cluster. The option is a
+ * java.lang.String type.
+ */
+ private List<Object> nodes;
+ /**
+ * The header that wil carry the result. The option is a
+ * java.lang.String type.
+ */
+ private String resultHeader;
+ /**
+ * Sets the Atomix transport. The option is a
+ * io.atomix.catalyst.transport.Transport type.
+ */
+ private Class<Object> transport;
+ /**
+ * The resource ttl. The option is a long type.
+ */
+ private long ttl;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * The cluster wide default resource configuration. The option is a
+ * java.util.Properties type.
+ */
+ private Properties defaultResourceConfig;
+ /**
+ * The local default resource options. The option is a
+ * java.util.Properties type.
+ */
+ private Properties defaultResourceOptions;
+ /**
+ * Sets if the local member should join groups as PersistentMember or
+ * not. If set to ephemeral the local member will receive an auto
+ * generated ID thus the local one is ignored. The option is a boolean
+ * type.
+ */
+ private boolean ephemeral;
+ /**
+ * The read consistency level. The option is a
+ * io.atomix.resource.ReadConsistency type.
+ */
+ private ReadConsistency readConsistency;
+ /**
+ * Cluster wide resources configuration. The option is a
+ * java.util.Map<java.lang.String,java.util.Properties> type.
+ */
+ private Map<String, Properties> resourceConfigs;
+ /**
+ * Local resources configurations. The option is a
+ * java.util.Map<java.lang.String,java.util.Properties> type.
+ */
+ private Map<String, Properties> resourceOptions;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ public Object getAtomix() {
+ return atomix;
+ }
+
+ public void setAtomix(Object atomix) {
+ this.atomix = atomix;
+ }
+
+ public String getConfigurationUri() {
+ return configurationUri;
+ }
+
+ public void setConfigurationUri(String configurationUri) {
+ this.configurationUri = configurationUri;
+ }
+
+ public Object getDefaultAction() {
+ return defaultAction;
+ }
+
+ public void setDefaultAction(Object defaultAction) {
+ this.defaultAction = defaultAction;
+ }
+
+ public List<Object> getNodes() {
+ return nodes;
+ }
+
+ public void setNodes(List<Object> nodes) {
+ this.nodes = nodes;
+ }
+
+ public String getResultHeader() {
+ return resultHeader;
+ }
+
+ public void setResultHeader(String resultHeader) {
+ this.resultHeader = resultHeader;
+ }
+
+ public Class<Object> getTransport() {
+ return transport;
+ }
+
+ public void setTransport(Class<Object> transport) {
+ this.transport = transport;
+ }
+
+ public long getTtl() {
+ return ttl;
+ }
+
+ public void setTtl(long ttl) {
+ this.ttl = ttl;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public Properties getDefaultResourceConfig() {
+ return defaultResourceConfig;
+ }
+
+ public void setDefaultResourceConfig(Properties defaultResourceConfig) {
+ this.defaultResourceConfig = defaultResourceConfig;
+ }
+
+ public Properties getDefaultResourceOptions() {
+ return defaultResourceOptions;
+ }
+
+ public void setDefaultResourceOptions(Properties defaultResourceOptions) {
+ this.defaultResourceOptions = defaultResourceOptions;
+ }
+
+ public boolean getEphemeral() {
+ return ephemeral;
+ }
+
+ public void setEphemeral(boolean ephemeral) {
+ this.ephemeral = ephemeral;
+ }
+
+ public ReadConsistency getReadConsistency() {
+ return readConsistency;
+ }
+
+ public void setReadConsistency(ReadConsistency readConsistency) {
+ this.readConsistency = readConsistency;
+ }
+
+ public Map<String, Properties> getResourceConfigs() {
+ return resourceConfigs;
+ }
+
+ public void setResourceConfigs(Map<String, Properties> resourceConfigs) {
+ this.resourceConfigs = resourceConfigs;
+ }
+
+ public Map<String, Properties> getResourceOptions() {
+ return resourceOptions;
+ }
+
+ public void setResourceOptions(Map<String, Properties> resourceOptions) {
+ this.resourceOptions = resourceOptions;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class AtomixSetConsumer extends AtomixSetCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class AtomixSetProducer extends AtomixSetCommon {
+ }
+
+ public static enum ReadConsistency {
+ ATOMIC, ATOMIC_LEASE, SEQUENTIAL, LOCAL;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixValueEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixValueEndpoint.java
new file mode 100644
index 0000000..310c94f
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AtomixValueEndpoint.java
@@ -0,0 +1,303 @@
+/*
+ * 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.model.endpoint;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * The atomix-value component is used to access Atomix's distributed value.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class AtomixValueEndpoint {
+
+
+ public static class AtomixValueCommon extends EndpointConfiguration {
+ /**
+ * The distributed resource name. The option is a java.lang.String type.
+ */
+ private String resourceName;
+ /**
+ * The Atomix instance to use. The option is a io.atomix.Atomix type.
+ */
+ private Object atomix;
+ /**
+ * The Atomix configuration uri. The option is a java.lang.String type.
+ */
+ private String configurationUri;
+ /**
+ * The default action. The option is a
+ * org.apache.camel.component.atomix.client.value.AtomixValue.Action
+ * type.
+ */
+ private Object defaultAction;
+ /**
+ * The address of the nodes composing the cluster. The option is a
+ * java.lang.String type.
+ */
+ private List<Object> nodes;
+ /**
+ * The header that wil carry the result. The option is a
+ * java.lang.String type.
+ */
+ private String resultHeader;
+ /**
+ * Sets the Atomix transport. The option is a
+ * io.atomix.catalyst.transport.Transport type.
+ */
+ private Class<Object> transport;
+ /**
+ * The resource ttl. The option is a long type.
+ */
+ private long ttl;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * The cluster wide default resource configuration. The option is a
+ * java.util.Properties type.
+ */
+ private Properties defaultResourceConfig;
+ /**
+ * The local default resource options. The option is a
+ * java.util.Properties type.
+ */
+ private Properties defaultResourceOptions;
+ /**
+ * Sets if the local member should join groups as PersistentMember or
+ * not. If set to ephemeral the local member will receive an auto
+ * generated ID thus the local one is ignored. The option is a boolean
+ * type.
+ */
+ private boolean ephemeral;
+ /**
+ * The read consistency level. The option is a
+ * io.atomix.resource.ReadConsistency type.
+ */
+ private ReadConsistency readConsistency;
+ /**
+ * Cluster wide resources configuration. The option is a
+ * java.util.Map<java.lang.String,java.util.Properties> type.
+ */
+ private Map<String, Properties> resourceConfigs;
+ /**
+ * Local resources configurations. The option is a
+ * java.util.Map<java.lang.String,java.util.Properties> type.
+ */
+ private Map<String, Properties> resourceOptions;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ public Object getAtomix() {
+ return atomix;
+ }
+
+ public void setAtomix(Object atomix) {
+ this.atomix = atomix;
+ }
+
+ public String getConfigurationUri() {
+ return configurationUri;
+ }
+
+ public void setConfigurationUri(String configurationUri) {
+ this.configurationUri = configurationUri;
+ }
+
+ public Object getDefaultAction() {
+ return defaultAction;
+ }
+
+ public void setDefaultAction(Object defaultAction) {
+ this.defaultAction = defaultAction;
+ }
+
+ public List<Object> getNodes() {
+ return nodes;
+ }
+
+ public void setNodes(List<Object> nodes) {
+ this.nodes = nodes;
+ }
+
+ public String getResultHeader() {
+ return resultHeader;
+ }
+
+ public void setResultHeader(String resultHeader) {
+ this.resultHeader = resultHeader;
+ }
+
+ public Class<Object> getTransport() {
+ return transport;
+ }
+
+ public void setTransport(Class<Object> transport) {
+ this.transport = transport;
+ }
+
+ public long getTtl() {
+ return ttl;
+ }
+
+ public void setTtl(long ttl) {
+ this.ttl = ttl;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public Properties getDefaultResourceConfig() {
+ return defaultResourceConfig;
+ }
+
+ public void setDefaultResourceConfig(Properties defaultResourceConfig) {
+ this.defaultResourceConfig = defaultResourceConfig;
+ }
+
+ public Properties getDefaultResourceOptions() {
+ return defaultResourceOptions;
+ }
+
+ public void setDefaultResourceOptions(Properties defaultResourceOptions) {
+ this.defaultResourceOptions = defaultResourceOptions;
+ }
+
+ public boolean getEphemeral() {
+ return ephemeral;
+ }
+
+ public void setEphemeral(boolean ephemeral) {
+ this.ephemeral = ephemeral;
+ }
+
+ public ReadConsistency getReadConsistency() {
+ return readConsistency;
+ }
+
+ public void setReadConsistency(ReadConsistency readConsistency) {
+ this.readConsistency = readConsistency;
+ }
+
+ public Map<String, Properties> getResourceConfigs() {
+ return resourceConfigs;
+ }
+
+ public void setResourceConfigs(Map<String, Properties> resourceConfigs) {
+ this.resourceConfigs = resourceConfigs;
+ }
+
+ public Map<String, Properties> getResourceOptions() {
+ return resourceOptions;
+ }
+
+ public void setResourceOptions(Map<String, Properties> resourceOptions) {
+ this.resourceOptions = resourceOptions;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class AtomixValueConsumer extends AtomixValueCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class AtomixValueProducer extends AtomixValueCommon {
+ }
+
+ public static enum ReadConsistency {
+ ATOMIC, ATOMIC_LEASE, SEQUENTIAL, LOCAL;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AvroEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AvroEndpoint.java
new file mode 100644
index 0000000..cb6506a
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/AvroEndpoint.java
@@ -0,0 +1,247 @@
+/*
+ * 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.model.endpoint;
+
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * Working with Apache Avro for data serialization.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class AvroEndpoint {
+
+
+ public static class AvroCommon extends EndpointConfiguration {
+ /**
+ * Transport to use, can be either http or netty. The option is a
+ * org.apache.camel.component.avro.AvroTransport type.
+ */
+ private AvroTransport transport;
+ /**
+ * Port number to use. The option is a int type.
+ */
+ private int port;
+ /**
+ * Hostname to use. The option is a java.lang.String type.
+ */
+ private String host;
+ /**
+ * The name of the message to send. The option is a java.lang.String
+ * type.
+ */
+ private String messageName;
+ /**
+ * Avro protocol to use. The option is a org.apache.avro.Protocol type.
+ */
+ private Object protocol;
+ /**
+ * Avro protocol to use defined by the FQN class name. The option is a
+ * java.lang.String type.
+ */
+ private String protocolClassName;
+ /**
+ * Avro protocol location. The option is a java.lang.String type.
+ */
+ private String protocolLocation;
+ /**
+ * If protocol object provided is reflection protocol. Should be used
+ * only with protocol parameter because for protocolClassName protocol
+ * type will be auto detected. The option is a boolean type.
+ */
+ private boolean reflectionProtocol;
+ /**
+ * If true, consumer parameter won't be wrapped into array. Will fail if
+ * protocol specifies more then 1 parameter for the message. The option
+ * is a boolean type.
+ */
+ private boolean singleParameter;
+ /**
+ * Authority to use (username and password). The option is a
+ * java.lang.String type.
+ */
+ private String uriAuthority;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public AvroTransport getTransport() {
+ return transport;
+ }
+
+ public void setTransport(AvroTransport transport) {
+ this.transport = transport;
+ }
+
+ public int getPort() {
+ return port;
+ }
+
+ public void setPort(int port) {
+ this.port = port;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public String getMessageName() {
+ return messageName;
+ }
+
+ public void setMessageName(String messageName) {
+ this.messageName = messageName;
+ }
+
+ public Object getProtocol() {
+ return protocol;
+ }
+
+ public void setProtocol(Object protocol) {
+ this.protocol = protocol;
+ }
+
+ public String getProtocolClassName() {
+ return protocolClassName;
+ }
+
+ public void setProtocolClassName(String protocolClassName) {
+ this.protocolClassName = protocolClassName;
+ }
+
+ public String getProtocolLocation() {
+ return protocolLocation;
+ }
+
+ public void setProtocolLocation(String protocolLocation) {
+ this.protocolLocation = protocolLocation;
+ }
+
+ public boolean getReflectionProtocol() {
+ return reflectionProtocol;
+ }
+
+ public void setReflectionProtocol(boolean reflectionProtocol) {
+ this.reflectionProtocol = reflectionProtocol;
+ }
+
+ public boolean getSingleParameter() {
+ return singleParameter;
+ }
+
+ public void setSingleParameter(boolean singleParameter) {
+ this.singleParameter = singleParameter;
+ }
+
+ public String getUriAuthority() {
+ return uriAuthority;
+ }
+
+ public void setUriAuthority(String uriAuthority) {
+ this.uriAuthority = uriAuthority;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class AvroConsumer extends AvroCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class AvroProducer extends AvroCommon {
+ }
+
+ public static enum AvroTransport {
+ http, netty;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BeanEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BeanEndpoint.java
new file mode 100644
index 0000000..deaf2a1
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BeanEndpoint.java
@@ -0,0 +1,120 @@
+/*
+ * 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.model.endpoint;
+
+import java.util.Map;
+import javax.annotation.Generated;
+
+/**
+ * The bean component is for invoking Java beans from Camel.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class BeanEndpoint {
+
+
+ public static class BeanCommon extends EndpointConfiguration {
+ /**
+ * Sets the name of the bean to invoke. The option is a java.lang.String
+ * type.
+ */
+ private String beanName;
+ /**
+ * Sets the name of the method to invoke on the bean. The option is a
+ * java.lang.String type.
+ */
+ private String method;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * If enabled, Camel will cache the result of the first Registry
+ * look-up. Cache can be enabled if the bean in the Registry is defined
+ * as a singleton scope. The option is a java.lang.Boolean type.
+ */
+ private Boolean cache;
+ /**
+ * Used for configuring additional properties on the bean. The option is
+ * a java.util.Map<java.lang.String,java.lang.Object> type.
+ */
+ private Map<String, Object> parameters;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getBeanName() {
+ return beanName;
+ }
+
+ public void setBeanName(String beanName) {
+ this.beanName = beanName;
+ }
+
+ public String getMethod() {
+ return method;
+ }
+
+ public void setMethod(String method) {
+ this.method = method;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public Boolean getCache() {
+ return cache;
+ }
+
+ public void setCache(Boolean cache) {
+ this.cache = cache;
+ }
+
+ public Map<String, Object> getParameters() {
+ return parameters;
+ }
+
+ public void setParameters(Map<String, Object> parameters) {
+ this.parameters = parameters;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class BeanConsumer extends BeanCommon {
+ }
+
+ public static class BeanProducer extends BeanCommon {
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BeanValidatorEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BeanValidatorEndpoint.java
new file mode 100644
index 0000000..6bb4230
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BeanValidatorEndpoint.java
@@ -0,0 +1,147 @@
+/*
+ * 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.model.endpoint;
+
+import javax.annotation.Generated;
+
+/**
+ * The Validator component performs bean validation of the message body using
+ * the Java Bean Validation API.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class BeanValidatorEndpoint {
+
+
+ public static class BeanValidatorCommon extends EndpointConfiguration {
+ /**
+ * Where label is an arbitrary text value describing the endpoint. The
+ * option is a java.lang.String type.
+ */
+ private String label;
+ /**
+ * To use a custom ConstraintValidatorFactory. The option is a
+ * javax.validation.ConstraintValidatorFactory type.
+ */
+ private Object constraintValidatorFactory;
+ /**
+ * To use a custom validation group. The option is a java.lang.String
+ * type.
+ */
+ private String group;
+ /**
+ * To use a custom MessageInterpolator. The option is a
+ * javax.validation.MessageInterpolator type.
+ */
+ private Object messageInterpolator;
+ /**
+ * To use a custom TraversableResolver. The option is a
+ * javax.validation.TraversableResolver type.
+ */
+ private Object traversableResolver;
+ /**
+ * To use a a custom ValidationProviderResolver. The option is a
+ * javax.validation.ValidationProviderResolver type.
+ */
+ private Object validationProviderResolver;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public Object getConstraintValidatorFactory() {
+ return constraintValidatorFactory;
+ }
+
+ public void setConstraintValidatorFactory(
+ Object constraintValidatorFactory) {
+ this.constraintValidatorFactory = constraintValidatorFactory;
+ }
+
+ public String getGroup() {
+ return group;
+ }
+
+ public void setGroup(String group) {
+ this.group = group;
+ }
+
+ public Object getMessageInterpolator() {
+ return messageInterpolator;
+ }
+
+ public void setMessageInterpolator(Object messageInterpolator) {
+ this.messageInterpolator = messageInterpolator;
+ }
+
+ public Object getTraversableResolver() {
+ return traversableResolver;
+ }
+
+ public void setTraversableResolver(Object traversableResolver) {
+ this.traversableResolver = traversableResolver;
+ }
+
+ public Object getValidationProviderResolver() {
+ return validationProviderResolver;
+ }
+
+ public void setValidationProviderResolver(
+ Object validationProviderResolver) {
+ this.validationProviderResolver = validationProviderResolver;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class BeanValidatorConsumer extends BeanValidatorCommon {
+ }
+
+ public static class BeanValidatorProducer extends BeanValidatorCommon {
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BeanstalkEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BeanstalkEndpoint.java
new file mode 100644
index 0000000..66debe0
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BeanstalkEndpoint.java
@@ -0,0 +1,450 @@
+/*
+ * 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.model.endpoint;
+
+import java.util.Map;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.LoggingLevel;
+import org.apache.camel.spi.ExceptionHandler;
+import org.apache.camel.spi.PollingConsumerPollStrategy;
+import org.apache.camel.spi.ScheduledPollConsumerScheduler;
+
+/**
+ * The beanstalk component is used for job retrieval and post-processing of
+ * Beanstalk jobs.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class BeanstalkEndpoint {
+
+
+ public static class BeanstalkCommon extends EndpointConfiguration {
+ /**
+ * Connection settings host:port/tube. The option is a java.lang.String
+ * type.
+ */
+ private String connectionSettings;
+ /**
+ * put means to put the job into Beanstalk. Job body is specified in the
+ * Camel message body. Job ID will be returned in beanstalk.jobId
+ * message header. delete, release, touch or bury expect Job ID in the
+ * message header beanstalk.jobId. Result of the operation is returned
+ * in beanstalk.result message header kick expects the number of jobs to
+ * kick in the message body and returns the number of jobs actually
+ * kicked out in the message header beanstalk.result. The option is a
+ * org.apache.camel.component.beanstalk.BeanstalkCommand type.
+ */
+ private BeanstalkCommand command;
+ /**
+ * Job delay in seconds. The option is a int type.
+ */
+ private int jobDelay;
+ /**
+ * Job priority. (0 is the highest, see Beanstalk protocol). The option
+ * is a long type.
+ */
+ private long jobPriority;
+ /**
+ * Job time to run in seconds. (when 0, the beanstalkd daemon raises it
+ * to 1 automatically, see Beanstalk protocol). The option is a int
+ * type.
+ */
+ private int jobTimeToRun;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getConnectionSettings() {
+ return connectionSettings;
+ }
+
+ public void setConnectionSettings(String connectionSettings) {
+ this.connectionSettings = connectionSettings;
+ }
+
+ public BeanstalkCommand getCommand() {
+ return command;
+ }
+
+ public void setCommand(BeanstalkCommand command) {
+ this.command = command;
+ }
+
+ public int getJobDelay() {
+ return jobDelay;
+ }
+
+ public void setJobDelay(int jobDelay) {
+ this.jobDelay = jobDelay;
+ }
+
+ public long getJobPriority() {
+ return jobPriority;
+ }
+
+ public void setJobPriority(long jobPriority) {
+ this.jobPriority = jobPriority;
+ }
+
+ public int getJobTimeToRun() {
+ return jobTimeToRun;
+ }
+
+ public void setJobTimeToRun(int jobTimeToRun) {
+ this.jobTimeToRun = jobTimeToRun;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class BeanstalkConsumer extends BeanstalkCommon {
+ /**
+ * Whether to wait for job to complete before ack the job from
+ * beanstalk. The option is a boolean type.
+ */
+ private boolean awaitJob;
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * Command to use when processing failed. The option is a
+ * org.apache.camel.component.beanstalk.BeanstalkCommand type.
+ */
+ private BeanstalkCommand onFailure;
+ /**
+ * If the polling consumer did not poll any files, you can enable this
+ * option to send an empty message (no body) instead. The option is a
+ * boolean type.
+ */
+ private boolean sendEmptyMessageWhenIdle;
+ /**
+ * Whether to use blockIO. The option is a boolean type.
+ */
+ private boolean useBlockIO;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+ /**
+ * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing
+ * you to provide your custom implementation to control error handling
+ * usually occurred during the poll operation before an Exchange have
+ * been created and being routed in Camel. The option is a
+ * org.apache.camel.spi.PollingConsumerPollStrategy type.
+ */
+ private PollingConsumerPollStrategy pollStrategy;
+ /**
+ * The number of subsequent error polls (failed due some error) that
+ * should happen before the backoffMultipler should kick-in. The option
+ * is a int type.
+ */
+ private int backoffErrorThreshold;
+ /**
+ * The number of subsequent idle polls that should happen before the
+ * backoffMultipler should kick-in. The option is a int type.
+ */
+ private int backoffIdleThreshold;
+ /**
+ * To let the scheduled polling consumer backoff if there has been a
+ * number of subsequent idles/errors in a row. The multiplier is then
+ * the number of polls that will be skipped before the next actual
+ * attempt is happening again. When this option is in use then
+ * backoffIdleThreshold and/or backoffErrorThreshold must also be
+ * configured. The option is a int type.
+ */
+ private int backoffMultiplier;
+ /**
+ * Milliseconds before the next poll. You can also specify time values
+ * using units, such as 60s (60 seconds), 5m30s (5 minutes and 30
+ * seconds), and 1h (1 hour). The option is a long type.
+ */
+ private long delay;
+ /**
+ * If greedy is enabled, then the ScheduledPollConsumer will run
+ * immediately again, if the previous run polled 1 or more messages. The
+ * option is a boolean type.
+ */
+ private boolean greedy;
+ /**
+ * Milliseconds before the first poll starts. You can also specify time
+ * values using units, such as 60s (60 seconds), 5m30s (5 minutes and 30
+ * seconds), and 1h (1 hour). The option is a long type.
+ */
+ private long initialDelay;
+ /**
+ * The consumer logs a start/complete log line when it polls. This
+ * option allows you to configure the logging level for that. The option
+ * is a org.apache.camel.LoggingLevel type.
+ */
+ private LoggingLevel runLoggingLevel;
+ /**
+ * Allows for configuring a custom/shared thread pool to use for the
+ * consumer. By default each consumer has its own single threaded thread
+ * pool. The option is a java.util.concurrent.ScheduledExecutorService
+ * type.
+ */
+ private ScheduledExecutorService scheduledExecutorService;
+ /**
+ * To use a cron scheduler from either camel-spring or camel-quartz2
+ * component. The option is a
+ * org.apache.camel.spi.ScheduledPollConsumerScheduler type.
+ */
+ private ScheduledPollConsumerScheduler scheduler;
+ /**
+ * To configure additional properties when using a custom scheduler or
+ * any of the Quartz2, Spring based scheduler. The option is a
+ * java.util.Map<java.lang.String,java.lang.Object> type.
+ */
+ private Map<String, Object> schedulerProperties;
+ /**
+ * Whether the scheduler should be auto started. The option is a boolean
+ * type.
+ */
+ private boolean startScheduler;
+ /**
+ * Time unit for initialDelay and delay options. The option is a
+ * java.util.concurrent.TimeUnit type.
+ */
+ private TimeUnit timeUnit;
+ /**
+ * Controls if fixed delay or fixed rate is used. See
+ * ScheduledExecutorService in JDK for details. The option is a boolean
+ * type.
+ */
+ private boolean useFixedDelay;
+
+ public boolean getAwaitJob() {
+ return awaitJob;
+ }
+
+ public void setAwaitJob(boolean awaitJob) {
+ this.awaitJob = awaitJob;
+ }
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public BeanstalkCommand getOnFailure() {
+ return onFailure;
+ }
+
+ public void setOnFailure(BeanstalkCommand onFailure) {
+ this.onFailure = onFailure;
+ }
+
+ public boolean getSendEmptyMessageWhenIdle() {
+ return sendEmptyMessageWhenIdle;
+ }
+
+ public void setSendEmptyMessageWhenIdle(boolean sendEmptyMessageWhenIdle) {
+ this.sendEmptyMessageWhenIdle = sendEmptyMessageWhenIdle;
+ }
+
+ public boolean getUseBlockIO() {
+ return useBlockIO;
+ }
+
+ public void setUseBlockIO(boolean useBlockIO) {
+ this.useBlockIO = useBlockIO;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+
+ public PollingConsumerPollStrategy getPollStrategy() {
+ return pollStrategy;
+ }
+
+ public void setPollStrategy(PollingConsumerPollStrategy pollStrategy) {
+ this.pollStrategy = pollStrategy;
+ }
+
+ public int getBackoffErrorThreshold() {
+ return backoffErrorThreshold;
+ }
+
+ public void setBackoffErrorThreshold(int backoffErrorThreshold) {
+ this.backoffErrorThreshold = backoffErrorThreshold;
+ }
+
+ public int getBackoffIdleThreshold() {
+ return backoffIdleThreshold;
+ }
+
+ public void setBackoffIdleThreshold(int backoffIdleThreshold) {
+ this.backoffIdleThreshold = backoffIdleThreshold;
+ }
+
+ public int getBackoffMultiplier() {
+ return backoffMultiplier;
+ }
+
+ public void setBackoffMultiplier(int backoffMultiplier) {
+ this.backoffMultiplier = backoffMultiplier;
+ }
+
+ public long getDelay() {
+ return delay;
+ }
+
+ public void setDelay(long delay) {
+ this.delay = delay;
+ }
+
+ public boolean getGreedy() {
+ return greedy;
+ }
+
+ public void setGreedy(boolean greedy) {
+ this.greedy = greedy;
+ }
+
+ public long getInitialDelay() {
+ return initialDelay;
+ }
+
+ public void setInitialDelay(long initialDelay) {
+ this.initialDelay = initialDelay;
+ }
+
+ public LoggingLevel getRunLoggingLevel() {
+ return runLoggingLevel;
+ }
+
+ public void setRunLoggingLevel(LoggingLevel runLoggingLevel) {
+ this.runLoggingLevel = runLoggingLevel;
+ }
+
+ public ScheduledExecutorService getScheduledExecutorService() {
+ return scheduledExecutorService;
+ }
+
+ public void setScheduledExecutorService(
+ ScheduledExecutorService scheduledExecutorService) {
+ this.scheduledExecutorService = scheduledExecutorService;
+ }
+
+ public ScheduledPollConsumerScheduler getScheduler() {
+ return scheduler;
+ }
+
+ public void setScheduler(ScheduledPollConsumerScheduler scheduler) {
+ this.scheduler = scheduler;
+ }
+
+ public Map<String, Object> getSchedulerProperties() {
+ return schedulerProperties;
+ }
+
+ public void setSchedulerProperties(
+ Map<String, Object> schedulerProperties) {
+ this.schedulerProperties = schedulerProperties;
+ }
+
+ public boolean getStartScheduler() {
+ return startScheduler;
+ }
+
+ public void setStartScheduler(boolean startScheduler) {
+ this.startScheduler = startScheduler;
+ }
+
+ public TimeUnit getTimeUnit() {
+ return timeUnit;
+ }
+
+ public void setTimeUnit(TimeUnit timeUnit) {
+ this.timeUnit = timeUnit;
+ }
+
+ public boolean getUseFixedDelay() {
+ return useFixedDelay;
+ }
+
+ public void setUseFixedDelay(boolean useFixedDelay) {
+ this.useFixedDelay = useFixedDelay;
+ }
+ }
+
+ public static class BeanstalkProducer extends BeanstalkCommon {
+ }
+
+ public static enum BeanstalkCommand {
+ bury, release, put, touch, delete, kick;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BlobServiceEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BlobServiceEndpoint.java
new file mode 100644
index 0000000..20fccff
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BlobServiceEndpoint.java
@@ -0,0 +1,333 @@
+/*
+ * 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.model.endpoint;
+
+import java.util.Map;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * The azure-blob component is used for storing and retrieving blobs from Azure
+ * Storage Blob Service.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class BlobServiceEndpoint {
+
+
+ public static class BlobServiceCommon extends EndpointConfiguration {
+ /**
+ * Container or Blob compact Uri. The option is a java.lang.String type.
+ */
+ private String containerOrBlobUri;
+ /**
+ * The blob service client. The option is a
+ * com.microsoft.azure.storage.blob.CloudBlob type.
+ */
+ private Object azureBlobClient;
+ /**
+ * Set the blob offset for the upload or download operations, default is
+ * 0. The option is a java.lang.Long type.
+ */
+ private Long blobOffset;
+ /**
+ * Set a blob type, 'blockblob' is default. The option is a
+ * org.apache.camel.component.azure.blob.BlobType type.
+ */
+ private BlobType blobType;
+ /**
+ * Close the stream after read or keep it open, default is true. The
+ * option is a boolean type.
+ */
+ private boolean closeStreamAfterRead;
+ /**
+ * Set the storage credentials, required in most cases. The option is a
+ * com.microsoft.azure.storage.StorageCredentials type.
+ */
+ private Object credentials;
+ /**
+ * Set the data length for the download or page blob upload operations.
+ * The option is a java.lang.Long type.
+ */
+ private Long dataLength;
+ /**
+ * Set the file directory where the downloaded blobs will be saved to.
+ * The option is a java.lang.String type.
+ */
+ private String fileDir;
+ /**
+ * Storage resources can be public for reading their content, if this
+ * property is enabled then the credentials do not have to be set. The
+ * option is a boolean type.
+ */
+ private boolean publicForRead;
+ /**
+ * Set the minimum read size in bytes when reading the blob content. The
+ * option is a int type.
+ */
+ private int streamReadSize;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getContainerOrBlobUri() {
+ return containerOrBlobUri;
+ }
+
+ public void setContainerOrBlobUri(String containerOrBlobUri) {
+ this.containerOrBlobUri = containerOrBlobUri;
+ }
+
+ public Object getAzureBlobClient() {
+ return azureBlobClient;
+ }
+
+ public void setAzureBlobClient(Object azureBlobClient) {
+ this.azureBlobClient = azureBlobClient;
+ }
+
+ public Long getBlobOffset() {
+ return blobOffset;
+ }
+
+ public void setBlobOffset(Long blobOffset) {
+ this.blobOffset = blobOffset;
+ }
+
+ public BlobType getBlobType() {
+ return blobType;
+ }
+
+ public void setBlobType(BlobType blobType) {
+ this.blobType = blobType;
+ }
+
+ public boolean getCloseStreamAfterRead() {
+ return closeStreamAfterRead;
+ }
+
+ public void setCloseStreamAfterRead(boolean closeStreamAfterRead) {
+ this.closeStreamAfterRead = closeStreamAfterRead;
+ }
+
+ public Object getCredentials() {
+ return credentials;
+ }
+
+ public void setCredentials(Object credentials) {
+ this.credentials = credentials;
+ }
+
+ public Long getDataLength() {
+ return dataLength;
+ }
+
+ public void setDataLength(Long dataLength) {
+ this.dataLength = dataLength;
+ }
+
+ public String getFileDir() {
+ return fileDir;
+ }
+
+ public void setFileDir(String fileDir) {
+ this.fileDir = fileDir;
+ }
+
+ public boolean getPublicForRead() {
+ return publicForRead;
+ }
+
+ public void setPublicForRead(boolean publicForRead) {
+ this.publicForRead = publicForRead;
+ }
+
+ public int getStreamReadSize() {
+ return streamReadSize;
+ }
+
+ public void setStreamReadSize(int streamReadSize) {
+ this.streamReadSize = streamReadSize;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class BlobServiceConsumer extends BlobServiceCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class BlobServiceProducer extends BlobServiceCommon {
+ /**
+ * Set the blob meta-data. The option is a
+ * java.util.Map<java.lang.String,java.lang.String> type.
+ */
+ private Map<String, String> blobMetadata;
+ /**
+ * Set a prefix which can be used for listing the blobs. The option is a
+ * java.lang.String type.
+ */
+ private String blobPrefix;
+ /**
+ * Close the stream after write or keep it open, default is true. The
+ * option is a boolean type.
+ */
+ private boolean closeStreamAfterWrite;
+ /**
+ * Blob service operation hint to the producer. The option is a
+ * org.apache.camel.component.azure.blob.BlobServiceOperations type.
+ */
+ private BlobServiceOperations operation;
+ /**
+ * Set the size of the buffer for writing block and page blocks. The
+ * option is a int type.
+ */
+ private int streamWriteSize;
+ /**
+ * Specify if the flat or hierarchical blob listing should be used. The
+ * option is a boolean type.
+ */
+ private boolean useFlatListing;
+
+ public Map<String, String> getBlobMetadata() {
+ return blobMetadata;
+ }
+
+ public void setBlobMetadata(Map<String, String> blobMetadata) {
+ this.blobMetadata = blobMetadata;
+ }
+
+ public String getBlobPrefix() {
+ return blobPrefix;
+ }
+
+ public void setBlobPrefix(String blobPrefix) {
+ this.blobPrefix = blobPrefix;
+ }
+
+ public boolean getCloseStreamAfterWrite() {
+ return closeStreamAfterWrite;
+ }
+
+ public void setCloseStreamAfterWrite(boolean closeStreamAfterWrite) {
+ this.closeStreamAfterWrite = closeStreamAfterWrite;
+ }
+
+ public BlobServiceOperations getOperation() {
+ return operation;
+ }
+
+ public void setOperation(BlobServiceOperations operation) {
+ this.operation = operation;
+ }
+
+ public int getStreamWriteSize() {
+ return streamWriteSize;
+ }
+
+ public void setStreamWriteSize(int streamWriteSize) {
+ this.streamWriteSize = streamWriteSize;
+ }
+
+ public boolean getUseFlatListing() {
+ return useFlatListing;
+ }
+
+ public void setUseFlatListing(boolean useFlatListing) {
+ this.useFlatListing = useFlatListing;
+ }
+ }
+
+ public static enum BlobType {
+ blockblob, appendblob, pageblob;
+ }
+
+ public static enum BlobServiceOperations {
+ getBlob, deleteBlob, listBlobs, updateBlockBlob, uploadBlobBlocks, commitBlobBlockList, getBlobBlockList, createAppendBlob, updateAppendBlob, createPageBlob, updatePageBlob, resizePageBlob, clearPageBlob, getPageBlobRanges;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BonitaEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BonitaEndpoint.java
new file mode 100644
index 0000000..3fd21e3
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BonitaEndpoint.java
@@ -0,0 +1,197 @@
+/*
+ * 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.model.endpoint;
+
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * Used for communicating with a remote Bonita BPM process engine.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class BonitaEndpoint {
+
+
+ public static class BonitaCommon extends EndpointConfiguration {
+ /**
+ * Operation to use. The option is a
+ * org.apache.camel.component.bonita.util.BonitaOperation type.
+ */
+ private BonitaOperation operation;
+ /**
+ * Hostname where Bonita engine runs. The option is a java.lang.String
+ * type.
+ */
+ private String hostname;
+ /**
+ * Port of the server hosting Bonita engine. The option is a
+ * java.lang.String type.
+ */
+ private String port;
+ /**
+ * Name of the process involved in the operation. The option is a
+ * java.lang.String type.
+ */
+ private String processName;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+ /**
+ * Password to authenticate to Bonita engine. The option is a
+ * java.lang.String type.
+ */
+ private String password;
+ /**
+ * Username to authenticate to Bonita engine. The option is a
+ * java.lang.String type.
+ */
+ private String username;
+
+ public BonitaOperation getOperation() {
+ return operation;
+ }
+
+ public void setOperation(BonitaOperation operation) {
+ this.operation = operation;
+ }
+
+ public String getHostname() {
+ return hostname;
+ }
+
+ public void setHostname(String hostname) {
+ this.hostname = hostname;
+ }
+
+ public String getPort() {
+ return port;
+ }
+
+ public void setPort(String port) {
+ this.port = port;
+ }
+
+ public String getProcessName() {
+ return processName;
+ }
+
+ public void setProcessName(String processName) {
+ this.processName = processName;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+ }
+
+ public static class BonitaConsumer extends BonitaCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class BonitaProducer extends BonitaCommon {
+ }
+
+ public static enum BonitaOperation {
+ startCase;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BoxEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BoxEndpoint.java
new file mode 100644
index 0000000..082316a
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BoxEndpoint.java
@@ -0,0 +1,361 @@
+/*
+ * 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.model.endpoint;
+
+import java.util.Map;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * For uploading downloading and managing files folders groups collaborations
+ * etc on box DOT com.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class BoxEndpoint {
+
+
+ public static class BoxCommon extends EndpointConfiguration {
+ /**
+ * What kind of operation to perform. The option is a
+ * org.apache.camel.component.box.internal.BoxApiName type.
+ */
+ private BoxApiName apiName;
+ /**
+ * What sub operation to use for the selected operation. The option is a
+ * java.lang.String type.
+ */
+ private String methodName;
+ /**
+ * Box application client ID. The option is a java.lang.String type.
+ */
+ private String clientId;
+ /**
+ * The enterprise ID to use for an App Enterprise. The option is a
+ * java.lang.String type.
+ */
+ private String enterpriseId;
+ /**
+ * Sets the name of a parameter to be passed in the exchange In Body.
+ * The option is a java.lang.String type.
+ */
+ private String inBody;
+ /**
+ * The user ID to use for an App User. The option is a java.lang.String
+ * type.
+ */
+ private String userId;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Custom HTTP params for settings like proxy host. The option is a
+ * java.util.Map<java.lang.String,java.lang.Object> type.
+ */
+ private Map<String, Object> httpParams;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+ /**
+ * Custom Access Token Cache for storing and retrieving access tokens.
+ * The option is a com.box.sdk.IAccessTokenCache type.
+ */
+ private Object accessTokenCache;
+ /**
+ * Box application client secret. The option is a java.lang.String type.
+ */
+ private String clientSecret;
+ /**
+ * The type of encryption algorithm for JWT. Supported Algorithms:
+ * RSA_SHA_256 RSA_SHA_384 RSA_SHA_512. The option is a
+ * com.box.sdk.EncryptionAlgorithm type.
+ */
+ private EncryptionAlgorithm encryptionAlgorithm;
+ /**
+ * The maximum number of access tokens in cache. The option is a int
+ * type.
+ */
+ private int maxCacheEntries;
+ /**
+ * The type of authentication for connection. Types of Authentication:
+ * STANDARD_AUTHENTICATION - OAuth 2.0 (3-legged) SERVER_AUTHENTICATION
+ * - OAuth 2.0 with JSON Web Tokens. The option is a java.lang.String
+ * type.
+ */
+ private String authenticationType;
+ /**
+ * The private key for generating the JWT signature. The option is a
+ * java.lang.String type.
+ */
+ private String privateKeyFile;
+ /**
+ * The password for the private key. The option is a java.lang.String
+ * type.
+ */
+ private String privateKeyPassword;
+ /**
+ * The ID for public key for validating the JWT signature. The option is
+ * a java.lang.String type.
+ */
+ private String publicKeyId;
+ /**
+ * To configure security using SSLContextParameters. The option is a
+ * org.apache.camel.support.jsse.SSLContextParameters type.
+ */
+ private Object sslContextParameters;
+ /**
+ * Box user name, MUST be provided. The option is a java.lang.String
+ * type.
+ */
+ private String userName;
+ /**
+ * Box user password, MUST be provided if authSecureStorage is not set,
+ * or returns null on first call. The option is a java.lang.String type.
+ */
+ private String userPassword;
+
+ public BoxApiName getApiName() {
+ return apiName;
+ }
+
+ public void setApiName(BoxApiName apiName) {
+ this.apiName = apiName;
+ }
+
+ public String getMethodName() {
+ return methodName;
+ }
+
+ public void setMethodName(String methodName) {
+ this.methodName = methodName;
+ }
+
+ public String getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(String clientId) {
+ this.clientId = clientId;
+ }
+
+ public String getEnterpriseId() {
+ return enterpriseId;
+ }
+
+ public void setEnterpriseId(String enterpriseId) {
+ this.enterpriseId = enterpriseId;
+ }
+
+ public String getInBody() {
+ return inBody;
+ }
+
+ public void setInBody(String inBody) {
+ this.inBody = inBody;
+ }
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public Map<String, Object> getHttpParams() {
+ return httpParams;
+ }
+
+ public void setHttpParams(Map<String, Object> httpParams) {
+ this.httpParams = httpParams;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+
+ public Object getAccessTokenCache() {
+ return accessTokenCache;
+ }
+
+ public void setAccessTokenCache(Object accessTokenCache) {
+ this.accessTokenCache = accessTokenCache;
+ }
+
+ public String getClientSecret() {
+ return clientSecret;
+ }
+
+ public void setClientSecret(String clientSecret) {
+ this.clientSecret = clientSecret;
+ }
+
+ public EncryptionAlgorithm getEncryptionAlgorithm() {
+ return encryptionAlgorithm;
+ }
+
+ public void setEncryptionAlgorithm(
+ EncryptionAlgorithm encryptionAlgorithm) {
+ this.encryptionAlgorithm = encryptionAlgorithm;
+ }
+
+ public int getMaxCacheEntries() {
+ return maxCacheEntries;
+ }
+
+ public void setMaxCacheEntries(int maxCacheEntries) {
+ this.maxCacheEntries = maxCacheEntries;
+ }
+
+ public String getAuthenticationType() {
+ return authenticationType;
+ }
+
+ public void setAuthenticationType(String authenticationType) {
+ this.authenticationType = authenticationType;
+ }
+
+ public String getPrivateKeyFile() {
+ return privateKeyFile;
+ }
+
+ public void setPrivateKeyFile(String privateKeyFile) {
+ this.privateKeyFile = privateKeyFile;
+ }
+
+ public String getPrivateKeyPassword() {
+ return privateKeyPassword;
+ }
+
+ public void setPrivateKeyPassword(String privateKeyPassword) {
+ this.privateKeyPassword = privateKeyPassword;
+ }
+
+ public String getPublicKeyId() {
+ return publicKeyId;
+ }
+
+ public void setPublicKeyId(String publicKeyId) {
+ this.publicKeyId = publicKeyId;
+ }
+
+ public Object getSslContextParameters() {
+ return sslContextParameters;
+ }
+
+ public void setSslContextParameters(Object sslContextParameters) {
+ this.sslContextParameters = sslContextParameters;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public String getUserPassword() {
+ return userPassword;
+ }
+
+ public void setUserPassword(String userPassword) {
+ this.userPassword = userPassword;
+ }
+ }
+
+ public static class BoxConsumer extends BoxCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class BoxProducer extends BoxCommon {
+ }
+
+ public static enum BoxApiName {
+ COLLABORATIONS, COMMENTS, EVENT_LOGS, FILES, FOLDERS, GROUPS, EVENTS, SEARCH, TASKS, USERS;
+ }
+
+ public static enum EncryptionAlgorithm {
+ RSA_SHA_256, RSA_SHA_384, RSA_SHA_512;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BraintreeEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BraintreeEndpoint.java
new file mode 100644
index 0000000..ce8f20d
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BraintreeEndpoint.java
@@ -0,0 +1,277 @@
+/*
+ * 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.model.endpoint;
+
+import java.util.logging.Level;
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * The braintree component is used for integrating with the Braintree Payment
+ * System.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class BraintreeEndpoint {
+
+
+ public static class BraintreeCommon extends EndpointConfiguration {
+ /**
+ * What kind of operation to perform. The option is a
+ * org.apache.camel.component.braintree.internal.BraintreeApiName type.
+ */
+ private BraintreeApiName apiName;
+ /**
+ * What sub operation to use for the selected operation. The option is a
+ * java.lang.String type.
+ */
+ private String methodName;
+ /**
+ * The environment Either SANDBOX or PRODUCTION. The option is a
+ * java.lang.String type.
+ */
+ private String environment;
+ /**
+ * Sets the name of a parameter to be passed in the exchange In Body.
+ * The option is a java.lang.String type.
+ */
+ private String inBody;
+ /**
+ * The merchant id provided by Braintree. The option is a
+ * java.lang.String type.
+ */
+ private String merchantId;
+ /**
+ * The private key provided by Braintree. The option is a
+ * java.lang.String type.
+ */
+ private String privateKey;
+ /**
+ * The public key provided by Braintree. The option is a
+ * java.lang.String type.
+ */
+ private String publicKey;
+ /**
+ * The access token granted by a merchant to another in order to process
+ * transactions on their behalf. Used in place of environment, merchant
+ * id, public key and private key fields. The option is a
+ * java.lang.String type.
+ */
+ private String accessToken;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Set read timeout for http calls. The option is a java.lang.Integer
+ * type.
+ */
+ private Integer httpReadTimeout;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+ /**
+ * Set logging level for http calls, see java.util.logging.Level. The
+ * option is a java.lang.String type.
+ */
+ private Level httpLogLevel;
+ /**
+ * The proxy host. The option is a java.lang.String type.
+ */
+ private String proxyHost;
+ /**
+ * The proxy port. The option is a java.lang.Integer type.
+ */
+ private Integer proxyPort;
+
+ public BraintreeApiName getApiName() {
+ return apiName;
+ }
+
+ public void setApiName(BraintreeApiName apiName) {
+ this.apiName = apiName;
+ }
+
+ public String getMethodName() {
+ return methodName;
+ }
+
+ public void setMethodName(String methodName) {
+ this.methodName = methodName;
+ }
+
+ public String getEnvironment() {
+ return environment;
+ }
+
+ public void setEnvironment(String environment) {
+ this.environment = environment;
+ }
+
+ public String getInBody() {
+ return inBody;
+ }
+
+ public void setInBody(String inBody) {
+ this.inBody = inBody;
+ }
+
+ public String getMerchantId() {
+ return merchantId;
+ }
+
+ public void setMerchantId(String merchantId) {
+ this.merchantId = merchantId;
+ }
+
+ public String getPrivateKey() {
+ return privateKey;
+ }
+
+ public void setPrivateKey(String privateKey) {
+ this.privateKey = privateKey;
+ }
+
+ public String getPublicKey() {
+ return publicKey;
+ }
+
+ public void setPublicKey(String publicKey) {
+ this.publicKey = publicKey;
+ }
+
+ public String getAccessToken() {
+ return accessToken;
+ }
+
+ public void setAccessToken(String accessToken) {
+ this.accessToken = accessToken;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public Integer getHttpReadTimeout() {
+ return httpReadTimeout;
+ }
+
+ public void setHttpReadTimeout(Integer httpReadTimeout) {
+ this.httpReadTimeout = httpReadTimeout;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+
+ public Level getHttpLogLevel() {
+ return httpLogLevel;
+ }
+
+ public void setHttpLogLevel(Level httpLogLevel) {
+ this.httpLogLevel = httpLogLevel;
+ }
+
+ public String getProxyHost() {
+ return proxyHost;
+ }
+
+ public void setProxyHost(String proxyHost) {
+ this.proxyHost = proxyHost;
+ }
+
+ public Integer getProxyPort() {
+ return proxyPort;
+ }
+
+ public void setProxyPort(Integer proxyPort) {
+ this.proxyPort = proxyPort;
+ }
+ }
+
+ public static class BraintreeConsumer extends BraintreeCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class BraintreeProducer extends BraintreeCommon {
+ }
+
+ public static enum BraintreeApiName {
+ ADDON, ADDRESS, CLIENTTOKEN, CREDITCARDVERIFICATION, CUSTOMER, DISCOUNT, DISPUTE, DOCUMENTUPLOAD, MERCHANTACCOUNT, PAYMENTMETHOD, PAYMENTMETHODNONCE, PLAN, REPORT, SETTLEMENTBATCHSUMMARY, SUBSCRIPTION, TRANSACTION, WEBHOOKNOTIFICATION;
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BrowseEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BrowseEndpoint.java
new file mode 100644
index 0000000..a14cf2d
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/BrowseEndpoint.java
@@ -0,0 +1,129 @@
+/*
+ * 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.model.endpoint;
+
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * The browse component is used for viewing the messages received on endpoints
+ * that supports BrowsableEndpoint.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class BrowseEndpoint {
+
+
+ public static class BrowseCommon extends EndpointConfiguration {
+ /**
+ * A name which can be any string to uniquely identify the endpoint. The
+ * option is a java.lang.String type.
+ */
+ private String name;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class BrowseConsumer extends BrowseCommon {
+ /**
+ * 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. The option is a boolean type.
+ */
+ private boolean bridgeErrorHandler;
+ /**
+ * 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. The option is a
+ * org.apache.camel.spi.ExceptionHandler type.
+ */
+ private ExceptionHandler exceptionHandler;
+ /**
+ * Sets the exchange pattern when the consumer creates an exchange. The
+ * option is a org.apache.camel.ExchangePattern type.
+ */
+ private ExchangePattern exchangePattern;
+
+ public boolean getBridgeErrorHandler() {
+ return bridgeErrorHandler;
+ }
+
+ public void setBridgeErrorHandler(boolean bridgeErrorHandler) {
+ this.bridgeErrorHandler = bridgeErrorHandler;
+ }
+
+ public ExceptionHandler getExceptionHandler() {
+ return exceptionHandler;
+ }
+
+ public void setExceptionHandler(ExceptionHandler exceptionHandler) {
+ this.exceptionHandler = exceptionHandler;
+ }
+
+ public ExchangePattern getExchangePattern() {
+ return exchangePattern;
+ }
+
+ public void setExchangePattern(ExchangePattern exchangePattern) {
+ this.exchangePattern = exchangePattern;
+ }
+ }
+
+ public static class BrowseProducer extends BrowseCommon {
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/CMEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/CMEndpoint.java
new file mode 100644
index 0000000..904efb3
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/CMEndpoint.java
@@ -0,0 +1,135 @@
+/*
+ * 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.model.endpoint;
+
+import javax.annotation.Generated;
+
+/**
+ * The cm-sms component allows to integrate with CM SMS Gateway.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class CMEndpoint {
+
+
+ public static class CMCommon extends EndpointConfiguration {
+ /**
+ * SMS Provider HOST with scheme. The option is a java.lang.String type.
+ */
+ private String host;
+ /**
+ * This is the sender name. The maximum length is 11 characters. The
+ * option is a
+ * (@javax.validation.constraints.NotNull,@javax.validation.constraints.Size(min=1, max=11) :: java.lang.String) type.
+ */
+ private String defaultFrom;
+ /**
+ * If it is a multipart message forces the max number. Message can be
+ * truncated. Technically the gateway will first check if a message is
+ * larger than 160 characters, if so, the message will be cut into
+ * multiple 153 characters parts limited by these parameters. The option
+ * is a
+ * (@javax.validation.constraints.Min(1L),@javax.validation.constraints.Max(8L) :: int) type.
+ */
+ private int defaultMaxNumberOfParts;
+ /**
+ * The unique token to use. The option is a
+ * (@javax.validation.constraints.NotNull :: java.lang.String) type.
+ */
+ private String productToken;
+ /**
+ * Whether to test the connection to the SMS Gateway on startup. The
+ * option is a boolean type.
+ */
+ private boolean testConnectionOnStartup;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public String getDefaultFrom() {
+ return defaultFrom;
+ }
+
+ public void setDefaultFrom(String defaultFrom) {
+ this.defaultFrom = defaultFrom;
+ }
+
+ public int getDefaultMaxNumberOfParts() {
+ return defaultMaxNumberOfParts;
+ }
+
+ public void setDefaultMaxNumberOfParts(int defaultMaxNumberOfParts) {
+ this.defaultMaxNumberOfParts = defaultMaxNumberOfParts;
+ }
+
+ public String getProductToken() {
+ return productToken;
+ }
+
+ public void setProductToken(String productToken) {
+ this.productToken = productToken;
+ }
+
+ public boolean getTestConnectionOnStartup() {
+ return testConnectionOnStartup;
+ }
+
+ public void setTestConnectionOnStartup(boolean testConnectionOnStartup) {
+ this.testConnectionOnStartup = testConnectionOnStartup;
+ }
+
+ public boolean getBasicPropertyBinding() {
+ return basicPropertyBinding;
+ }
+
+ public void setBasicPropertyBinding(boolean basicPropertyBinding) {
+ this.basicPropertyBinding = basicPropertyBinding;
+ }
+
+ public boolean getSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+ }
+
+ public static class CMConsumer extends CMCommon {
+ }
+
+ public static class CMProducer extends CMCommon {
+ }
+}
\ No newline at end of file
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/endpoint/CMISEndpoint.java b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/CMISEndpoint.java
new file mode 100644
index 0000000..9348d9e
--- /dev/null
+++ b/core/camel-core/src/main/java/org/apache/camel/model/endpoint/CMISEndpoint.java
@@ -0,0 +1,247 @@
+/*
+ * 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.model.endpoint;
+
+import javax.annotation.Generated;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.spi.ExceptionHandler;
+
+/**
+ * The cmis component uses the Apache Chemistry client API and allows you to
+ * add/read nodes to/from a CMIS compliant content repositories.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public class CMISEndpoint {
+
+
+ public static class CMISCommon extends EndpointConfiguration {
+ /**
+ * URL to the cmis repository. The option is a java.lang.String type.
+ */
+ private String cmsUrl;
+ /**
+ * Number of nodes to retrieve per page. The option is a int type.
+ */
+ private int pageSize;
+ /**
+ * If set to true, the content of document node will be retrieved in
+ * addition to the properties. The option is a boolean type.
+ */
+ private boolean readContent;
+ /**
+ * Max number of nodes to read. The option is a int type.
+ */
+ private int readCount;
+ /**
+ * The Id of the repository to use. If not specified the first available
+ * repository is used. The option is a java.lang.String type.
+ */
+ private String repositoryId;
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities. The option
+ * is a boolean type.
+ */
+ private boolean basicPropertyBinding;
+ /**
+ * To use a custom CMISSessionFacadeFactory to create the
+ * CMISSessionFacade instances. The option is a
+ * org.apache.camel.component.cmis.CMISSessionFacadeFactory type.
+ */
+ private Object sessionFacadeFactory;
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported). The option
+ * is a boolean type.
+ */
+ private boolean synchronous;
+ /**
+ * Password for the cmis repository. The option is a java.lang.String
+ * type.
+ */
+ private String password;
+ /**
+ * Username for the cmis repository. The option is a java.lang.String
+ * type.
+ */
+ private String username;
+
+ public String getCmsUrl() {
+ return cmsUrl;
+ }
+
+ public void setCmsUrl(String cmsUrl) {
+ this.cmsUrl = cmsUrl;
+ }
+
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ public void setPageSize(int pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ public boolean getReadContent() {
+ return readContent;
+ }
+
+ public void setReadContent(boolean readContent) {
+ this.readContent = readContent;
... 97402 lines suppressed ...