activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r520502 - 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/impl/ camel-core/src/main/java/org/apache/camel/pojo/ camel-core/src...
Date Tue, 20 Mar 2007 18:08:46 GMT
Author: jstrachan
Date: Tue Mar 20 11:08:45 2007
New Revision: 520502

URL: http://svn.apache.org/viewvc?view=rev&rev=520502
Log:
added some helper methods to make it easier to copy exchanges to send them to different locations

Added:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/SplitterBuilder.java
  (with props)
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/HeadersSupport.java
  (with props)
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Splitter.java
  (with props)
Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Headers.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Message.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FromBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultHeaders.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/pojo/PojoEndpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/pojo/PojoExchange.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/RouteBuilderTest.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/DefaultJmsExchange.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/DefaultJmsMessage.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/JmsHeaders.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java?view=diff&rev=520502&r1=520501&r2=520502
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java Tue Mar 20
11:08:45 2007
@@ -79,4 +79,9 @@
      */
     CamelContext<Exchange> getContext();
 
+    /**
+     * Creates a copy of the current message exchange so that it can be forwarded to another
+     * destination
+     */
+    Exchange copy();
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Headers.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Headers.java?view=diff&rev=520502&r1=520501&r2=520502
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Headers.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Headers.java Tue Mar 20
11:08:45 2007
@@ -48,4 +48,9 @@
      * @return all the headers in a Map
      */
     Map<String, Object> getHeaders();
+
+    /**
+     * Creates a copy of the headers so that we can append them to another exchange
+     */
+    Headers copy();
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Message.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Message.java?view=diff&rev=520502&r1=520501&r2=520502
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Message.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Message.java Tue Mar 20
11:08:45 2007
@@ -56,4 +56,10 @@
      */
     public <T> void setBody(Object body, Class<T> type);
 
+    /**
+     * Creates a copy of this message so that it can be used and possibly modified further
in another exchange
+     * 
+     * @return a new message instance copied from this message
+     */
+    public Message copy();
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FromBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FromBuilder.java?view=diff&rev=520502&r1=520501&r2=520502
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FromBuilder.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FromBuilder.java
Tue Mar 20 11:08:45 2007
@@ -138,6 +138,18 @@
         return answer;
     }
 
+    /**
+     * A builder for the <a href="http://activemq.apache.org/camel/splitter.html">Splitter</a>
pattern
+     * where an expression is evaluated to iterate through each of the parts of a message
and then each part is then send to some endpoint.
+     *
+     * @param valueBuilder the builder for the value used as the expression on which to split
+     * @return the builder
+     */
+    public SplitterBuilder<E> splitter(ValueBuilder<E> valueBuilder) {
+              SplitterBuilder<E> answer = new SplitterBuilder<E>(this, valueBuilder);
+        addProcessBuilder(answer);
+        return answer;
+    }
 
     // Properties
     //-------------------------------------------------------------------------

Added: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/SplitterBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/SplitterBuilder.java?view=auto&rev=520502
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/SplitterBuilder.java
(added)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/SplitterBuilder.java
Tue Mar 20 11:08:45 2007
@@ -0,0 +1,45 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Expression;
+import org.apache.camel.Processor;
+import org.apache.camel.processor.Splitter;
+
+/**
+ * A builder for the <a href="http://activemq.apache.org/camel/splitter.html">Splitter</a>
pattern
+ * where an expression is evaluated to iterate through each of the parts of a message and
then each part is then send to some endpoint.
+
+ * @version $Revision$
+ */
+public class SplitterBuilder<E extends Exchange> extends FromBuilder<E> {
+    private final ValueBuilder<E> valueBuilder;
+
+    public SplitterBuilder(FromBuilder<E> parent, ValueBuilder<E> valueBuilder)
{
+        super(parent);
+        this.valueBuilder = valueBuilder;
+    }
+
+    public Processor<E> createProcessor() {
+        // lets create a single processor for all child predicates
+        Processor<E> destination = super.createProcessor();
+        Expression<E> expression = valueBuilder.getExpression();
+        return new Splitter<E>(destination, expression);
+    }
+}

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/SplitterBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/SplitterBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/SplitterBuilder.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java?view=diff&rev=520502&r1=520501&r2=520502
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
Tue Mar 20 11:08:45 2007
@@ -39,6 +39,23 @@
         this.context = context;
     }
 
