You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2008/05/24 19:05:32 UTC

svn commit: r659854 - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/util/ValueHolder.java components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java

Author: davsclaus
Date: Sat May 24 10:05:30 2008
New Revision: 659854

URL: http://svn.apache.org/viewvc?rev=659854&view=rev
Log:
CAMEL-517: Added Out.java as ValueHolder.java needed by camel-jms component

Added:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ValueHolder.java   (with props)
Modified:
    activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java

Added: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ValueHolder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ValueHolder.java?rev=659854&view=auto
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ValueHolder.java (added)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ValueHolder.java Sat May 24 10:05:30 2008
@@ -0,0 +1,40 @@
+/**
+ * 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.util;
+
+/**
+ * Holder object for a given value.
+ */
+public class ValueHolder<V> {
+    private V value;
+
+    public ValueHolder() {
+    }
+
+    public ValueHolder(V val) {
+        value = val;
+    }
+
+    public V get() {
+        return value;
+    }
+
+    public void set(V val) {
+        value = val;
+    }
+    
+}

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

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ValueHolder.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java?rev=659854&r1=659853&r2=659854&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java Sat May 24 10:05:30 2008
@@ -37,8 +37,8 @@
 import org.apache.camel.component.jms.requestor.PersistentReplyToRequestor;
 import org.apache.camel.component.jms.requestor.Requestor;
 import org.apache.camel.impl.DefaultProducer;
-import org.apache.camel.util.Out;
 import org.apache.camel.util.UuidGenerator;
+import org.apache.camel.util.ValueHolder;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.jms.core.JmsOperations;
@@ -165,7 +165,7 @@
                 in.setHeader("JMSCorrelationID", getUuidGenerator().generateId());
             }
 
-            final Out<FutureTask> futureHolder = new Out<FutureTask>();
+            final ValueHolder<FutureTask> futureHolder = new ValueHolder<FutureTask>();
             final DeferredMessageSentCallback callback = msgIdAsCorrId ? deferredRequestReplyMap.createDeferredMessageSentCallback() : null;
 
             final CamelJmsTemplate template = (CamelJmsTemplate)getInOutTemplate();