You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ch...@apache.org on 2007/08/07 20:36:08 UTC
svn commit: r563607 [6/12] - in /activemq/camel/trunk/camel-core/src:
main/java/org/apache/camel/ main/java/org/apache/camel/builder/
main/java/org/apache/camel/builder/xml/
main/java/org/apache/camel/component/bean/
main/java/org/apache/camel/componen...
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ProcessorEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ProcessorEndpoint.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ProcessorEndpoint.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ProcessorEndpoint.java Tue Aug 7 11:35:48 2007
@@ -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,
@@ -26,7 +25,8 @@
/**
* An endpoint which allows exchanges to be sent into it which just invokes a
- * given {@link Processor}. This component does not support the use of consumers.
+ * given {@link Processor}. This component does not support the use of
+ * consumers.
*
* @version $Revision: 1.1 $
*/
@@ -67,7 +67,7 @@
processor.process(exchange);
}
- public boolean isSingleton() {
- return true;
- }
+ public boolean isSingleton() {
+ return true;
+ }
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ReflectionInjector.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ReflectionInjector.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ReflectionInjector.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ReflectionInjector.java Tue Aug 7 11:35:48 2007
@@ -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,
@@ -21,21 +20,20 @@
import org.apache.camel.spi.Injector;
/**
- * A simple implementation of {@link Injector} which just uses reflection to instantiate new objects
- * using their zero argument constructor. For more complex implementations try the Spring or Guice implementations.
- *
+ * A simple implementation of {@link Injector} which just uses reflection to
+ * instantiate new objects using their zero argument constructor. For more
+ * complex implementations try the Spring or Guice implementations.
+ *
* @version $Revision$
*/
public class ReflectionInjector implements Injector {
-
+
public <T> T newInstance(Class<T> type) {
try {
return type.newInstance();
- }
- catch (InstantiationException e) {
+ } catch (InstantiationException e) {
throw new RuntimeCamelException(e.getCause());
- }
- catch (IllegalAccessException e) {
+ } catch (IllegalAccessException e) {
throw new RuntimeCamelException(e);
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteContext.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteContext.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteContext.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteContext.java Tue Aug 7 11:35:48 2007
@@ -1,4 +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.
@@ -16,6 +16,10 @@
*/
package org.apache.camel.impl;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.NoSuchEndpointException;
@@ -26,13 +30,9 @@
import org.apache.camel.model.RouteType;
import org.apache.camel.processor.Pipeline;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
/**
* The context used to activate new routing rules
- *
+ *
* @version $Revision: $
*/
public class RouteContext {
@@ -94,8 +94,7 @@
}
if (endpoint == null) {
throw new IllegalArgumentException("Either 'uri' or 'ref' must be specified on: " + this);
- }
- else {
+ } else {
return endpoint;
}
}
@@ -108,11 +107,12 @@
}
/**
- * Lets complete the route creation, creating a single event driven route for the current from endpoint
- * with any processors required
+ * Lets complete the route creation, creating a single event driven route
+ * for the current from endpoint with any processors required
*/
public void commit() {
- // now lets turn all of the event driven consumer processors into a single route
+ // now lets turn all of the event driven consumer processors into a
+ // single route
if (!eventDrivenProcessors.isEmpty()) {
Processor processor = Pipeline.newInstance(eventDrivenProcessors);
routes.add(new EventDrivenConsumerRoute(getEndpoint(), processor));
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java Tue Aug 7 11:35:48 2007
@@ -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,24 +16,25 @@
*/
package org.apache.camel.impl;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-
/**
* A useful base class for any consumer which is polling based
- *
+ *
* @version $Revision$
*/
-public abstract class ScheduledPollConsumer<E extends Exchange> extends DefaultConsumer<E> implements Runnable {
- private static final transient Log log = LogFactory.getLog(ScheduledPollConsumer.class);
-
+public abstract class ScheduledPollConsumer<E extends Exchange> extends DefaultConsumer<E> implements
+ Runnable {
+ private static final transient Log LOG = LogFactory.getLog(ScheduledPollConsumer.class);
+
private final ScheduledExecutorService executor;
private long initialDelay = 1000;
private long delay = 500;
@@ -58,17 +58,16 @@
* Invoked whenever we should be polled
*/
public void run() {
- log.debug("Starting to poll");
+ LOG.debug("Starting to poll");
try {
poll();
- }
- catch (Exception e) {
- log.warn("Caught: " + e, e);
+ } catch (Exception e) {
+ LOG.warn("Caught: " + e, e);
}
}
// Properties
- //-------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
public long getInitialDelay() {
return initialDelay;
}
@@ -102,11 +101,11 @@
}
// Implementation methods
- //-------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
/**
* The polling method which is invoked periodically to poll this consumer
- *
+ *
* @throws Exception
*/
protected abstract void poll() throws Exception;
@@ -116,8 +115,7 @@
super.doStart();
if (isUseFixedDelay()) {
future = executor.scheduleWithFixedDelay(this, getInitialDelay(), getDelay(), getTimeUnit());
- }
- else {
+ } else {
future = executor.scheduleAtFixedRate(this, getInitialDelay(), getDelay(), getTimeUnit());
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java Tue Aug 7 11:35:48 2007
@@ -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,13 +16,12 @@
*/
package org.apache.camel.impl;
-import org.apache.camel.Exchange;
-import org.apache.camel.Endpoint;
+import java.util.Map;
+
import org.apache.camel.Component;
import org.apache.camel.Consumer;
+import org.apache.camel.Exchange;
import org.apache.camel.util.IntrospectionSupport;
-
-import java.util.Map;
/**
* A base class for {@link Endpoint} which creates a {@link ScheduledPollConsumer}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ServiceSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ServiceSupport.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ServiceSupport.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ServiceSupport.java Tue Aug 7 11:35:48 2007
@@ -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,
@@ -22,16 +21,17 @@
import org.apache.camel.Service;
/**
- * A useful base class which ensures that a service is only initialized once and provides some helper methods for
- * enquiring of its status
+ * A useful base class which ensures that a service is only initialized once and
+ * provides some helper methods for enquiring of its status
*
* @version $Revision$
*/
public abstract class ServiceSupport implements Service {
+ private static int threadCounter;
+
private AtomicBoolean started = new AtomicBoolean(false);
private AtomicBoolean stopping = new AtomicBoolean(false);
private AtomicBoolean stopped = new AtomicBoolean(false);
- private static int threadCounter;
public void start() throws Exception {
if (started.compareAndSet(false, true)) {
@@ -43,8 +43,7 @@
if (started.get() && stopping.compareAndSet(false, true)) {
try {
doStop();
- }
- finally {
+ } finally {
stopped.set(true);
started.set(false);
stopping.set(false);
@@ -66,7 +65,6 @@
return stopping.get();
}
-
/**
* @return true if this service is closed
*/
@@ -75,7 +73,7 @@
}
protected abstract void doStart() throws Exception;
-
+
protected abstract void doStop() throws Exception;
/**
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java Tue Aug 7 11:35:48 2007
@@ -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,33 +16,37 @@
*/
package org.apache.camel.impl.converter;
-import org.apache.camel.Converter;
-import org.apache.camel.impl.CachingInjector;
-import org.apache.camel.util.ResolverUtil;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Method;
-import static java.lang.reflect.Modifier.*;
import java.net.URL;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
+import static java.lang.reflect.Modifier.isAbstract;
+import static java.lang.reflect.Modifier.isPublic;
+import static java.lang.reflect.Modifier.isStatic;
+
+import org.apache.camel.Converter;
+import org.apache.camel.impl.CachingInjector;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.util.ResolverUtil;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
/**
* A class which will auto-discover converter objects and methods to pre-load
* the registry of converters on startup
- *
+ *
* @version $Revision$
*/
public class AnnotationTypeConverterLoader implements TypeConverterLoader {
public static final String META_INF_SERVICES = "META-INF/services/org/apache/camel/TypeConverter";
- private static final transient Log log = LogFactory.getLog(AnnotationTypeConverterLoader.class);
+ private static final transient Log LOG = LogFactory.getLog(AnnotationTypeConverterLoader.class);
private ResolverUtil resolver = new ResolverUtil();
private Set<Class> visitedClasses = new HashSet<Class>();
@@ -52,17 +55,19 @@
resolver.findAnnotated(Converter.class, packageNames);
Set<Class> classes = resolver.getClasses();
for (Class type : classes) {
- if (log.isDebugEnabled()) {
- log.debug("Loading converter class: " + ObjectHelper.name(type));
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Loading converter class: " + ObjectHelper.name(type));
}
loadConverterMethods(registry, type);
}
}
/**
- * Finds the names of the packages to search for on the classpath looking for text files on the classpath
- * at the @{link #META_INF_SERVICES} location
- *
+ * Finds the names of the packages to search for on the classpath looking
+ * for text files on the classpath at the
+ *
+ * @{link #META_INF_SERVICES} location
+ *
* @return a collection of packages to search for
* @throws IOException
*/
@@ -91,13 +96,11 @@
}
tokenize(packages, line);
}
- }
- finally {
+ } finally {
try {
reader.close();
- }
- catch (IOException e) {
- log.warn("Caught exception closing stream: " + e, e);
+ } catch (IOException e) {
+ LOG.warn("Caught exception closing stream: " + e, e);
}
}
}
@@ -105,7 +108,8 @@
}
/**
- * Tokenizes the line from the META-IN/services file using commas and ignoring whitespace between packages
+ * Tokenizes the line from the META-IN/services file using commas and
+ * ignoring whitespace between packages
*/
protected void tokenize(Set<String> packages, String line) {
StringTokenizer iter = new StringTokenizer(line, ",");
@@ -133,31 +137,29 @@
if (annotation != null) {
Class<?>[] parameterTypes = method.getParameterTypes();
if (parameterTypes == null || parameterTypes.length != 1) {
- log.warn("Ignoring bad converter on type: " + type.getName()
- + " method: " + method + " as a converter method should have one parameter");
- }
- else {
+ LOG.warn("Ignoring bad converter on type: " + type.getName() + " method: " + method
+ + " as a converter method should have one parameter");
+ } else {
int modifiers = method.getModifiers();
if (isAbstract(modifiers) || !isPublic(modifiers)) {
- log.warn("Ignoring bad converter on type: " + type.getName()
- + " method: " + method + " as a converter method is not a public and concrete method");
- }
- else {
+ LOG.warn("Ignoring bad converter on type: " + type.getName() + " method: " + method
+ + " as a converter method is not a public and concrete method");
+ } else {
Class toType = method.getReturnType();
if (toType.equals(Void.class)) {
- log.warn("Ignoring bad converter on type: " + type.getName()
- + " method: " + method + " as a converter method returns a void method");
- }
- else {
+ LOG.warn("Ignoring bad converter on type: " + type.getName() + " method: "
+ + method + " as a converter method returns a void method");
+ } else {
Class fromType = parameterTypes[0];
if (isStatic(modifiers)) {
- registry.addTypeConverter(toType, fromType, new StaticMethodTypeConverter(method));
- }
- else {
+ registry.addTypeConverter(toType, fromType,
+ new StaticMethodTypeConverter(method));
+ } else {
if (injector == null) {
injector = new CachingInjector(registry, type);
}
- registry.addTypeConverter(toType, fromType, new InstanceMethodTypeConverter(injector, method));
+ registry.addTypeConverter(toType, fromType,
+ new InstanceMethodTypeConverter(injector, method));
}
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/ArrayTypeConverter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/ArrayTypeConverter.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/ArrayTypeConverter.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/ArrayTypeConverter.java Tue Aug 7 11:35:48 2007
@@ -1,4 +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.
@@ -16,58 +16,55 @@
*/
package org.apache.camel.impl.converter;
-import org.apache.camel.TypeConverter;
-
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
+import org.apache.camel.TypeConverter;
+
/**
- * A type converter which is used to convert to and from array types particularly for derived types of array
- * component types and dealing with primitive array types.
- *
+ * A type converter which is used to convert to and from array types
+ * particularly for derived types of array component types and dealing with
+ * primitive array types.
+ *
* @version $Revision: $
*/
public class ArrayTypeConverter implements TypeConverter {
public <T> T convertTo(Class<T> type, Object value) {
if (type.isArray()) {
if (value instanceof Collection) {
- Collection collection = (Collection) value;
+ Collection collection = (Collection)value;
Object array = Array.newInstance(type.getComponentType(), collection.size());
if (array instanceof Object[]) {
- collection.toArray((Object[]) array);
- }
- else {
+ collection.toArray((Object[])array);
+ } else {
int index = 0;
for (Object element : collection) {
Array.set(array, index++, element);
}
}
- return (T) array;
- }
- else if (value != null && value.getClass().isArray()) {
+ return (T)array;
+ } else if (value != null && value.getClass().isArray()) {
int size = Array.getLength(value);
Object answer = Array.newInstance(type.getComponentType(), size);
for (int i = 0; i < size; i++) {
Array.set(answer, i, Array.get(value, i));
}
- return (T) answer;
+ return (T)answer;
}
- }
- else if (Collection.class.isAssignableFrom(type)) {
+ } else if (Collection.class.isAssignableFrom(type)) {
if (value != null) {
if (value instanceof Object[]) {
- return (T) Arrays.asList((Object[]) value);
- }
- else if (value.getClass().isArray()) {
+ return (T)Arrays.asList((Object[])value);
+ } else if (value.getClass().isArray()) {
int size = Array.getLength(value);
List answer = new ArrayList(size);
for (int i = 0; i < size; i++) {
answer.add(Array.get(value, i));
}
- return (T) answer;
+ return (T)answer;
}
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/DefaultTypeConverter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/DefaultTypeConverter.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/DefaultTypeConverter.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/DefaultTypeConverter.java Tue Aug 7 11:35:48 2007
@@ -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,6 +16,13 @@
*/
package org.apache.camel.impl.converter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
import org.apache.camel.RuntimeCamelException;
import org.apache.camel.TypeConverter;
import org.apache.camel.spi.Injector;
@@ -27,18 +33,11 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
/**
* @version $Revision$
*/
public class DefaultTypeConverter implements TypeConverter, TypeConverterRegistry {
- private static final transient Log log = LogFactory.getLog(DefaultTypeConverter.class);
+ private static final transient Log LOG = LogFactory.getLog(DefaultTypeConverter.class);
private Map<TypeMapping, TypeConverter> typeMappings = new HashMap<TypeMapping, TypeConverter>();
private Injector injector;
private List<TypeConverterLoader> typeConverterLoaders = new ArrayList<TypeConverterLoader>();
@@ -56,11 +55,10 @@
public <T> T convertTo(Class<T> toType, Object value) {
if (toType.isInstance(value)) {
return toType.cast(value);
- }
- else if (toType.isPrimitive()) {
+ } else if (toType.isPrimitive()) {
Class primitiveType = ObjectHelper.convertPrimitiveTypeToWrapperType(toType);
if (primitiveType != toType) {
- return (T) convertTo(primitiveType, value);
+ return (T)convertTo(primitiveType, value);
}
}
checkLoaded();
@@ -76,9 +74,10 @@
}
}
- // lets avoid NullPointerException when converting to boolean for null values
+ // lets avoid NullPointerException when converting to boolean for null
+ // values
if (boolean.class.isAssignableFrom(toType)) {
- return (T) Boolean.FALSE;
+ return (T)Boolean.FALSE;
}
return null;
@@ -89,7 +88,7 @@
synchronized (typeMappings) {
TypeConverter converter = typeMappings.get(key);
if (converter != null) {
- log.warn("Overriding type converter from: " + converter + " to: " + typeConverter);
+ LOG.warn("Overriding type converter from: " + converter + " to: " + typeConverter);
}
typeMappings.put(key, typeConverter);
}
@@ -98,7 +97,7 @@
public void addFallbackConverter(TypeConverter converter) {
fallbackConverters.add(converter);
if (converter instanceof TypeConverterAware) {
- TypeConverterAware typeConverterAware = (TypeConverterAware) converter;
+ TypeConverterAware typeConverterAware = (TypeConverterAware)converter;
typeConverterAware.setTypeConverter(this);
}
}
@@ -163,7 +162,8 @@
// lets test for arrays
if (fromType.isArray() && !fromType.getComponentType().isPrimitive()) {
- // TODO can we try walking the inheritence-tree for the element types?
+ // TODO can we try walking the inheritence-tree for the element
+ // types?
if (!fromType.equals(Object[].class)) {
fromSuperClass = Object[].class;
@@ -210,12 +210,10 @@
// lets try load any other failback converters
try {
loadFallbackTypeConverters();
- }
- catch (NoFactoryAvailableException e) {
+ } catch (NoFactoryAvailableException e) {
// ignore its fine to have none
}
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new RuntimeCamelException(e);
}
}
@@ -223,9 +221,10 @@
protected void loadFallbackTypeConverters() throws IOException, ClassNotFoundException {
FactoryFinder finder = new FactoryFinder();
- List<TypeConverter> converters = finder.newInstances("FallbackTypeConverter", getInjector(), TypeConverter.class);
+ List<TypeConverter> converters = finder.newInstances("FallbackTypeConverter", getInjector(),
+ TypeConverter.class);
for (TypeConverter converter : converters) {
- addFallbackConverter(converter);
+ addFallbackConverter(converter);
}
}
@@ -252,8 +251,9 @@
@Override
public boolean equals(Object object) {
if (object instanceof TypeMapping) {
- TypeMapping that = (TypeMapping) object;
- return ObjectHelper.equals(this.fromType, that.fromType) && ObjectHelper.equals(this.toType, that.toType);
+ TypeMapping that = (TypeMapping)object;
+ return ObjectHelper.equals(this.fromType, that.fromType)
+ && ObjectHelper.equals(this.toType, that.toType);
}
return false;
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/InstanceMethodTypeConverter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/InstanceMethodTypeConverter.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/InstanceMethodTypeConverter.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/InstanceMethodTypeConverter.java Tue Aug 7 11:35:48 2007
@@ -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,13 +16,12 @@
*/
package org.apache.camel.impl.converter;
+import java.lang.reflect.Method;
+
import org.apache.camel.RuntimeCamelException;
import org.apache.camel.TypeConverter;
-import org.apache.camel.util.ObjectHelper;
import org.apache.camel.impl.CachingInjector;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
+import org.apache.camel.util.ObjectHelper;
/**
* A {@link TypeConverter} implementation which instantiates an object
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/PropertyEditorTypeConverter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/PropertyEditorTypeConverter.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/PropertyEditorTypeConverter.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/PropertyEditorTypeConverter.java Tue Aug 7 11:35:48 2007
@@ -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,42 +22,44 @@
import org.apache.camel.TypeConverter;
/**
- * Uses the java.beans.PropertyEditor conversion system to convert Objects to and from String values.
+ * Uses the java.beans.PropertyEditor conversion system to convert Objects to
+ * and from String values.
*
* @version $Revision: 523731 $
*/
public class PropertyEditorTypeConverter implements TypeConverter {
-
-
- public <T> T convertTo(Class<T> toType, Object value) {
-
- // We can't convert null values since we can't figure out a property editor for it.
- if( value == null )
- return null;
-
- if( value.getClass() == String.class ) {
-
- // No conversion needed.
- if( toType == String.class ) {
- return toType.cast(value);
- }
-
- PropertyEditor editor = PropertyEditorManager.findEditor(toType);
- if( editor != null ) {
- editor.setAsText(value.toString());
- return toType.cast(editor.getValue());
- }
-
- } else if( toType == String.class ) {
-
- PropertyEditor editor = PropertyEditorManager.findEditor(value.getClass());
- if( editor != null ) {
- editor.setValue(value);
- return toType.cast(editor.getAsText());
- }
-
- }
+
+ public <T> T convertTo(Class<T> toType, Object value) {
+
+ // We can't convert null values since we can't figure out a property
+ // editor for it.
+ if (value == null) {
+ return null;
+ }
+
+ if (value.getClass() == String.class) {
+
+ // No conversion needed.
+ if (toType == String.class) {
+ return toType.cast(value);
+ }
+
+ PropertyEditor editor = PropertyEditorManager.findEditor(toType);
+ if (editor != null) {
+ editor.setAsText(value.toString());
+ return toType.cast(editor.getValue());
+ }
+
+ } else if (toType == String.class) {
+
+ PropertyEditor editor = PropertyEditorManager.findEditor(value.getClass());
+ if (editor != null) {
+ editor.setValue(value);
+ return toType.cast(editor.getAsText());
+ }
+
+ }
return null;
- }
+ }
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/StaticMethodTypeConverter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/StaticMethodTypeConverter.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/StaticMethodTypeConverter.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/StaticMethodTypeConverter.java Tue Aug 7 11:35:48 2007
@@ -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,10 @@
*/
package org.apache.camel.impl.converter;
+import java.lang.reflect.Method;
+
import org.apache.camel.TypeConverter;
-import org.apache.camel.RuntimeCamelException;
import org.apache.camel.util.ObjectHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
/**
* A {@link TypeConverter} implementation which invokes a static method to convert from a type to another type
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/ToStringTypeConverter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/ToStringTypeConverter.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/ToStringTypeConverter.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/ToStringTypeConverter.java Tue Aug 7 11:35:48 2007
@@ -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,
@@ -20,20 +19,20 @@
import org.apache.camel.TypeConverter;
/**
- * A simple converter that can convert any object to a String type by using the toString() method of the
- * object.
+ * A simple converter that can convert any object to a String type by using the
+ * toString() method of the object.
*
* @version $Revision: 523731 $
*/
public class ToStringTypeConverter implements TypeConverter {
- public <T> T convertTo(Class<T> toType, Object value) {
+ public <T> T convertTo(Class<T> toType, Object value) {
if (value != null) {
if (toType.equals(String.class)) {
- return (T) value.toString();
+ return (T)value.toString();
}
}
return null;
- }
+ }
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/TypeConverterLoader.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/TypeConverterLoader.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/TypeConverterLoader.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/TypeConverterLoader.java Tue Aug 7 11:35:48 2007
@@ -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/impl/converter/TypeConverterRegistry.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/TypeConverterRegistry.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/TypeConverterRegistry.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/TypeConverterRegistry.java Tue Aug 7 11:35:48 2007
@@ -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/language/ExpressionEvaluationException.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/language/ExpressionEvaluationException.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/language/ExpressionEvaluationException.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/language/ExpressionEvaluationException.java Tue Aug 7 11:35:48 2007
@@ -1,4 +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.
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/language/IllegalSyntaxException.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/language/IllegalSyntaxException.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/language/IllegalSyntaxException.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/language/IllegalSyntaxException.java Tue Aug 7 11:35:48 2007
@@ -1,4 +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.
@@ -16,8 +16,8 @@
*/
package org.apache.camel.language;
-import org.apache.camel.spi.Language;
import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Language;
/**
* An exception thrown if some illegal syntax is rejected by a specific language
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java Tue Aug 7 11:35:48 2007
@@ -1,4 +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.
@@ -19,17 +19,16 @@
import org.apache.camel.Exchange;
import org.apache.camel.Expression;
import org.apache.camel.Predicate;
-import org.apache.camel.language.IllegalSyntaxException;
import org.apache.camel.builder.ExpressionBuilder;
import org.apache.camel.builder.PredicateBuilder;
+import org.apache.camel.language.IllegalSyntaxException;
import org.apache.camel.spi.Language;
import org.apache.camel.util.ObjectHelper;
/**
* A <a href="http://activemq.apache.org/camel/simple.html>simple language</a>
- * which maps simple property style notations
- * to acces headers and bodies. Examples of supported expressions are
- * <p/>
+ * which maps simple property style notations to acces headers and bodies.
+ * Examples of supported expressions are <p/>
* <ul>
* <li>in.header.foo or header.foo to access an inbound header called 'foo'</li>
* <li>in.body or body to access the inbound body</li>
@@ -38,7 +37,7 @@
* <li>property.foo to access the exchange property called 'foo'</li>
* <li>sys.foo to access the system property called 'foo'</li>
* </ul>
- *
+ *
* @version $Revision: $
*/
public class SimpleLanguage implements Language {
@@ -50,8 +49,7 @@
public Expression<Exchange> createExpression(String expression) {
if (ObjectHelper.isEqualToAny(expression, "body", "in.body")) {
return ExpressionBuilder.bodyExpression();
- }
- else if (ObjectHelper.equals(expression, "out.body")) {
+ } else if (ObjectHelper.equals(expression, "out.body")) {
return ExpressionBuilder.outBodyExpression();
}
String remainder = ifStartsWithReturnRemainder("in.header.", expression);
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java Tue Aug 7 11:35:48 2007
@@ -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,6 +16,13 @@
*/
package org.apache.camel.model;
+import java.util.Collection;
+
+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 org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.Expression;
@@ -28,12 +34,6 @@
import org.apache.camel.processor.aggregate.AggregationStrategy;
import org.apache.camel.processor.aggregate.UseLatestAggregationStrategy;
-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;
-
/**
* @version $Revision: 1.1 $
*/
@@ -68,7 +68,8 @@
public void addRoutes(RouteContext routeContext, Collection<Route> routes) throws Exception {
Endpoint from = routeContext.getEndpoint();
final Processor processor = routeContext.createProcessor(this);
- final Aggregator service = new Aggregator(from, processor, getExpression().createExpression(routeContext), aggregationStrategy);
+ final Aggregator service = new Aggregator(from, processor, getExpression()
+ .createExpression(routeContext), aggregationStrategy);
Route route = new Route<Exchange>(from, service) {
@Override
@@ -87,4 +88,4 @@
public void setAggregationStrategy(AggregationStrategy aggregationStrategy) {
this.aggregationStrategy = aggregationStrategy;
}
-}
\ No newline at end of file
+}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/BeanRef.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/BeanRef.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/BeanRef.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/BeanRef.java Tue Aug 7 11:35:48 2007
@@ -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,16 +16,16 @@
*/
package org.apache.camel.model;
-import org.apache.camel.Processor;
-import org.apache.camel.component.bean.BeanProcessor;
-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.component.bean.BeanProcessor;
+import org.apache.camel.impl.RouteContext;
+
/**
* @version $Revision: 1.1 $
*/
@@ -89,12 +88,10 @@
return answer;
}
-
protected String description() {
if (bean != null) {
return bean.toString();
- }
- else {
+ } else {
String methodText = "";
if (method != null) {
methodText = " method: " + method;
@@ -102,4 +99,4 @@
return "ref: " + ref + methodText;
}
}
-}
\ No newline at end of file
+}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchType.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchType.java Tue Aug 7 11:35:48 2007
@@ -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,8 @@
*/
package org.apache.camel.model;
-import org.apache.camel.Processor;
-import org.apache.camel.impl.RouteContext;
-import org.apache.camel.processor.CatchProcessor;
-import org.apache.camel.util.ObjectHelper;
+import java.util.ArrayList;
+import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@@ -28,8 +25,11 @@
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
-import java.util.ArrayList;
-import java.util.List;
+
+import org.apache.camel.Processor;
+import org.apache.camel.impl.RouteContext;
+import org.apache.camel.processor.CatchProcessor;
+import org.apache.camel.util.ObjectHelper;
/**
* @version $Revision: 1.1 $
@@ -39,7 +39,7 @@
public class CatchType extends ProcessorType {
@XmlElement(required = false)
private List<InterceptorRef> interceptors = new ArrayList<InterceptorRef>();
- @XmlElement(name="exception")
+ @XmlElement(name = "exception")
private List<String> exceptions = new ArrayList<String>();
@XmlElementRef
private List<ProcessorType> outputs = new ArrayList<ProcessorType>();
@@ -113,4 +113,4 @@
}
return answer;
}
-}
\ No newline at end of file
+}
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?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- 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 Tue Aug 7 11:35:48 2007
@@ -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,22 +16,23 @@
*/
package org.apache.camel.model;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Predicate;
-import org.apache.camel.Processor;
-import org.apache.camel.impl.RouteContext;
-import org.apache.camel.processor.ChoiceProcessor;
-import org.apache.camel.processor.FilterProcessor;
+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.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Predicate;
+import org.apache.camel.Processor;
+import org.apache.camel.impl.RouteContext;
+import org.apache.camel.processor.ChoiceProcessor;
+import org.apache.camel.processor.FilterProcessor;
/**
* @version $Revision: 1.1 $
@@ -66,7 +66,7 @@
}
// Fluent API
- //-------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
public ChoiceType when(Predicate predicate) {
getWhenClauses().add(new WhenType(predicate));
return this;
@@ -104,7 +104,7 @@
}
// Properties
- //-------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
public List<WhenType> getWhenClauses() {
return whenClauses;
}
@@ -116,11 +116,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();
}
@@ -142,4 +140,3 @@
this.interceptors = interceptors;
}
}
-
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/DelayerType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/DelayerType.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/DelayerType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/DelayerType.java Tue Aug 7 11:35:48 2007
@@ -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,15 @@
*/
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.Expression;
import org.apache.camel.Processor;
import org.apache.camel.impl.RouteContext;
import org.apache.camel.model.language.ExpressionType;
import org.apache.camel.processor.Delayer;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
/**
* @version $Revision: 1.1 $
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExpressionNode.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExpressionNode.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExpressionNode.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExpressionNode.java Tue Aug 7 11:35:48 2007
@@ -1,4 +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.
@@ -16,19 +16,20 @@
*/
package org.apache.camel.model;
+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.XmlElement;
+import javax.xml.bind.annotation.XmlElementRef;
+
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.language.ExpressionType;
import org.apache.camel.processor.FilterProcessor;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import java.util.ArrayList;
-import java.util.List;
/**
* A base class for nodes which contain an expression and a number of outputs
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FilterType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FilterType.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FilterType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FilterType.java Tue Aug 7 11:35:48 2007
@@ -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,14 @@
*/
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.Predicate;
import org.apache.camel.impl.RouteContext;
import org.apache.camel.model.language.ExpressionType;
import org.apache.camel.processor.FilterProcessor;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
/**
* @version $Revision: 1.1 $
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyType.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyType.java Tue Aug 7 11:35:48 2007
@@ -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,12 +16,12 @@
*/
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.XmlRootElement;
+
+import org.apache.camel.Processor;
+import org.apache.camel.impl.RouteContext;
/**
* @version $Revision: 1.1 $
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?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- 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 Tue Aug 7 11:35:48 2007
@@ -1,4 +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.
@@ -16,18 +16,18 @@
*/
package org.apache.camel.model;
-import org.apache.camel.Endpoint;
-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.Endpoint;
+import org.apache.camel.impl.RouteContext;
+
/**
* Represents an XML <to/> element
- *
+ *
* @version $Revision: $
*/
@XmlRootElement(name = "from")
@@ -64,14 +64,14 @@
}
// Properties
- //-----------------------------------------------------------------------
+ // -----------------------------------------------------------------------
public String getUri() {
return uri;
}
/**
* Sets the URI of the endpoint to use
- *
+ *
* @param uri the endpoint URI to use
*/
public void setUri(String uri) {
@@ -83,8 +83,9 @@
}
/**
- * Sets the name of the endpoint within the registry (such as the Spring ApplicationContext or JNDI) to use
- *
+ * 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) {
@@ -100,19 +101,16 @@
}
// Implementation methods
- //-----------------------------------------------------------------------
+ // -----------------------------------------------------------------------
protected static String description(String uri, String ref, Endpoint endpoint) {
if (endpoint != null) {
return endpoint.getEndpointUri();
- }
- else if (uri != null) {
+ } else if (uri != null) {
return uri;
- }
- else if (ref != null) {
+ } else if (ref != null) {
return "ref:" + ref;
- }
- else {
+ } else {
return "no uri or ref supplied!";
}
}
-}
\ No newline at end of file
+}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerType.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerType.java Tue Aug 7 11:35:48 2007
@@ -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,18 +16,18 @@
*/
package org.apache.camel.model;
-import org.apache.camel.Expression;
-import org.apache.camel.Processor;
-import org.apache.camel.impl.RouteContext;
-import org.apache.camel.processor.idempotent.IdempotentConsumer;
-import org.apache.camel.processor.idempotent.MessageIdRepository;
-
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.Expression;
+import org.apache.camel.Processor;
+import org.apache.camel.impl.RouteContext;
+import org.apache.camel.processor.idempotent.IdempotentConsumer;
+import org.apache.camel.processor.idempotent.MessageIdRepository;
+
/**
* @version $Revision: 1.1 $
*/
@@ -73,7 +72,8 @@
public Processor createProcessor(RouteContext routeContext) throws Exception {
Processor childProcessor = routeContext.createProcessor(this);
MessageIdRepository messageIdRepository = resolveMessageIdRepository(routeContext);
- return new IdempotentConsumer(getExpression().createExpression(routeContext), messageIdRepository, childProcessor);
+ return new IdempotentConsumer(getExpression().createExpression(routeContext), messageIdRepository,
+ childProcessor);
}
public MessageIdRepository resolveMessageIdRepository(RouteContext routeContext) {
@@ -82,4 +82,4 @@
}
return messageIdRepository;
}
-}
\ No newline at end of file
+}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdentifiedType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdentifiedType.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdentifiedType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdentifiedType.java Tue Aug 7 11:35:48 2007
@@ -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/InterceptorRef.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptorRef.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- 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 Tue Aug 7 11:35:48 2007
@@ -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,15 @@
*/
package org.apache.camel.model;
-import org.apache.camel.impl.RouteContext;
-import org.apache.camel.processor.DelegateProcessor;
-
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.impl.RouteContext;
+import org.apache.camel.processor.DelegateProcessor;
+
/**
* @version $Revision: 1.1 $
*/
@@ -74,9 +73,8 @@
protected String description() {
if (interceptor != null) {
return interceptor.toString();
- }
- else {
+ } else {
return "ref: " + ref;
}
}
-}
\ No newline at end of file
+}
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?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- 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 Tue Aug 7 11:35:48 2007
@@ -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,15 @@
*/
package org.apache.camel.model;
-import org.apache.camel.Processor;
-import org.apache.camel.impl.RouteContext;
-import org.apache.camel.processor.MulticastProcessor;
+import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
+
+import org.apache.camel.Processor;
+import org.apache.camel.impl.RouteContext;
+import org.apache.camel.processor.MulticastProcessor;
/**
* @version $Revision: 1.1 $
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/OtherwiseType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/OtherwiseType.java?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/OtherwiseType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/OtherwiseType.java Tue Aug 7 11:35:48 2007
@@ -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,12 +16,12 @@
*/
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.XmlRootElement;
+
+import org.apache.camel.Processor;
+import org.apache.camel.impl.RouteContext;
/**
* @version $Revision: 1.1 $
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?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- 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 Tue Aug 7 11:35:48 2007
@@ -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,15 @@
*/
package org.apache.camel.model;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.ArrayList;
+import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
-import java.util.ArrayList;
-import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* A useful base class for output types
@@ -33,7 +33,7 @@
*/
@XmlType(name = "outputType")
public class OutputType extends ProcessorType {
- private static final transient Log log = LogFactory.getLog(OutputType.class);
+ private static final transient Log LOG = LogFactory.getLog(OutputType.class);
protected List<ProcessorType> outputs = new ArrayList<ProcessorType>();
private List<InterceptorRef> interceptors = new ArrayList<InterceptorRef>();
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?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- 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 Tue Aug 7 11:35:48 2007
@@ -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,16 +16,16 @@
*/
package org.apache.camel.model;
-import org.apache.camel.Processor;
-import org.apache.camel.impl.RouteContext;
-import org.apache.camel.spi.Policy;
-
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.spi.Policy;
+
/**
* @version $Revision: 1.1 $
*/
@@ -79,9 +78,8 @@
protected String description() {
if (policy != null) {
return policy.toString();
- }
- else {
+ } else {
return "ref: " + ref;
}
}
-}
\ No newline at end of file
+}
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?view=diff&rev=563607&r1=563606&r2=563607
==============================================================================
--- 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 Tue Aug 7 11:35:48 2007
@@ -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,14 @@
*/
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: 1.1 $