You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/02/28 16:01:07 UTC
[1/2] camel git commit: CAMEL-10735: deprecate stuff and polished
Repository: camel
Updated Branches:
refs/heads/master 76ce82acf -> 425a1055b
CAMEL-10735: deprecate stuff and polished
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/448bc7b7
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/448bc7b7
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/448bc7b7
Branch: refs/heads/master
Commit: 448bc7b71821d2f32e63fc7a15e2df412f505599
Parents: 76ce82a
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Feb 28 16:43:01 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Feb 28 16:43:01 2017 +0100
----------------------------------------------------------------------
.../component/binding/BindingEndpoint.java | 3 +++
.../processor/binding/DataFormatBinding.java | 1 +
.../main/java/org/apache/camel/spi/Binding.java | 1 +
.../apache/camel/spi/CamelContextTracker.java | 2 +-
.../java/org/apache/camel/spi/Contract.java | 25 +++++++++-----------
.../org/apache/camel/spi/DataFormatFactory.java | 1 +
.../apache/camel/spi/DataFormatResolver.java | 1 +
.../java/org/apache/camel/spi/HasBinding.java | 1 +
.../camel/spi/ManagementNamingStrategy.java | 2 ++
.../camel/spi/ServiceCallLoadBalancer.java | 4 +++-
.../spi/ServiceCallLoadBalancerRequest.java | 4 +++-
.../apache/camel/spi/ServiceCallService.java | 1 +
.../camel/spi/ServiceCallServiceChooser.java | 1 +
.../spi/ServiceCallServiceChooserAware.java | 1 +
.../camel/spi/ServiceCallServiceDiscovery.java | 1 +
.../spi/ServiceCallServiceDiscoveryAware.java | 1 +
.../org/apache/camel/spi/StateRepository.java | 1 +
17 files changed, 34 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/component/binding/BindingEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/binding/BindingEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/binding/BindingEndpoint.java
index 2bb162c..da6e58f 100644
--- a/camel-core/src/main/java/org/apache/camel/component/binding/BindingEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/binding/BindingEndpoint.java
@@ -49,7 +49,10 @@ import static org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint;
* Applies a {@link org.apache.camel.spi.Binding} to an underlying {@link Endpoint} so that the binding processes messages
* before its sent to the endpoint and processes messages received by the endpoint consumer before its passed
* to the real consumer.
+ *
+ * @deprecated use {@link org.apache.camel.spi.Contract} instead
*/
+@Deprecated
@UriEndpoint(firstVersion = "2.11.0", scheme = "binding", title = "Binding", syntax = "binding:bindingName:delegateUri",
consumerClass = BindingConsumerProcessor.class, label = "core,transformation")
public class BindingEndpoint extends DefaultEndpoint implements HasBinding {
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/processor/binding/DataFormatBinding.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/binding/DataFormatBinding.java b/camel-core/src/main/java/org/apache/camel/processor/binding/DataFormatBinding.java
index bd4c597..5e410d6 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/binding/DataFormatBinding.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/binding/DataFormatBinding.java
@@ -28,6 +28,7 @@ import org.apache.camel.util.ObjectHelper;
* Represents a {@link org.apache.camel.spi.Binding} which Marshals the message in the ProduceProcessor and
* Unmarshals the message in the ConsumeProcessor
*/
+@Deprecated
public class DataFormatBinding extends ServiceSupport implements Binding {
private DataFormat producerDataFormat;
private DataFormat consumerDataFormat;
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/Binding.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/Binding.java b/camel-core/src/main/java/org/apache/camel/spi/Binding.java
index 3ab1581..6d412b9 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/Binding.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/Binding.java
@@ -23,6 +23,7 @@ import org.apache.camel.Processor;
* which can be applied to an Endpoint; such as ensuring that a particular
* <a href="http://camel.apache.org/data-format.html">Data Format</a> is used on messages in and out of an endpoint.
*/
+@Deprecated
public interface Binding {
/**
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/CamelContextTracker.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/CamelContextTracker.java b/camel-core/src/main/java/org/apache/camel/spi/CamelContextTracker.java
index 87e3dd7..70ae227 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/CamelContextTracker.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/CamelContextTracker.java
@@ -22,7 +22,7 @@ import org.apache.camel.CamelContext;
import org.apache.camel.impl.CamelContextTrackerRegistry;
/**
- * A camel context creation tracker.
+ * A {@link CamelContext} creation tracker.
*/
public class CamelContextTracker implements Closeable {
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/Contract.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/Contract.java b/camel-core/src/main/java/org/apache/camel/spi/Contract.java
index b9de3bf..f745fda 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/Contract.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/Contract.java
@@ -16,6 +16,9 @@
*/
package org.apache.camel.spi;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Processor;
+
/**
* A Contract which represents the input type and/or output type of the {@link Endpoint} or {@link Processor}.
*/
@@ -33,6 +36,7 @@ public class Contract {
/**
* Set the input data type.
+ *
* @param inputType input data type
*/
public void setInputType(String inputType) {
@@ -42,6 +46,7 @@ public class Contract {
/**
* Set the input data type with Java class.
+ *
* @param clazz Java class which represents input data type
*/
public void setInputType(Class<?> clazz) {
@@ -55,6 +60,7 @@ public class Contract {
/**
* Set the output data type.
+ *
* @param outputType output data type
*/
public void setOutputType(String outputType) {
@@ -64,6 +70,7 @@ public class Contract {
/**
* Set the output data type with Java class.
+ *
* @param clazz Java class which represents output data type
*/
public void setOutputType(Class<?> clazz) {
@@ -71,33 +78,23 @@ public class Contract {
this.contractString = null;
}
- /**
- *
- * @return
- */
public boolean isValidateInput() {
return validateInput;
}
-
+
/**
- *
- * @param validate
+ * Whether to validate the input
*/
public void setValidateInput(boolean validate) {
this.validateInput = validate;
}
- /**
- *
- * @return
- */
public boolean isValidateOutput() {
return validateOutput;
}
-
+
/**
- *
- * @param validate
+ * Whether to validate the output
*/
public void setValidateOutput(boolean validate) {
this.validateOutput = validate;
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/DataFormatFactory.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/DataFormatFactory.java b/camel-core/src/main/java/org/apache/camel/spi/DataFormatFactory.java
index 557cfad..1d1f527 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/DataFormatFactory.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/DataFormatFactory.java
@@ -22,6 +22,7 @@ package org.apache.camel.spi;
*/
@FunctionalInterface
public interface DataFormatFactory {
+
/**
* Creates a new DataFormat instance.
*
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/DataFormatResolver.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/DataFormatResolver.java b/camel-core/src/main/java/org/apache/camel/spi/DataFormatResolver.java
index 2f846aa..a1eb2ff 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/DataFormatResolver.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/DataFormatResolver.java
@@ -24,6 +24,7 @@ import org.apache.camel.CamelContext;
* @version
*/
public interface DataFormatResolver {
+
/**
* Resolves the given data format given its name.
*
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/HasBinding.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/HasBinding.java b/camel-core/src/main/java/org/apache/camel/spi/HasBinding.java
index 0597429..774b518 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/HasBinding.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/HasBinding.java
@@ -22,6 +22,7 @@ package org.apache.camel.spi;
*
* For example bean or cxf endpoints can expose the internal binding metadata at runtime
*/
+@Deprecated
public interface HasBinding {
/**
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/ManagementNamingStrategy.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/ManagementNamingStrategy.java b/camel-core/src/main/java/org/apache/camel/spi/ManagementNamingStrategy.java
index 0c4adf4..f363567 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/ManagementNamingStrategy.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/ManagementNamingStrategy.java
@@ -38,6 +38,8 @@ import org.apache.camel.Service;
*/
public interface ManagementNamingStrategy {
+ // TODO: Should be renamed to ManagementObjectNameStrategy
+
ObjectName getObjectNameForCamelContext(String managementName, String name) throws MalformedObjectNameException;
ObjectName getObjectNameForCamelContext(CamelContext context) throws MalformedObjectNameException;
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/ServiceCallLoadBalancer.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallLoadBalancer.java b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallLoadBalancer.java
index fba9279..6df8d89 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallLoadBalancer.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallLoadBalancer.java
@@ -14,7 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.camel.spi;
/**
@@ -25,5 +24,8 @@ package org.apache.camel.spi;
*/
@FunctionalInterface
public interface ServiceCallLoadBalancer {
+
+ // TODO: Document me
<T> T process(String serviceName, ServiceCallLoadBalancerRequest<T> request) throws Exception;
+
}
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/ServiceCallLoadBalancerRequest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallLoadBalancerRequest.java b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallLoadBalancerRequest.java
index 63c2920..ee5a631 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallLoadBalancerRequest.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallLoadBalancerRequest.java
@@ -14,7 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.camel.spi;
/**
@@ -25,5 +24,8 @@ package org.apache.camel.spi;
*/
@FunctionalInterface
public interface ServiceCallLoadBalancerRequest<T> {
+
+ // TODO: Document me
T process(ServiceCallService service) throws Exception;
+
}
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/ServiceCallService.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallService.java b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallService.java
index 1fdcdb5..52e680b 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallService.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallService.java
@@ -25,6 +25,7 @@ import java.util.Map;
* @see ServiceCallServiceDiscovery
*/
public interface ServiceCallService {
+
/**
* Gets the service name.
*/
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceChooser.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceChooser.java b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceChooser.java
index f5d71e4..2c28508 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceChooser.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceChooser.java
@@ -25,6 +25,7 @@ import java.util.List;
*/
@FunctionalInterface
public interface ServiceCallServiceChooser {
+
/**
* Chooses one of the service to use
*
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceChooserAware.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceChooserAware.java b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceChooserAware.java
index 43c8c60..26c2b91 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceChooserAware.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceChooserAware.java
@@ -21,6 +21,7 @@ package org.apache.camel.spi;
* a {@link ServiceCallServiceChooser}
*/
public interface ServiceCallServiceChooserAware {
+
/**
* Injects the {@link ServiceCallServiceChooser}
*
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceDiscovery.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceDiscovery.java b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceDiscovery.java
index 7ca72be..107e9a3 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceDiscovery.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceDiscovery.java
@@ -25,6 +25,7 @@ import java.util.List;
* @see ServiceCallService
*/
public interface ServiceCallServiceDiscovery {
+
/**
* Gets the initial list of services.
* <p/>
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceDiscoveryAware.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceDiscoveryAware.java b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceDiscoveryAware.java
index 5faa0ed..05ac085 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceDiscoveryAware.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/ServiceCallServiceDiscoveryAware.java
@@ -21,6 +21,7 @@ package org.apache.camel.spi;
* a {@link ServiceCallServiceDiscovery}
*/
public interface ServiceCallServiceDiscoveryAware {
+
/**
* Injects the {@link ServiceCallServiceDiscovery}
*
http://git-wip-us.apache.org/repos/asf/camel/blob/448bc7b7/camel-core/src/main/java/org/apache/camel/spi/StateRepository.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/StateRepository.java b/camel-core/src/main/java/org/apache/camel/spi/StateRepository.java
index 5b9cc10..7293d7f 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/StateRepository.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/StateRepository.java
@@ -27,6 +27,7 @@ import org.apache.camel.Service;
* @param <V> Value type
*/
public interface StateRepository<K, V> extends Service {
+
/**
* Sets the state value for the given key.
*
[2/2] camel git commit: CAMEL-10735: deprecate stuff and polished
Posted by da...@apache.org.
CAMEL-10735: deprecate stuff and polished
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/425a1055
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/425a1055
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/425a1055
Branch: refs/heads/master
Commit: 425a1055be12831e77b96c19316d87eb9eded04f
Parents: 448bc7b
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Feb 28 17:00:54 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Feb 28 17:00:54 2017 +0100
----------------------------------------------------------------------
.../src/main/java/org/apache/camel/Consume.java | 16 ++++
.../java/org/apache/camel/DynamicRouter.java | 14 +++-
.../org/apache/camel/EndpointConfiguration.java | 1 +
.../java/org/apache/camel/EndpointInject.java | 16 ++++
.../java/org/apache/camel/ExchangePattern.java | 2 +
.../java/org/apache/camel/ExchangeProperty.java | 4 +
.../src/main/java/org/apache/camel/Header.java | 4 +
.../java/org/apache/camel/InvokeOnHeader.java | 4 +
.../java/org/apache/camel/InvokeOnHeaders.java | 4 +
.../src/main/java/org/apache/camel/Ordered.java | 1 -
.../src/main/java/org/apache/camel/Produce.java | 20 +++++
.../java/org/apache/camel/PropertyInject.java | 12 +++
.../java/org/apache/camel/RecipientList.java | 81 ++++++++++++++++++++
.../main/java/org/apache/camel/RoutingSlip.java | 12 +++
.../main/java/org/apache/camel/URIField.java | 1 +
15 files changed, 190 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/Consume.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/Consume.java b/camel-core/src/main/java/org/apache/camel/Consume.java
index d2512c1..c0e6ff8 100644
--- a/camel-core/src/main/java/org/apache/camel/Consume.java
+++ b/camel-core/src/main/java/org/apache/camel/Consume.java
@@ -37,8 +37,24 @@ import java.lang.annotation.Target;
@Documented
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR })
public @interface Consume {
+
+ /**
+ * The uri to consume from
+ */
String uri() default "";
+
+ /**
+ * Reference to endpoint to consume from
+ */
String ref() default "";
+
+ /**
+ * Use the field or getter on the bean to provide the uri to consume from
+ */
String property() default "";
+
+ /**
+ * Id of {@link CamelContext} to use
+ */
String context() default "";
}
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/DynamicRouter.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/DynamicRouter.java b/camel-core/src/main/java/org/apache/camel/DynamicRouter.java
index b76df9a..b51ab76 100644
--- a/camel-core/src/main/java/org/apache/camel/DynamicRouter.java
+++ b/camel-core/src/main/java/org/apache/camel/DynamicRouter.java
@@ -42,9 +42,21 @@ import java.lang.annotation.Target;
*/
@Retention(RetentionPolicy.RUNTIME)
@Documented
-@Target({ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
+@Target( {ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
public @interface DynamicRouter {
+
+ /**
+ * Id of {@link CamelContext} to use
+ */
String context() default "";
+
+ /**
+ * Sets the uri delimiter to use
+ */
String delimiter() default ",";
+
+ /**
+ * Whether to ignore the invalidate endpoint exception when try to create a producer with that endpoint
+ */
boolean ignoreInvalidEndpoints() default false;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/EndpointConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/EndpointConfiguration.java b/camel-core/src/main/java/org/apache/camel/EndpointConfiguration.java
index d8a787e..8fc2563 100644
--- a/camel-core/src/main/java/org/apache/camel/EndpointConfiguration.java
+++ b/camel-core/src/main/java/org/apache/camel/EndpointConfiguration.java
@@ -22,6 +22,7 @@ import java.net.URI;
* Holds an {@link Endpoint} configuration as a pojo that can be manipulated and validated.
* Camel endpoint configuration is strongly related to URIs.
*/
+@Deprecated
public interface EndpointConfiguration {
String URI_SCHEME = "scheme";
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/EndpointInject.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/EndpointInject.java b/camel-core/src/main/java/org/apache/camel/EndpointInject.java
index a6afad0..0095601 100644
--- a/camel-core/src/main/java/org/apache/camel/EndpointInject.java
+++ b/camel-core/src/main/java/org/apache/camel/EndpointInject.java
@@ -38,8 +38,24 @@ import java.lang.annotation.Target;
@Documented
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR })
public @interface EndpointInject {
+
+ /**
+ * The uri of the endpoint
+ */
String uri() default "";
+
+ /**
+ * Reference to endpoint
+ */
String ref() default "";
+
+ /**
+ * Use the field or getter on the bean to provide the uri of the endpoint
+ */
String property() default "";
+
+ /**
+ * Id of {@link CamelContext} to use
+ */
String context() default "";
}
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/ExchangePattern.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/ExchangePattern.java b/camel-core/src/main/java/org/apache/camel/ExchangePattern.java
index 56d5be2..60de5db 100644
--- a/camel-core/src/main/java/org/apache/camel/ExchangePattern.java
+++ b/camel-core/src/main/java/org/apache/camel/ExchangePattern.java
@@ -32,6 +32,8 @@ import javax.xml.bind.annotation.XmlType;
public enum ExchangePattern {
InOnly, RobustInOnly, InOut, InOptionalOut, OutOnly, RobustOutOnly, OutIn, OutOptionalIn;
+ // TODO: We should deprecate and only support InOnly, InOut, and InOptionalOut
+
protected static final Map<String, ExchangePattern> MAP = new HashMap<String, ExchangePattern>();
/**
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/ExchangeProperty.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/ExchangeProperty.java b/camel-core/src/main/java/org/apache/camel/ExchangeProperty.java
index 7f7e37c..d0731ac 100644
--- a/camel-core/src/main/java/org/apache/camel/ExchangeProperty.java
+++ b/camel-core/src/main/java/org/apache/camel/ExchangeProperty.java
@@ -32,5 +32,9 @@ import java.lang.annotation.Target;
@Documented
@Target({ElementType.PARAMETER })
public @interface ExchangeProperty {
+
+ /**
+ * Name of the property
+ */
String value();
}
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/Header.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/Header.java b/camel-core/src/main/java/org/apache/camel/Header.java
index 23acd2c..b318d8d 100644
--- a/camel-core/src/main/java/org/apache/camel/Header.java
+++ b/camel-core/src/main/java/org/apache/camel/Header.java
@@ -32,5 +32,9 @@ import java.lang.annotation.Target;
@Documented
@Target({ElementType.PARAMETER })
public @interface Header {
+
+ /**
+ * Name of header
+ */
String value();
}
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/InvokeOnHeader.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/InvokeOnHeader.java b/camel-core/src/main/java/org/apache/camel/InvokeOnHeader.java
index 8b3b369..803c096 100644
--- a/camel-core/src/main/java/org/apache/camel/InvokeOnHeader.java
+++ b/camel-core/src/main/java/org/apache/camel/InvokeOnHeader.java
@@ -32,5 +32,9 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface InvokeOnHeader {
+
+ /**
+ * Name of header
+ */
String value();
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/InvokeOnHeaders.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/InvokeOnHeaders.java b/camel-core/src/main/java/org/apache/camel/InvokeOnHeaders.java
index 32c1b00..183dc04 100644
--- a/camel-core/src/main/java/org/apache/camel/InvokeOnHeaders.java
+++ b/camel-core/src/main/java/org/apache/camel/InvokeOnHeaders.java
@@ -30,5 +30,9 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface InvokeOnHeaders {
+
+ /**
+ * Name of headers
+ */
InvokeOnHeader[] value();
}
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/Ordered.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/Ordered.java b/camel-core/src/main/java/org/apache/camel/Ordered.java
index 4c5e37d..dbe5f72 100644
--- a/camel-core/src/main/java/org/apache/camel/Ordered.java
+++ b/camel-core/src/main/java/org/apache/camel/Ordered.java
@@ -33,7 +33,6 @@ public interface Ordered {
*/
int LOWEST = Integer.MAX_VALUE;
-
/**
* Gets the order.
* <p/>
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/Produce.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/Produce.java b/camel-core/src/main/java/org/apache/camel/Produce.java
index 283ce77..e1dec57 100644
--- a/camel-core/src/main/java/org/apache/camel/Produce.java
+++ b/camel-core/src/main/java/org/apache/camel/Produce.java
@@ -39,9 +39,29 @@ import java.lang.annotation.Target;
@Documented
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR })
public @interface Produce {
+
+ /**
+ * The uri to produce to
+ */
String uri() default "";
+
+ /**
+ * Reference to endpoint to produce to
+ */
String ref() default "";
+
+ /**
+ * Use the field or getter on the bean to provide the uri to produce to
+ */
String property() default "";
+
+ /**
+ * Id of {@link CamelContext} to use
+ */
String context() default "";
+
+ /**
+ * Whether to use bean parameter binding
+ */
boolean binding() default true;
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/PropertyInject.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/PropertyInject.java b/camel-core/src/main/java/org/apache/camel/PropertyInject.java
index 2b2d4ac..556b15a 100644
--- a/camel-core/src/main/java/org/apache/camel/PropertyInject.java
+++ b/camel-core/src/main/java/org/apache/camel/PropertyInject.java
@@ -30,7 +30,19 @@ import java.lang.annotation.Target;
@Documented
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
public @interface PropertyInject {
+
+ /**
+ * Name of the property
+ */
String value();
+
+ /**
+ * Default value to use if the property does not exists or has no value
+ */
String defaultValue() default "";
+
+ /**
+ * Id of {@link CamelContext} to use
+ */
String context() default "";
}
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/RecipientList.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/RecipientList.java b/camel-core/src/main/java/org/apache/camel/RecipientList.java
index bd5e996..852175c 100644
--- a/camel-core/src/main/java/org/apache/camel/RecipientList.java
+++ b/camel-core/src/main/java/org/apache/camel/RecipientList.java
@@ -43,18 +43,99 @@ import java.lang.annotation.Target;
@Documented
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR })
public @interface RecipientList {
+
+ /**
+ * Id of {@link CamelContext} to use
+ */
String context() default "";
+
+ /**
+ * Sets the uri delimiter to use
+ */
String delimiter() default ",";
+
+ /**
+ * If enabled then sending messages to the recipients occurs concurrently.
+ * Note the caller thread will still wait until all messages has been fully processed, before it continues.
+ * Its only the sending and processing the replies from the recipients which happens concurrently.
+ */
boolean parallelProcessing() default false;
+
+ /**
+ * If enabled then the aggregate method on AggregationStrategy can be called concurrently.
+ * Notice that this would require the implementation of AggregationStrategy to be implemented as thread-safe.
+ * By default this is false meaning that Camel synchronizes the call to the aggregate method.
+ * Though in some use-cases this can be used to archive higher performance when the AggregationStrategy is implemented as thread-safe.
+ */
boolean parallelAggregate() default false;
+
+ /**
+ * Will now stop further processing if an exception or failure occurred during processing of an
+ * {@link org.apache.camel.Exchange} and the caused exception will be thrown.
+ * <p/>
+ * Will also stop if processing the exchange failed (has a fault message) or an exception
+ * was thrown and handled by the error handler (such as using onException). In all situations
+ * the recipient list will stop further processing. This is the same behavior as in pipeline, which
+ * is used by the routing engine.
+ * <p/>
+ * The default behavior is to <b>not</b> stop but continue processing till the end
+ */
boolean stopOnException() default false;
+
+ /**
+ * If enabled, unwind exceptions occurring at aggregation time to the error handler when parallelProcessing is used.
+ * Currently, aggregation time exceptions do not stop the route processing when parallelProcessing is used.
+ * Enabling this option allows to work around this behavior.
+ *
+ * The default value is <code>false</code> for the sake of backward compatibility.
+ */
boolean stopOnAggregateException() default false;
+
+ /**
+ * If enabled then Camel will process replies out-of-order, eg in the order they come back.
+ * If disabled, Camel will process replies in the same order as defined by the recipient list.
+ */
boolean streaming() default false;
+
+ /**
+ * Whether to ignore the invalidate endpoint exception when try to create a producer with that endpoint
+ */
boolean ignoreInvalidEndpoints() default false;
+
+ /**
+ * Sets a reference to the AggregationStrategy to be used to assemble the replies from the recipients, into a single outgoing message from the RecipientList.
+ * By default Camel will use the last reply as the outgoing message. You can also use a POJO as the AggregationStrategy
+ */
String strategyRef() default "";
+
+ /**
+ * Refers to a custom Thread Pool to be used for parallel processing.
+ * Notice if you set this option, then parallel processing is automatic implied, and you do not have to enable that option as well.
+ */
String executorServiceRef() default "";
+
+ /**
+ * Sets a total timeout specified in millis, when using parallel processing.
+ * If the Recipient List hasn't been able to send and process all replies within the given timeframe,
+ * then the timeout triggers and the Recipient List breaks out and continues.
+ * Notice if you provide a TimeoutAwareAggregationStrategy then the timeout method is invoked before breaking out.
+ * If the timeout is reached with running tasks still remaining, certain tasks for which it is difficult for Camel
+ * to shut down in a graceful manner may continue to run. So use this option with a bit of care.
+ */
long timeout() default 0;
+
+ /**
+ * Uses the {@link Processor} when preparing the {@link org.apache.camel.Exchange} to be send.
+ * This can be used to deep-clone messages that should be send, or any custom logic needed before
+ * the exchange is send.
+ */
String onPrepareRef() default "";
+
+ /**
+ * Shares the {@link org.apache.camel.spi.UnitOfWork} with the parent and each of the sub messages.
+ * Recipient List will by default not share unit of work between the parent exchange and each recipient exchange.
+ * This means each sub exchange has its own individual unit of work.
+ */
@Deprecated
boolean shareUnitOfWork() default false;
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/RoutingSlip.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/RoutingSlip.java b/camel-core/src/main/java/org/apache/camel/RoutingSlip.java
index fbe792e..d7e95f1 100644
--- a/camel-core/src/main/java/org/apache/camel/RoutingSlip.java
+++ b/camel-core/src/main/java/org/apache/camel/RoutingSlip.java
@@ -44,7 +44,19 @@ import java.lang.annotation.Target;
@Documented
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
public @interface RoutingSlip {
+
+ /**
+ * Id of {@link CamelContext} to use
+ */
String context() default "";
+
+ /**
+ * Sets the uri delimiter to use
+ */
String delimiter() default ",";
+
+ /**
+ * Whether to ignore the invalidate endpoint exception when try to create a producer with that endpoint
+ */
boolean ignoreInvalidEndpoints() default false;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/425a1055/camel-core/src/main/java/org/apache/camel/URIField.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/URIField.java b/camel-core/src/main/java/org/apache/camel/URIField.java
index 0f018fa..b54c0cb 100644
--- a/camel-core/src/main/java/org/apache/camel/URIField.java
+++ b/camel-core/src/main/java/org/apache/camel/URIField.java
@@ -30,6 +30,7 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Target({ElementType.FIELD})
+@Deprecated
public @interface URIField {
String component() default "";
String parameter() default "";