+    public Exchange copy() {
+        Exchange exchange = newInstance();
+        if (exchange instanceof DefaultExchange) {
+            DefaultExchange defaultExchange = (DefaultExchange) exchange;
+            defaultExchange.setHeaders(getHeaders().copy());
+            defaultExchange.setIn(getIn().copy());
+            defaultExchange.setOut(getOut().copy());
+            defaultExchange.setFault(getFault().copy());
+            defaultExchange.setException(getException());
+        }
+        return exchange;
+    }
+
+    public Exchange newInstance() {
+        return new DefaultExchange(context);
+    }
+
     public CamelContext getContext() {
         return context;
     }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultHeaders.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultHeaders.java?view=diff&rev=520502&r1=520501&r2=520502
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultHeaders.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultHeaders.java
Tue Mar 20 11:08:45 2007
@@ -29,7 +29,7 @@
  *
  * @version $Revision$
  */
-public class DefaultHeaders implements Headers {
+public class DefaultHeaders extends HeadersSupport {
     private Map<String, Object> headers;
 
     public Object getHeader(String name) {

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java?view=diff&rev=520502&r1=520501&r2=520502
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
Tue Mar 20 11:08:45 2007
@@ -58,4 +58,17 @@
     protected Headers createHeaders() {
         return new DefaultHeaders();
     }
+
+    public Message copy() {
+        DefaultMessage answer = newInstance();
+        answer.setBody(getBody());
+        Headers headers = createHeaders();
+        headers.getHeaders().putAll(getHeaders().getHeaders());
+        answer.setHeaders(headers);
+        return answer;
+    }
+
+    public DefaultMessage newInstance() {
+        return new DefaultMessage();
+    }
 }

Added: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/HeadersSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/HeadersSupport.java?view=auto&rev=520502
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/HeadersSupport.java
(added)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/HeadersSupport.java
Tue Mar 20 11:08:45 2007
@@ -0,0 +1,35 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.impl;
+
+import org.apache.camel.Headers;
+
+/**
+ * @version $Revision$
+ */
+public abstract class HeadersSupport implements Headers {
+    public Headers copy() {
+        Headers answer = newInstance();
+        answer.getHeaders().putAll(getHeaders());
+        return answer;
+    }
+
+    public Headers newInstance() {
+        return new DefaultHeaders();
+    }
+}

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/HeadersSupport.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/HeadersSupport.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/HeadersSupport.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/pojo/PojoEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/pojo/PojoEndpoint.java?view=diff&rev=520502&r1=520501&r2=520502
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/pojo/PojoEndpoint.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/pojo/PojoEndpoint.java
Tue Mar 20 11:08:45 2007
@@ -94,7 +94,7 @@
 					if ( fault != null ) {
 						throw new InvocationTargetException(fault);
 					}
-					return exchange.getOut();
+					return exchange.getOut().getBody();
 				}
 				throw new IllegalStateException("The endpoint is not active: "+getEndpointUri());
 			}

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/pojo/PojoExchange.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/pojo/PojoExchange.java?view=diff&rev=520502&r1=520501&r2=520502
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/pojo/PojoExchange.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/pojo/PojoExchange.java
Tue Mar 20 11:08:45 2007
@@ -18,15 +18,15 @@
 
 import org.apache.camel.impl.DefaultExchange;
 import org.apache.camel.CamelContext;
