You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2008/03/24 16:08:42 UTC
svn commit: r640438 [4/8] - in /activemq/camel/trunk:
camel-core/src/main/java/org/apache/camel/
camel-core/src/main/java/org/apache/camel/builder/
camel-core/src/main/java/org/apache/camel/builder/xml/
camel-core/src/main/java/org/apache/camel/compone...
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ChoiceType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ChoiceType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ChoiceType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ChoiceType.java Mon Mar 24 08:08:24 2008
@@ -110,11 +110,9 @@
public List<ProcessorType<?>> getOutputs() {
if (otherwise != null) {
return otherwise.getOutputs();
- }
- else if (whenClauses.isEmpty()) {
+ } else if (whenClauses.isEmpty()) {
return Collections.EMPTY_LIST;
- }
- else {
+ } else {
WhenType when = whenClauses.get(whenClauses.size() - 1);
return when.getOutputs();
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/CompletedPredicate.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/CompletedPredicate.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/CompletedPredicate.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/CompletedPredicate.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java Mon Mar 24 08:08:24 2008
@@ -17,8 +17,9 @@
package org.apache.camel.model;
import java.util.ArrayList;
-import java.util.List;
import java.util.Collection;
+import java.util.List;
+
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@@ -40,7 +41,7 @@
@XmlRootElement(name = "onException")
@XmlAccessorType(XmlAccessType.FIELD)
public class ExceptionType extends ProcessorType<ProcessorType> {
-
+
/*
@XmlElementRef
private List<InterceptorType> interceptors = new ArrayList<InterceptorType>();
@@ -82,8 +83,7 @@
public RedeliveryPolicy createRedeliveryPolicy(RedeliveryPolicy parentPolicy) {
if (redeliveryPolicy != null) {
return redeliveryPolicy.createRedeliveryPolicy(parentPolicy);
- }
- else if (errorHandler != null) {
+ } else if (errorHandler != null) {
// lets create a new error handler that has no retries
RedeliveryPolicy answer = parentPolicy.copy();
answer.setMaximumRedeliveries(0);
@@ -193,7 +193,7 @@
}
return redeliveryPolicy;
}
-
+
protected List<Class> createExceptionClasses() {
List<String> list = getExceptions();
List<Class> answer = new ArrayList<Class>(list.size());
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FromType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FromType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FromType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FromType.java Mon Mar 24 08:08:24 2008
@@ -16,20 +16,20 @@
*/
package org.apache.camel.model;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.camel.impl.RouteContext;
-import org.apache.camel.util.ObjectHelper;
-
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.impl.RouteContext;
+import org.apache.camel.util.ObjectHelper;
+
/**
* Represents an XML <from/> element
- *
+ *
* @version $Revision$
*/
@XmlRootElement(name = "from")
@@ -77,7 +77,7 @@
/**
* Sets the URI of the endpoint to use
- *
+ *
* @param uri the endpoint URI to use
*/
public void setUri(String uri) {
@@ -91,7 +91,7 @@
/**
* Sets the name of the endpoint within the registry (such as the Spring
* ApplicationContext or JNDI) to use
- *
+ *
* @param ref the reference name to use
*/
public void setRef(String ref) {
@@ -112,8 +112,7 @@
public Object getUriOrRef() {
if (ObjectHelper.isNullOrBlank(uri)) {
return uri;
- }
- else if (endpoint != null) {
+ } else if (endpoint != null) {
return endpoint.getEndpointUri();
}
return ref;
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptType.java Mon Mar 24 08:08:24 2008
@@ -16,19 +16,16 @@
*/
package org.apache.camel.model;
-import org.apache.camel.Processor;
-import org.apache.camel.Route;
-import org.apache.camel.Predicate;
-import org.apache.camel.builder.PredicateBuilder;
-import org.apache.camel.impl.RouteContext;
-import org.apache.camel.processor.Interceptor;
-
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
-import java.util.Collection;
+import org.apache.camel.Predicate;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.PredicateBuilder;
+import org.apache.camel.impl.RouteContext;
+import org.apache.camel.processor.Interceptor;
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptorRef.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptorRef.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptorRef.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptorRef.java Mon Mar 24 08:08:24 2008
@@ -16,16 +16,16 @@
*/
package org.apache.camel.model;
-import org.apache.camel.impl.RouteContext;
-import org.apache.camel.processor.DelegateProcessor;
-import org.apache.camel.Processor;
-
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
+import org.apache.camel.Processor;
+import org.apache.camel.impl.RouteContext;
+import org.apache.camel.processor.DelegateProcessor;
+
/**
* @version $Revision$
*/
@@ -82,11 +82,9 @@
public String getLabel() {
if (ref != null) {
return "ref: " + ref;
- }
- else if (interceptor != null) {
+ } else if (interceptor != null) {
return interceptor.toString();
- }
- else {
+ } else {
return "";
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptorType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptorType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptorType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptorType.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -17,10 +16,10 @@
*/
package org.apache.camel.model;
-import org.apache.camel.processor.DelegateProcessor;
-import org.apache.camel.impl.RouteContext;
-
import javax.xml.bind.annotation.XmlType;
+
+import org.apache.camel.impl.RouteContext;
+import org.apache.camel.processor.DelegateProcessor;
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceType.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -17,47 +16,39 @@
*/
package org.apache.camel.model;
-import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import org.apache.camel.Exchange;
import org.apache.camel.Expression;
-import org.apache.camel.Predicate;
import org.apache.camel.Processor;
import org.apache.camel.impl.RouteContext;
-
import org.apache.camel.model.loadbalancer.LoadBalancerType;
import org.apache.camel.model.loadbalancer.RandomLoadBalanceStrategy;
import org.apache.camel.model.loadbalancer.RoundRobinLoadBalanceStrategy;
import org.apache.camel.model.loadbalancer.StickyLoadBalanceStrategy;
import org.apache.camel.model.loadbalancer.TopicLoadBalanceStrategy;
-import org.apache.camel.processor.ChoiceProcessor;
-import org.apache.camel.processor.FilterProcessor;
import org.apache.camel.processor.SendProcessor;
import org.apache.camel.processor.loadbalancer.LoadBalancer;
+import org.apache.camel.processor.loadbalancer.RandomLoadBalancer;
import org.apache.camel.processor.loadbalancer.RoundRobinLoadBalancer;
import org.apache.camel.processor.loadbalancer.StickyLoadBalancer;
import org.apache.camel.processor.loadbalancer.TopicLoadBalancer;
-import org.apache.camel.processor.loadbalancer.RandomLoadBalancer;
import org.apache.camel.util.CollectionStringBuffer;
-import org.apache.camel.util.ObjectHelper;
@XmlRootElement(name = "loadBalance")
@XmlAccessorType(XmlAccessType.FIELD)
public class LoadBalanceType extends OutputType<LoadBalanceType> {
@XmlAttribute(required = false)
private String ref;
-
+
@XmlElements({
@XmlElement(required = false, name = "roundRobin", type = RoundRobinLoadBalanceStrategy.class),
@XmlElement(required = false, name = "random", type = RandomLoadBalanceStrategy.class),
@@ -65,55 +56,55 @@
@XmlElement(required = false, name = "topic", type = TopicLoadBalanceStrategy.class)}
)
private LoadBalancerType loadBalancerType;
-
-
-
+
+
+
public LoadBalanceType() {
-
+
}
-
+
public String getRef() {
return ref;
}
-
+
public void setRef(String ref) {
this.ref = ref;
}
-
+
public LoadBalancerType getLoadBalancerType() {
return loadBalancerType;
}
-
+
public void setLoadBalancerType(LoadBalancerType loadbalancer) {
loadBalancerType = loadbalancer;
}
-
+
protected Processor createOutputsProcessor(RouteContext routeContext, Collection<ProcessorType<?>> outputs)
throws Exception {
-
+
LoadBalancer loadBalancer = LoadBalancerType.getLoadBalancer(routeContext, loadBalancerType, ref);
-
+
for (ProcessorType processorType : outputs) {
//The outputs should be the SendProcessor
- SendProcessor processor =(SendProcessor) processorType.createProcessor(routeContext);
-
+ SendProcessor processor = (SendProcessor) processorType.createProcessor(routeContext);
+
loadBalancer.addProcessor(processor);
- }
+ }
return loadBalancer;
}
-
+
// when this method will be called
@Override
public Processor createProcessor(RouteContext routeContext) throws Exception {
-
+
LoadBalancer loadBalancer = LoadBalancerType.getLoadBalancer(routeContext, loadBalancerType, ref);
for (ProcessorType processorType : getOutputs()) {
//The outputs should be the SendProcessor
- SendProcessor processor =(SendProcessor) processorType.createProcessor(routeContext);
-
+ SendProcessor processor = (SendProcessor) processorType.createProcessor(routeContext);
+
loadBalancer.addProcessor(processor);
- }
-
+ }
+
return loadBalancer;
}
@@ -123,28 +114,28 @@
loadBalancerType = new LoadBalancerType(loadBalancer);
return this;
}
-
+
public LoadBalanceType roundRobin() {
loadBalancerType = new LoadBalancerType(new RoundRobinLoadBalancer());
- return this;
+ return this;
}
-
+
public LoadBalanceType random() {
loadBalancerType = new LoadBalancerType(new RandomLoadBalancer());
return this;
}
-
+
public LoadBalanceType sticky(Expression<Exchange> correlationExpression) {
loadBalancerType = new LoadBalancerType(new StickyLoadBalancer(correlationExpression));
return this;
}
-
+
public LoadBalanceType topic() {
loadBalancerType = new LoadBalancerType(new TopicLoadBalancer());
return this;
}
-
-
+
+
@Override
public String getLabel() {
CollectionStringBuffer buffer = new CollectionStringBuffer();
@@ -154,7 +145,7 @@
}
return buffer.toString();
}
-
+
@Override
public String toString() {
String result;
@@ -162,14 +153,14 @@
result = "LoadBalanceType[" + loadBalancerType + ", ";
} else {
result = "LoadBalanceType[" + ref + ", ";
- }
+ }
result = result + getOutputs() + "]";
return result;
}
-
-
-
+
+
+
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MarshalType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MarshalType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MarshalType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MarshalType.java Mon Mar 24 08:08:24 2008
@@ -72,8 +72,7 @@
public String toString() {
if (dataFormatType != null) {
return "Marshal[" + dataFormatType + "]";
- }
- else {
+ } else {
return "Marshal[ref: " + ref + "]";
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastType.java Mon Mar 24 08:08:24 2008
@@ -21,9 +21,9 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlAttribute;
import org.apache.camel.Processor;
import org.apache.camel.impl.RouteContext;
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/NodeFactory.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/NodeFactory.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/NodeFactory.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/NodeFactory.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/OutputType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/OutputType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/OutputType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/OutputType.java Mon Mar 24 08:08:24 2008
@@ -19,11 +19,10 @@
import java.util.ArrayList;
import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlTransient;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/PolicyRef.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/PolicyRef.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/PolicyRef.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/PolicyRef.java Mon Mar 24 08:08:24 2008
@@ -53,11 +53,9 @@
public String getLabel() {
if (ref != null) {
return "ref: " + ref;
- }
- else if (policy != null) {
+ } else if (policy != null) {
return policy.toString();
- }
- else {
+ } else {
return "";
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProceedType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProceedType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProceedType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProceedType.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -17,14 +16,12 @@
*/
package org.apache.camel.model;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
import org.apache.camel.Processor;
import org.apache.camel.impl.RouteContext;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAccessType;
-import java.util.Collections;
-import java.util.List;
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorRef.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorRef.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorRef.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorRef.java Mon Mar 24 08:08:24 2008
@@ -16,15 +16,15 @@
*/
package org.apache.camel.model;
-import org.apache.camel.Processor;
-import org.apache.camel.impl.RouteContext;
-
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
+import org.apache.camel.Processor;
+import org.apache.camel.impl.RouteContext;
+
/**
* @version $Revision$
*/
@@ -52,11 +52,9 @@
public String getLabel() {
if (ref != null) {
return "ref: " + ref;
- }
- else if (processor != null) {
+ } else if (processor != null) {
return processor.toString();
- }
- else {
+ } else {
return "";
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java Mon Mar 24 08:08:24 2008
@@ -50,8 +50,8 @@
import org.apache.camel.processor.MulticastProcessor;
import org.apache.camel.processor.Pipeline;
import org.apache.camel.processor.RecipientList;
-import org.apache.camel.processor.aggregate.AggregationStrategy;
import org.apache.camel.processor.aggregate.AggregationCollection;
+import org.apache.camel.processor.aggregate.AggregationStrategy;
import org.apache.camel.processor.idempotent.IdempotentConsumer;
import org.apache.camel.processor.idempotent.MessageIdRepository;
import org.apache.camel.spi.DataFormat;
@@ -70,7 +70,7 @@
private DelegateProcessor lastInterceptor;
private NodeFactory nodeFactory;
private LinkedList<Block> blocks = new LinkedList<Block>();
- private ProcessorType<? extends ProcessorType> parent = null;
+ private ProcessorType<? extends ProcessorType> parent;
// else to use an
// optional
@@ -233,10 +233,10 @@
*/
public ProcessorType<? extends ProcessorType> end() {
if (blocks.isEmpty()) {
- if (parent == null) {
+ if (parent == null) {
throw new IllegalArgumentException("Root node with no active block");
- }
- return parent;
+ }
+ return parent;
}
popBlock();
return this;
@@ -745,7 +745,7 @@
}
protected Block popBlock() {
- return blocks.isEmpty() ? null : blocks.removeLast();
+ return blocks.isEmpty() ? null : blocks.removeLast();
}
public Type proceed() {
@@ -1194,11 +1194,11 @@
// -------------------------------------------------------------------------
@XmlTransient
public ProcessorType<? extends ProcessorType> getParent() {
- return parent;
+ return parent;
}
public void setParent(ProcessorType<? extends ProcessorType> parent) {
- this.parent = parent;
+ this.parent = parent;
}
@XmlTransient
@@ -1319,8 +1319,7 @@
protected ErrorHandlerBuilder createErrorHandlerBuilder() {
if (isInheritErrorHandler()) {
return new DeadLetterChannelBuilder();
- }
- else {
+ } else {
return new NoErrorHandlerBuilder();
}
}
@@ -1334,8 +1333,7 @@
configureChild(processorType);
if (blocks.isEmpty()) {
getOutputs().add(processorType);
- }
- else {
+ } else {
Block block = blocks.getLast();
block.addOutput(processorType);
}
@@ -1352,7 +1350,7 @@
}
protected Processor createOutputsProcessor(RouteContext routeContext, Collection<ProcessorType<?>> outputs)
- throws Exception {
+ throws Exception {
List<Processor> list = new ArrayList<Processor>();
for (ProcessorType output : outputs) {
Processor processor = output.createProcessor(routeContext);
@@ -1362,8 +1360,7 @@
if (!list.isEmpty()) {
if (list.size() == 1) {
processor = list.get(0);
- }
- else {
+ } else {
processor = createCompositeProcessor(list);
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyType.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -17,11 +16,11 @@
*/
package org.apache.camel.model;
-import org.apache.camel.processor.RedeliveryPolicy;
-
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.camel.processor.RedeliveryPolicy;
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequencerType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequencerType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequencerType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequencerType.java Mon Mar 24 08:08:24 2008
@@ -24,10 +24,7 @@
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAccessType;
-import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.Expression;
import org.apache.camel.Processor;
@@ -48,9 +45,9 @@
private List<ExpressionType> expressions = new ArrayList<ExpressionType>();
@XmlElementRef
private List<ProcessorType<?>> outputs = new ArrayList<ProcessorType<?>>();
- // Binding annotation at setter
+ // Binding annotation at setter
private BatchResequencerConfig batchConfig;
- // Binding annotation at setter
+ // Binding annotation at setter
private StreamResequencerConfig streamConfig;
@XmlTransient
private List<Expression> expressionList;
@@ -67,27 +64,27 @@
/**
* Configures the stream-based resequencing algorithm using the default
* configuration.
- *
+ *
* @return <code>this</code> instance.
*/
public ResequencerType stream() {
return stream(StreamResequencerConfig.getDefault());
}
-
+
/**
* Configures the batch-based resequencing algorithm using the default
* configuration.
- *
+ *
* @return <code>this</code> instance.
*/
public ResequencerType batch() {
return batch(BatchResequencerConfig.getDefault());
}
-
+
/**
* Configures the stream-based resequencing algorithm using the given
* {@link StreamResequencerConfig}.
- *
+ *
* @return <code>this</code> instance.
*/
public ResequencerType stream(StreamResequencerConfig config) {
@@ -95,11 +92,11 @@
this.batchConfig = null;
return this;
}
-
+
/**
* Configures the batch-based resequencing algorithm using the given
* {@link BatchResequencerConfig}.
- *
+ *
* @return <code>this</code> instance.
*/
public ResequencerType batch(BatchResequencerConfig config) {
@@ -147,17 +144,17 @@
public StreamResequencerConfig getStreamConfig() {
return streamConfig;
}
-
+
//
// TODO: find out how to have these two within an <xsd:choice>
//
-
- @XmlElement(name="batch-config", required=false)
+
+ @XmlElement(name = "batch-config", required = false)
public void setBatchConfig(BatchResequencerConfig batchConfig) {
batch(batchConfig);
}
- @XmlElement(name="stream-config", required=false)
+ @XmlElement(name = "stream-config", required = false)
public void setStreamConfig(StreamResequencerConfig streamConfig) {
stream(streamConfig);
}
@@ -165,7 +162,7 @@
//
// END_TODO
//
-
+
@Override
public Processor createProcessor(RouteContext routeContext) throws Exception {
return createStreamResequencer(routeContext, streamConfig);
@@ -190,28 +187,28 @@
}
};
}
-
- protected Resequencer createBatchResequencer(RouteContext routeContext,
+
+ protected Resequencer createBatchResequencer(RouteContext routeContext,
BatchResequencerConfig config) throws Exception {
Processor processor = routeContext.createProcessor(this);
- Resequencer resequencer = new Resequencer(routeContext.getEndpoint(),
+ Resequencer resequencer = new Resequencer(routeContext.getEndpoint(),
processor, resolveExpressionList(routeContext));
resequencer.setBatchSize(config.getBatchSize());
resequencer.setBatchTimeout(config.getBatchTimeout());
return resequencer;
}
-
- protected StreamResequencer createStreamResequencer(RouteContext routeContext,
+
+ protected StreamResequencer createStreamResequencer(RouteContext routeContext,
StreamResequencerConfig config) throws Exception {
config.getComparator().setExpressions(resolveExpressionList(routeContext));
Processor processor = routeContext.createProcessor(this);
- StreamResequencer resequencer = new StreamResequencer(processor,
+ StreamResequencer resequencer = new StreamResequencer(processor,
config.getComparator(), config.getCapacity());
resequencer.setTimeout(config.getTimeout());
return resequencer;
-
+
}
-
+
private List<Expression> resolveExpressionList(RouteContext routeContext) {
if (expressionList == null) {
expressionList = new ArrayList<Expression>();
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteType.java Mon Mar 24 08:08:24 2008
@@ -16,20 +16,31 @@
*/
package org.apache.camel.model;
-import org.apache.camel.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElementRef;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.Endpoint;
+import org.apache.camel.NoSuchEndpointException;
+import org.apache.camel.Route;
import org.apache.camel.impl.RouteContext;
import org.apache.camel.util.CamelContextHelper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import javax.xml.bind.annotation.*;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
/**
* Represents an XML <route/> element
- *
+ *
* @version $Revision$
*/
@XmlRootElement(name = "route")
@@ -169,7 +180,7 @@
RouteContext routeContext = new RouteContext(this, fromType, routes);
routeContext.getEndpoint(); // force endpoint resolution
if (camelContext != null) {
- camelContext.getLifecycleStrategy().onRouteContextCreate(routeContext);
+ camelContext.getLifecycleStrategy().onRouteContextCreate(routeContext);
}
List<ProcessorType<?>> list = new ArrayList<ProcessorType<?>>(outputs);
@@ -190,7 +201,7 @@
List<InterceptorType> interceptors = getInterceptors();
for (InterceptorType interceptor : interceptors) {
- output.addInterceptor(interceptor);
+ output.addInterceptor(interceptor);
}
/*
List<InterceptorType> list = output.getInterceptors();
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ServiceActivationType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ServiceActivationType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ServiceActivationType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ServiceActivationType.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -17,15 +16,16 @@
*/
package org.apache.camel.model;
-import org.apache.camel.model.language.ExpressionType;
+import java.util.ArrayList;
+import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
-import java.util.ArrayList;
-import java.util.List;
+
+import org.apache.camel.model.language.ExpressionType;
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThreadType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThreadType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThreadType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThreadType.java Mon Mar 24 08:08:24 2008
@@ -41,7 +41,7 @@
@XmlRootElement(name = "thread")
@XmlAccessorType(XmlAccessType.FIELD)
public class ThreadType extends ProcessorType<ProcessorType> {
-
+
@XmlAttribute
private int coreSize = 1;
@XmlAttribute
@@ -68,7 +68,7 @@
public ThreadType() {
}
-
+
public ThreadType(int coreSize) {
this.coreSize = coreSize;
this.maxSize = coreSize;
@@ -77,12 +77,12 @@
public ThreadType(ThreadPoolExecutor executor) {
this.executor = executor;
}
-
+
@Override
public List<ProcessorType<?>> getOutputs() {
return outputs;
}
-
+
@Override
public String toString() {
return "Thread[" + getLabel() + "]";
@@ -90,12 +90,12 @@
@Override
public String getLabel() {
- return "coreSize="+coreSize;
+ return "coreSize=" + coreSize;
}
@Override
public Processor createProcessor(RouteContext routeContext) throws Exception {
-
+
ThreadProcessor thread = new ThreadProcessor();
thread.setExecutor(executor);
thread.setCoreSize(coreSize);
@@ -107,9 +107,9 @@
thread.setStackSize(stackSize);
thread.setTaskQueue(taskQueue);
thread.setThreadGroup(threadGroup);
-
- // TODO: see if we can avoid creating so many nested pipelines
-
+
+ // TODO: see if we can avoid creating so many nested pipelines
+
ArrayList<Processor> pipe = new ArrayList<Processor>(2);
pipe.add(thread);
pipe.add(createOutputsProcessor(routeContext, outputs));
@@ -125,7 +125,7 @@
setCoreSize(coreSize);
return this;
}
-
+
public ThreadType daemon(boolean daemon) {
setDaemon(daemon);
return this;
@@ -145,7 +145,7 @@
setName(name);
return this;
}
-
+
public ThreadType priority(int priority) {
setPriority(priority);
return this;
@@ -165,18 +165,18 @@
setThreadGroup(threadGroup);
return this;
}
-
+
public ThreadType executor(ThreadPoolExecutor executor) {
setExecutor(executor);
return this;
}
-
+
///////////////////////////////////////////////////////////////////
//
// Property Accessors
//
///////////////////////////////////////////////////////////////////
-
+
public void setCoreSize(int coreSize) {
this.coreSize = coreSize;
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrowFaultType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrowFaultType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrowFaultType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrowFaultType.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ToType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ToType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ToType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ToType.java Mon Mar 24 08:08:24 2008
@@ -16,7 +16,6 @@
*/
package org.apache.camel.model;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -25,17 +24,16 @@
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlElementRef;
import org.apache.camel.Endpoint;
import org.apache.camel.Processor;
-import org.apache.camel.util.ObjectHelper;
import org.apache.camel.impl.RouteContext;
import org.apache.camel.processor.SendProcessor;
+import org.apache.camel.util.ObjectHelper;
/**
* Represents an XML <to/> element
- *
+ *
* @version $Revision$
*/
@XmlRootElement(name = "to")
@@ -90,7 +88,7 @@
/**
* Sets the URI of the endpoint to use
- *
+ *
* @param uri the endpoint URI to use
*/
public void setUri(String uri) {
@@ -104,7 +102,7 @@
/**
* Sets the name of the endpoint within the registry (such as the Spring
* ApplicationContext or JNDI) to use
- *
+ *
* @param ref the reference name to use
*/
public void setRef(String ref) {
@@ -129,8 +127,7 @@
public Object getUriOrRef() {
if (ObjectHelper.isNullOrBlank(uri)) {
return uri;
- }
- else if (endpoint != null) {
+ } else if (endpoint != null) {
return endpoint.getEndpointUri();
}
return ref;
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java Mon Mar 24 08:08:24 2008
@@ -86,10 +86,10 @@
@Override
public ProcessorType<? extends ProcessorType> end() {
- popBlock();
- return super.end();
+ popBlock();
+ return super.end();
}
-
+
// Properties
// -------------------------------------------------------------------------
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/UnmarshalType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/UnmarshalType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/UnmarshalType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/UnmarshalType.java Mon Mar 24 08:08:24 2008
@@ -26,12 +26,12 @@
import org.apache.camel.Processor;
import org.apache.camel.impl.RouteContext;
import org.apache.camel.model.dataformat.ArtixDSDataFormat;
+import org.apache.camel.model.dataformat.CsvDataFormat;
import org.apache.camel.model.dataformat.DataFormatType;
import org.apache.camel.model.dataformat.JaxbDataFormat;
import org.apache.camel.model.dataformat.SerializationDataFormat;
-import org.apache.camel.model.dataformat.XMLBeansDataFormat;
import org.apache.camel.model.dataformat.StringDataFormat;
-import org.apache.camel.model.dataformat.CsvDataFormat;
+import org.apache.camel.model.dataformat.XMLBeansDataFormat;
import org.apache.camel.processor.UnmarshalProcessor;
import org.apache.camel.spi.DataFormat;
@@ -72,8 +72,7 @@
public String toString() {
if (dataFormatType != null) {
return "Marshal[" + dataFormatType + "]";
- }
- else {
+ } else {
return "Marshal[ref: " + ref + "]";
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/ArtixDSContentType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/ArtixDSContentType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/ArtixDSContentType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/ArtixDSContentType.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -24,5 +23,5 @@
*/
@XmlEnum(String.class)
public enum ArtixDSContentType {
- Default, Auto, Binary, Text, Java, Xml, Sax, TagValuePair
+ Default, Auto, Binary, Text, Java, Xml, Sax, TagValuePair
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/ArtixDSDataFormat.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/ArtixDSDataFormat.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/ArtixDSDataFormat.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/ArtixDSDataFormat.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/CsvDataFormat.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/CsvDataFormat.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/CsvDataFormat.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/CsvDataFormat.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/DataFormatType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/DataFormatType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/DataFormatType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/DataFormatType.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -44,26 +43,30 @@
@XmlTransient
private String dataFormatTypeName;
+ public DataFormatType() {
+ }
+
+ public DataFormatType(DataFormat dataFormat) {
+ this.dataFormat = dataFormat;
+ }
+
+ protected DataFormatType(String dataFormatTypeName) {
+ this.dataFormatTypeName = dataFormatTypeName;
+ }
+
public static DataFormat getDataFormat(RouteContext routeContext, DataFormatType type, String ref) {
if (type == null) {
notNull(ref, "ref or dataFormatType");
DataFormat dataFormat = routeContext.lookup(ref, DataFormat.class);
if (dataFormat instanceof DataFormatType) {
- type = (DataFormatType) dataFormat;
- }
- else {
+ type = (DataFormatType)dataFormat;
+ } else {
return dataFormat;
}
}
return type.getDataFormat(routeContext);
}
- public DataFormatType() {
- }
-
- public DataFormatType(DataFormat dataFormat) {
- this.dataFormat = dataFormat;
- }
public void marshal(Exchange exchange, Object graph, OutputStream stream) throws Exception {
ObjectHelper.notNull(dataFormat, "dataFormat");
@@ -110,13 +113,11 @@
protected void setProperty(Object bean, String name, Object value) {
try {
IntrospectionSupport.setProperty(bean, name, value);
- }
- catch (Exception e) {
- throw new IllegalArgumentException("Failed to set property " + name + " on " + bean + ". Reason: " + e, e);
+ } catch (Exception e) {
+ throw new IllegalArgumentException("Failed to set property " + name + " on " + bean
+ + ". Reason: " + e, e);
}
}
- protected DataFormatType(String dataFormatTypeName) {
- this.dataFormatTypeName = dataFormatTypeName;
- }
+
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/JaxbDataFormat.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/SerializationDataFormat.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/SerializationDataFormat.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/SerializationDataFormat.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/SerializationDataFormat.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -19,8 +18,8 @@
import javax.xml.bind.annotation.XmlRootElement;
-import org.apache.camel.spi.DataFormat;
import org.apache.camel.impl.RouteContext;
+import org.apache.camel.spi.DataFormat;
/**
* Represents the Java Serialization {@link DataFormat}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/StringDataFormat.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/StringDataFormat.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/StringDataFormat.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/StringDataFormat.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -19,8 +18,8 @@
import javax.xml.bind.annotation.XmlRootElement;
-import org.apache.camel.spi.DataFormat;
import org.apache.camel.impl.RouteContext;
+import org.apache.camel.spi.DataFormat;
/**
* Represents the String (text based) {@link DataFormat}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLBeansDataFormat.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLBeansDataFormat.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLBeansDataFormat.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLBeansDataFormat.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XStreamDataFormat.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XStreamDataFormat.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XStreamDataFormat.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XStreamDataFormat.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/ExpressionType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/ExpressionType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/ExpressionType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/ExpressionType.java Mon Mar 24 08:08:24 2008
@@ -60,14 +60,6 @@
@XmlTransient
private ExpressionType expressionType;
- public static String getLabel(List<ExpressionType> expressions) {
- CollectionStringBuffer buffer = new CollectionStringBuffer();
- for (ExpressionType expression : expressions) {
- buffer.append(expression.getLabel());
- }
- return buffer.toString();
- }
-
public ExpressionType() {
}
@@ -83,6 +75,14 @@
this.expressionValue = expression;
}
+ public static String getLabel(List<ExpressionType> expressions) {
+ CollectionStringBuffer buffer = new CollectionStringBuffer();
+ for (ExpressionType expression : expressions) {
+ buffer.append(expression.getLabel());
+ }
+ return buffer.toString();
+ }
+
@Override
public String toString() {
return getLanguage() + "Expression[" + getExpression() + "]";
@@ -120,8 +120,7 @@
if (predicate == null) {
if (expressionType != null) {
predicate = expressionType.createPredicate(routeContext);
- }
- else {
+ } else {
CamelContext camelContext = routeContext.getCamelContext();
Language language = camelContext.resolveLanguage(getLanguage());
predicate = language.createPredicate(getExpression());
@@ -135,8 +134,7 @@
if (expressionValue == null) {
if (expressionType != null) {
expressionValue = expressionType.createExpression(routeContext);
- }
- else {
+ } else {
CamelContext camelContext = routeContext.getCamelContext();
Language language = camelContext.resolveLanguage(getLanguage());
expressionValue = language.createExpression(getExpression());
@@ -200,8 +198,7 @@
if (expressionValue != null) {
return expressionValue.toString();
}
- }
- else {
+ } else {
return language;
}
return "";
@@ -229,9 +226,9 @@
protected void setProperty(Object bean, String name, Object value) {
try {
IntrospectionSupport.setProperty(bean, name, value);
- }
- catch (Exception e) {
- throw new IllegalArgumentException("Failed to set property " + name + " on " + bean + ". Reason: " + e, e);
+ } catch (Exception e) {
+ throw new IllegalArgumentException("Failed to set property " + name + " on " + bean
+ + ". Reason: " + e, e);
}
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/MethodCallExpression.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/MethodCallExpression.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/MethodCallExpression.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/MethodCallExpression.java Mon Mar 24 08:08:24 2008
@@ -19,8 +19,8 @@
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
-import org.apache.camel.Expression;
import org.apache.camel.Exchange;
+import org.apache.camel.Expression;
import org.apache.camel.Predicate;
import org.apache.camel.impl.RouteContext;
import org.apache.camel.language.bean.BeanExpression;
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/NamespaceAwareExpression.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/NamespaceAwareExpression.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/NamespaceAwareExpression.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/NamespaceAwareExpression.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -31,7 +30,7 @@
/**
* A useful base class for any expression which may be namespace or XML content aware
* such as {@link XPathExpression} or {@link XQueryExpression}
- *
+ *
* @version $Revision$
*/
@XmlAccessorType(XmlAccessType.FIELD)
@@ -56,7 +55,7 @@
*
* @param namespaces the XML namespaces with the key of prefixes and the value the URIs
*/
- public void setNamespaces(Map<String,String> namespaces) {
+ public void setNamespaces(Map<String, String> namespaces) {
this.namespaces = namespaces;
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/XQueryExpression.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/XQueryExpression.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/XQueryExpression.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/XQueryExpression.java Mon Mar 24 08:08:24 2008
@@ -38,10 +38,10 @@
@XmlAccessorType(XmlAccessType.FIELD)
public class XQueryExpression extends NamespaceAwareExpression {
private static final transient Log LOG = LogFactory.getLog(XQueryExpression.class);
-
+
@XmlAttribute(required = false)
private String type;
- @XmlTransient
+ @XmlTransient
private Class resultType;
public XQueryExpression() {
@@ -88,14 +88,14 @@
setProperty(predicate, "resultType", resultType);
}
}
-
+
private void updateResultType() {
- if (resultType == null && type != null) {
- try {
- resultType = Class.forName(type);
- } catch (ClassNotFoundException e) {
- LOG.error("ClassNotFoundException creating class: " + type);
- }
- }
+ if (resultType == null && type != null) {
+ try {
+ resultType = Class.forName(type);
+ } catch (ClassNotFoundException e) {
+ LOG.error("ClassNotFoundException creating class: " + type);
+ }
+ }
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/LoadBalancerType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/LoadBalancerType.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/LoadBalancerType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/LoadBalancerType.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -17,7 +16,7 @@
*/
package org.apache.camel.model.loadbalancer;
-import static org.apache.camel.util.ObjectHelper.notNull;
+
import java.util.List;
@@ -33,6 +32,7 @@
import org.apache.camel.processor.loadbalancer.LoadBalancer;
import org.apache.camel.util.IntrospectionSupport;
import org.apache.camel.util.ObjectHelper;
+import static org.apache.camel.util.ObjectHelper.notNull;
@XmlType(name = "loadBalancerType")
@XmlAccessorType(XmlAccessType.FIELD)
@@ -42,50 +42,50 @@
private LoadBalancer loadBalancer;
@XmlTransient
private String loadBalancerTypeName;
-
+
+ public LoadBalancerType() {
+ }
+
+ public LoadBalancerType(LoadBalancer loadBalancer) {
+ this.loadBalancer = loadBalancer;
+ }
+
+ protected LoadBalancerType(String loadBalancerTypeName) {
+ this.loadBalancerTypeName = loadBalancerTypeName;
+ }
+
public static LoadBalancer getLoadBalancer(RouteContext routeContext, LoadBalancerType type, String ref) {
if (type == null) {
notNull(ref, "ref or LoadBalancerType");
LoadBalancer loadBalancer = routeContext.lookup(ref, LoadBalancer.class);
if (loadBalancer instanceof LoadBalancerType) {
type = (LoadBalancerType) loadBalancer;
- }
- else {
+ } else {
return loadBalancer;
}
}
return type.getLoadBalancer(routeContext);
}
-
- public LoadBalancerType () {
- }
-
- public LoadBalancerType(LoadBalancer loadBalancer) {
- this.loadBalancer = loadBalancer;
- }
-
- protected LoadBalancerType(String loadBalancerTypeName) {
- this.loadBalancerTypeName = loadBalancerTypeName;
- }
-
+
+
/**
* Sets a named property on the data format instance using introspection
*/
protected void setProperty(Object bean, String name, Object value) {
try {
IntrospectionSupport.setProperty(bean, name, value);
- }
- catch (Exception e) {
- throw new IllegalArgumentException("Failed to set property " + name + " on " + bean + ". Reason: " + e, e);
+ } catch (Exception e) {
+ throw new IllegalArgumentException("Failed to set property " + name + " on " + bean
+ + ". Reason: " + e, e);
}
}
-
+
/**
* Allows derived classes to customize the load balancer
*/
protected void configureLoadBalancer(LoadBalancer loadBalancer) {
}
-
+
public LoadBalancer getLoadBalancer(RouteContext routeContext) {
if (loadBalancer == null) {
loadBalancer = createLoadBalancer(routeContext);
@@ -109,7 +109,7 @@
return null;
}
-
+
public void addProcessor(Processor processor) {
ObjectHelper.notNull(loadBalancer, "loadBalancer");
loadBalancer.addProcessor(processor);
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RandomLoadBalanceStrategy.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RandomLoadBalanceStrategy.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RandomLoadBalanceStrategy.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RandomLoadBalanceStrategy.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -25,9 +24,9 @@
@XmlRootElement(name = "random")
public class RandomLoadBalanceStrategy extends LoadBalancerType {
-
+
@Override
- protected LoadBalancer createLoadBalancer (RouteContext routeContext) {
+ protected LoadBalancer createLoadBalancer(RouteContext routeContext) {
return new org.apache.camel.processor.loadbalancer.RandomLoadBalancer();
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RoundRobinLoadBalanceStrategy.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RoundRobinLoadBalanceStrategy.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RoundRobinLoadBalanceStrategy.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RoundRobinLoadBalanceStrategy.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -23,10 +22,10 @@
import org.apache.camel.processor.loadbalancer.LoadBalancer;
@XmlRootElement(name = "roundRobin")
-public class RoundRobinLoadBalanceStrategy extends LoadBalancerType{
-
+public class RoundRobinLoadBalanceStrategy extends LoadBalancerType {
+
@Override
- protected LoadBalancer createLoadBalancer (RouteContext routeContext) {
+ protected LoadBalancer createLoadBalancer(RouteContext routeContext) {
return new org.apache.camel.processor.loadbalancer.RoundRobinLoadBalancer();
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/StickyLoadBalanceStrategy.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/StickyLoadBalanceStrategy.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/StickyLoadBalanceStrategy.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/StickyLoadBalanceStrategy.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -35,38 +34,38 @@
private ExpressionType expressionType;
@XmlElement(required = false, name = "loadBalancer", type = ExpressionType.class)
private LoadBalancerType loadBalancerType;
-
+
public StickyLoadBalanceStrategy() {
super("org.apache.camel.processor.loadbalancer.StickyLoadBalancer");
}
-
+
public StickyLoadBalanceStrategy(ExpressionType expressionType) {
this();
this.expressionType = expressionType;
}
-
+
public StickyLoadBalanceStrategy(ExpressionType expressionType, LoadBalancerType loadBalancerTyep) {
this();
this.expressionType = expressionType;
this.loadBalancerType = loadBalancerType;
}
-
+
public void setExpressionType(ExpressionType expressionType) {
this.expressionType = expressionType;
}
-
+
public ExpressionType getExpressionType() {
return expressionType;
}
-
+
public void setLoadBalancerType(LoadBalancerType loadBalancerType) {
this.loadBalancerType = loadBalancerType;
}
-
+
public LoadBalancerType getLoadBalancerType() {
return loadBalancerType;
}
-
+
@Override
protected void configureLoadBalancer(LoadBalancer loadBalancer) {
ExpressionType expression = getExpressionType();
@@ -78,9 +77,9 @@
setProperty(loadBalancer, "loadBalancer", type);
}
}
-
+
@Override
public String toString() {
- return "StickyLoadBalanceStrategy[" + expressionType + ", " + loadBalancerType + "]";
+ return "StickyLoadBalanceStrategy[" + expressionType + ", " + loadBalancerType + "]";
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/TopicLoadBalanceStrategy.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/TopicLoadBalanceStrategy.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/TopicLoadBalanceStrategy.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/TopicLoadBalanceStrategy.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -25,7 +24,7 @@
@XmlRootElement(name = "topic")
public class TopicLoadBalanceStrategy extends LoadBalancerType {
@Override
- protected LoadBalancer createLoadBalancer (RouteContext routeContext) {
+ protected LoadBalancer createLoadBalancer(RouteContext routeContext) {
return new org.apache.camel.processor.loadbalancer.TopicLoadBalancer();
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Aggregator.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Aggregator.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Aggregator.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Aggregator.java Mon Mar 24 08:08:24 2008
@@ -30,14 +30,14 @@
* pattern where a batch of messages are processed (up to a maximum amount or
* until some timeout is reached) and messages for the same correlation key are
* combined together using some kind of
- * {@link AggregationStrategy ) (by default the latest message is used) to compress
+ * {@link AggregationStrategy ) (by default the latest message is used) to compress
* many message exchanges * into a smaller number of exchanges. <p/> A good
* example of this is stock market data; you may be receiving 30,000
* messages/second and you may want to throttle it right down so that multiple
* messages for the same stock are combined (or just the latest message is used
* and older prices are discarded). Another idea is to combine line item
* messages together into a single invoice message.
- *
+ *
* @version $Revision$
* @param correlationExpression the expression used to calculate the correlation
* key. For a JMS message this could be the expression
@@ -72,7 +72,7 @@
if (aggregationCompletedPredicate != null) {
if (getCollection().size() > 0) {
return true;
- };
+ }
}
return super.isBatchCompleted(index);
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java Mon Mar 24 08:08:24 2008
@@ -35,7 +35,7 @@
* href="http://activemq.apache.org/camel/dead-letter-channel.html">Dead Letter
* Channel</a> after attempting to redeliver the message using the
* {@link RedeliveryPolicy}
- *
+ *
* @version $Revision$
*/
public class DeadLetterChannel extends ErrorHandlerSupport implements AsyncProcessor {
@@ -54,7 +54,7 @@
}
private static final transient Log LOG = LogFactory.getLog(DeadLetterChannel.class);
- private static final String FAILURE_HANDLED_PROPERTY = DeadLetterChannel.class.getName()+".FAILURE_HANDLED";
+ private static final String FAILURE_HANDLED_PROPERTY = DeadLetterChannel.class.getName() + ".FAILURE_HANDLED";
private Processor output;
private Processor deadLetter;
private AsyncProcessor outputAsync;
@@ -67,9 +67,9 @@
public DeadLetterChannel(Processor output, Processor deadLetter, RedeliveryPolicy redeliveryPolicy, Logger logger) {
this.deadLetter = deadLetter;
- this.output = output;
+ this.output = output;
this.outputAsync = AsyncProcessorTypeConverter.convert(output);
-
+
this.redeliveryPolicy = redeliveryPolicy;
this.logger = logger;
}
@@ -90,7 +90,7 @@
public boolean process(final Exchange exchange, final AsyncCallback callback, final RedeliveryData data) {
while (true) {
-
+
// We can't keep retrying if the route is being shutdown.
if (!isRunAllowed()) {
if (exchange.getException() == null) {
@@ -99,11 +99,11 @@
callback.done(data.sync);
return data.sync;
}
-
+
if (exchange.getException() != null) {
Throwable e = exchange.getException();
exchange.setException(null); // Reset it since we are handling it.
-
+
logger.log("Failed delivery for exchangeId: " + exchange.getExchangeId() + ". On delivery attempt: " + data.redeliveryCounter + " caught: " + e, e);
data.redeliveryCounter = incrementRedeliveryCounter(exchange, e);
@@ -126,8 +126,8 @@
callback.done(data.sync);
}
});
-
- restoreExceptionOnExchange(exchange);
+
+ restoreExceptionOnExchange(exchange);
logger.log("Failed delivery for exchangeId: " + exchange.getExchangeId() + ". Handled by the failure processor: " + data.failureProcessor);
return sync;
}
@@ -167,7 +167,7 @@
}
}
-
+
public static boolean isFailureHandled(Exchange exchange) {
return exchange.getProperty(FAILURE_HANDLED_PROPERTY) != null;
}
@@ -180,13 +180,13 @@
exchange.setException(exchange.getProperty(FAILURE_HANDLED_PROPERTY, Throwable.class));
exchange.removeProperty(FAILURE_HANDLED_PROPERTY);
}
-
+
}
public static void restoreExceptionOnExchange(Exchange exchange) {
exchange.setException(exchange.getProperty(FAILURE_HANDLED_PROPERTY, Throwable.class));
}
-
+
public void process(Exchange exchange) throws Exception {
AsyncProcessorHelper.process(this, exchange);
}