+import org.apache.camel.Exchange;
 
 /**
  * @version $Revision: 519901 $
  */
 public class PojoExchange extends DefaultExchange {
-    private PojoInvocation invocation;
 
-    public PojoExchange(CamelContext container) {
-        super(container);
+    public PojoExchange(CamelContext context) {
+        super(context);
     }
 
     public PojoInvocation getInvocation() {
@@ -35,5 +35,10 @@
 
     public void setInvocation(PojoInvocation invocation) {
         getIn().setBody(invocation);
+    }
+
+    @Override
+    public Exchange newInstance() {
+        return new PojoExchange(getContext());
     }
 }

Added: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Splitter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Splitter.java?view=auto&rev=520502
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Splitter.java
(added)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Splitter.java
Tue Mar 20 11:08:45 2007
@@ -0,0 +1,59 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.processor;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Expression;
+import static org.apache.camel.util.ObjectHelper.*;
+
+import java.util.Iterator;
+
+/**
+ * Implements a dynamic <a href="http://activemq.apache.org/camel/splitter.html">Splitter</a>
pattern
+ * where an expression is evaluated to iterate through each of the parts of a message and
then each part is then send to some endpoint.
+ *
+ * @version $Revision$
+ */
+public class Splitter<E extends Exchange> implements Processor<E> {
+    private final Processor<E> destination;
+    private final Expression<E> expression;
+
+    public Splitter(Processor<E> destination, Expression<E> expression) {
+        this.destination = destination;
+        this.expression = expression;
+        notNull(destination, "destination");
+        notNull(expression, "expression");
+    }
+
+    @Override
+    public String toString() {
+        return "Splitter[on: " + expression + " to: " + destination + "]";
+    }
+
+    public void onExchange(E exchange) {
+        Object value = expression.evaluate(exchange);
+        Iterator iter = createIterator(value);
+        while (iter.hasNext()) {
+            Object part = iter.next();
+            E newExchange = (E) exchange.copy();
+            newExchange.getIn().setBody(part);
+            destination.onExchange(newExchange);
+        }
+    }
+}

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Splitter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Splitter.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Splitter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/RouteBuilderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/RouteBuilderTest.java?view=diff&rev=520502&r1=520501&r2=520502
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/RouteBuilderTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/RouteBuilderTest.java Tue
Mar 20 11:08:45 2007
@@ -24,6 +24,7 @@
 import org.apache.camel.processor.FilterProcessor;
 import org.apache.camel.processor.InterceptorProcessor;
 import org.apache.camel.processor.RecipientList;
+import org.apache.camel.processor.Splitter;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -370,6 +371,35 @@
 
             assertTrue("Processor should be a RecipientList but was: " + processor + " with
type: " + processor.getClass().getName(), processor instanceof RecipientList);
             RecipientList<Exchange> p1 = (RecipientList<Exchange>) processor;
+        }
+    }
+    protected RouteBuilder<Exchange> buildSplitter() {
+        // START SNIPPET: e9
+        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+            public void configure() {
+                from("queue:a").splitter(header("cheese")).to("queue:b");
+            }
+        };
+        // END SNIPPET: e9
+        return builder;
+    }
+
+    public void testSplitter() throws Exception {
+
+        RouteBuilder<Exchange> builder = buildSplitter();
+
+        Map<Endpoint<Exchange>, Processor<Exchange>> routeMap = builder.getRouteMap();
+        System.out.println("Created map: " + routeMap);
+
+        Set<Map.Entry<Endpoint<Exchange>, Processor<Exchange>>> routes
= routeMap.entrySet();
+        assertEquals("Number routes created", 1, routes.size());
+        for (Map.Entry<Endpoint<Exchange>, Processor<Exchange>> route :
routes) {
+            Endpoint<Exchange> key = route.getKey();
+            assertEquals("From endpoint", "queue:a", key.getEndpointUri());
+            Processor processor = route.getValue();
+
+            assertTrue("Processor should be a Splitter but was: " + processor + " with type:
" + processor.getClass().getName(), processor instanceof Splitter);
+            Splitter<Exchange> p1 = (Splitter<Exchange>) processor;
         }
     }
 

Modified: activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/DefaultJmsExchange.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/DefaultJmsExchange.java?view=diff&rev=520502&r1=520501&r2=520502
==============================================================================
--- activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/DefaultJmsExchange.java
(original)
+++ activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/DefaultJmsExchange.java
Tue Mar 20 11:08:45 2007
@@ -18,6 +18,7 @@
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.InvalidHeaderTypeException;
+import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultExchange;
 
 import javax.jms.JMSException;
@@ -39,6 +40,11 @@
     public DefaultJmsExchange(CamelContext container, Message message) {
         super(container);
         setIn(new DefaultJmsMessage(message));
+    }
+
+    @Override
+    public Exchange newInstance() {
+        return new DefaultJmsExchange(getContext());
     }
 
     public Message createMessage(Session session) throws JMSException {

Modified: activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/DefaultJmsMessage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/DefaultJmsMessage.java?view=diff&rev=520502&r1=520501&r2=520502
==============================================================================
--- activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/DefaultJmsMessage.java
(original)
+++ activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/DefaultJmsMessage.java
Tue Mar 20 11:08:45 2007
@@ -48,5 +48,8 @@
         return new JmsHeaders(this);
     }
 
-
+    @Override
+    public DefaultMessage newInstance() {
+        return new DefaultJmsMessage();
+    }
 }

Modified: activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/JmsHeaders.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/JmsHeaders.java?view=diff&rev=520502&r1=520501&r2=520502
==============================================================================
--- activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/JmsHeaders.java (original)
+++ activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/jms/JmsHeaders.java Tue
Mar 20 11:08:45 2007
@@ -19,6 +19,7 @@
 
 import org.apache.camel.Headers;
 import org.apache.camel.InvalidHeaderTypeException;
+import org.apache.camel.impl.HeadersSupport;
 
 import javax.jms.JMSException;
 import javax.jms.Message;
@@ -29,7 +30,7 @@
 /**
  * @version $Revision$
  */
-public class JmsHeaders implements Headers {
+public class JmsHeaders extends HeadersSupport {
     private final DefaultJmsMessage message;
     private Map<String, Object> lazyHeaders;
 
@@ -101,4 +102,5 @@
             return lazyHeaders;
         }
     }
+
 }



Mime
View raw message