activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r511045 [1/6] - in /activemq/trunk: activemq-core/src/main/java/org/apache/activemq/ activemq-core/src/main/java/org/apache/activemq/blob/ activemq-core/src/main/java/org/apache/activemq/broker/region/policy/ activemq-core/src/main/java/org...
Date Fri, 23 Feb 2007 18:50:56 GMT
Author: jstrachan
Date: Fri Feb 23 10:50:52 2007
New Revision: 511045

URL: http://svn.apache.org/viewvc?view=rev&rev=511045
Log:
added the first cut of version 3 of the wire format which now supports BlobMessage for out-of-band (or later on in-band) BLOBs for AMQ-1075

Added:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/package.html
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBlobMessageMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBytesMessageMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQDestinationMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMapMessageMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMessageMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQObjectMessageMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQQueueMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQStreamMessageMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempDestinationMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempQueueMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempTopicMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTextMessageMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTopicMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseCommandMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerIdMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerInfoMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionControlMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionErrorMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionIdMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionInfoMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerControlMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerIdMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerInfoMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ControlCommandMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataArrayResponseMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataResponseMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DestinationInfoMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DiscoveryEventMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ExceptionResponseMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/FlushCommandMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/IntegerResponseMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalQueueAckMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTopicAckMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTraceMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTransactionMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/KeepAliveInfoMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LastPartialCommandMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LocalTransactionIdMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MarshallerFactory.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageAckMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageIdMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessagePullMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/PartialCommandMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerIdMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerInfoMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveInfoMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ReplayCommandMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ResponseMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionIdMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionInfoMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ShutdownInfoMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SubscriptionInfoMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionIdMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionInfoMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/WireFormatInfoMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/XATransactionIdMarshaller.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerIdTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerInfoTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionControlTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionErrorTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionIdTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionInfoTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerControlTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerIdTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerInfoTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ControlCommandTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataArrayResponseTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataResponseTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DestinationInfoTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DiscoveryEventTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ExceptionResponseTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/FlushCommandTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/IntegerResponseTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalQueueAckTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTopicAckTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTraceTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTransactionTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/KeepAliveInfoTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LastPartialCommandTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LocalTransactionIdTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageAckTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageIdTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessagePullTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/PartialCommandTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerIdTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerInfoTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveInfoTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ReplayCommandTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ResponseTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionIdTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionInfoTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ShutdownInfoTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SubscriptionInfoTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionIdTestSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionInfoTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/XATransactionIdTest.java
Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java
    activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/MultiSourceGenerator.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java?view=diff&rev=511045&r1=511044&r2=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java Fri Feb 23 10:50:52 2007
@@ -17,58 +17,7 @@
  */
 package org.apache.activemq;
 
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.jms.BytesMessage;
-import javax.jms.Destination;
-import javax.jms.IllegalStateException;
-import javax.jms.InvalidDestinationException;
-import javax.jms.InvalidSelectorException;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.StreamMessage;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-import javax.jms.TopicSubscriber;
-import javax.jms.TransactionRolledBackException;
-
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.ConsumerId;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
+import org.apache.activemq.command.*;
 import org.apache.activemq.management.JMSSessionStatsImpl;
 import org.apache.activemq.management.StatsCapable;
 import org.apache.activemq.management.StatsImpl;
@@ -76,9 +25,21 @@
 import org.apache.activemq.transaction.Synchronization;
 import org.apache.activemq.util.Callback;
 import org.apache.activemq.util.LongSequenceGenerator;
+import org.apache.activemq.blob.BlobUploader;
+import org.apache.activemq.blob.BlobUploadStrategy;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import javax.jms.*;
+import javax.jms.IllegalStateException;
+import javax.jms.Message;
+import java.io.Serializable;
+import java.io.File;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -169,6 +130,7 @@
  * @see javax.jms.XASession
  */
 public class ActiveMQSession implements Session, QueueSession, TopicSession, StatsCapable, ActiveMQDispatcher {
+    private BlobUploadStrategy blobUploadStrategy;
 
     public static interface DeliveryListener {
         public void beforeDelivery(ActiveMQSession session, Message msg);
@@ -286,9 +248,8 @@
      *             internal error.
      */
     public BytesMessage createBytesMessage() throws JMSException {
-        checkClosed();
         ActiveMQBytesMessage message = new ActiveMQBytesMessage();
-        message.setConnection(connection);
+        configureMessage(message);
         return message;
     }
 
@@ -304,9 +265,8 @@
      *             internal error.
      */
     public MapMessage createMapMessage() throws JMSException {
-        checkClosed();
         ActiveMQMapMessage message = new ActiveMQMapMessage();
-        message.setConnection(connection);
+        configureMessage(message);
         return message;
     }
 
@@ -322,9 +282,8 @@
      *             internal error.
      */
     public Message createMessage() throws JMSException {
-        checkClosed();
         ActiveMQMessage message = new ActiveMQMessage();
-        message.setConnection(connection);
+        configureMessage(message);
         return message;
     }
 
@@ -339,9 +298,8 @@
      *             internal error.
      */
     public ObjectMessage createObjectMessage() throws JMSException {
-        checkClosed();
         ActiveMQObjectMessage message = new ActiveMQObjectMessage();
-        message.setConnection(connection);
+        configureMessage(message);
         return message;
     }
 
@@ -358,9 +316,8 @@
      *             internal error.
      */
     public ObjectMessage createObjectMessage(Serializable object) throws JMSException {
-        checkClosed();
         ActiveMQObjectMessage message = new ActiveMQObjectMessage();
-        message.setConnection(connection);
+        configureMessage(message);
         message.setObject(object);
         return message;
     }
@@ -376,9 +333,8 @@
      *             internal error.
      */
     public StreamMessage createStreamMessage() throws JMSException {
-        checkClosed();
         ActiveMQStreamMessage message = new ActiveMQStreamMessage();
-        message.setConnection(connection);
+        configureMessage(message);
         return message;
     }
 
@@ -393,9 +349,8 @@
      *             internal error.
      */
     public TextMessage createTextMessage() throws JMSException {
-        checkClosed();
         ActiveMQTextMessage message = new ActiveMQTextMessage();
-        message.setConnection(connection);
+        configureMessage(message);
         return message;
     }
 
@@ -411,14 +366,78 @@
      *             internal error.
      */
     public TextMessage createTextMessage(String text) throws JMSException {
-        checkClosed();
         ActiveMQTextMessage message = new ActiveMQTextMessage();
         message.setText(text);
-        message.setConnection(connection);
+        configureMessage(message);
+        return message;
+    }
+
+    /**
+     * Creates an initialized <CODE>BlobMessage</CODE> object. A <CODE>BlobMessage</CODE>
+     * object is used to send a message containing a <CODE>URL</CODE> which points to some
+     * network addressible BLOB.
+     *
+     * @param url
+     *            the network addressable URL used to pass directly to the consumer
+     * @return a BlobMessage
+     * @throws JMSException
+     *             if the JMS provider fails to create this message due to some
+     *             internal error.
+     */
+    public BlobMessage createBlobMessage(URL url) throws JMSException {
+        ActiveMQBlobMessage message = new ActiveMQBlobMessage();
+        configureMessage(message);
+        message.setURL(url);
         return message;
     }
 
     /**
+     * Creates an initialized <CODE>BlobMessage</CODE> object. A <CODE>BlobMessage</CODE>
+     * object is used to send a message containing the <CODE>File</CODE> content. Before the
+     * message is sent the file conent will be uploaded to the broker or some other remote repository
+     * depending on the {@link #getBlobUploadStrategy()}.
+     *
+     * @param file
+     *            the file to be uploaded to some remote repo (or the broker) depending on the
+     *
+     * @return a BlobMessage
+     * @throws JMSException
+     *             if the JMS provider fails to create this message due to some
+     *             internal error.
+     */
+    public BlobMessage createBlobMessage(File file) throws JMSException {
+        ActiveMQBlobMessage message = new ActiveMQBlobMessage();
+        configureMessage(message);
+        message.setBlobUploader(new BlobUploader(blobUploadStrategy, file));
+        message.setDeletedByBroker(true);
+        return message;
+    }
+
+
+    /**
+     * Creates an initialized <CODE>BlobMessage</CODE> object. A <CODE>BlobMessage</CODE>
+     * object is used to send a message containing the <CODE>File</CODE> content. Before the
+     * message is sent the file conent will be uploaded to the broker or some other remote repository
+     * depending on the {@link #getBlobUploadStrategy()}.
+     *
+     * @param file
+     *            the file to be uploaded to some remote repo (or the broker) depending on the
+     *
+     * @return a BlobMessage
+     * @throws JMSException
+     *             if the JMS provider fails to create this message due to some
+     *             internal error.
+     */
+    public BlobMessage createBlobMessage(InputStream in) throws JMSException {
+        ActiveMQBlobMessage message = new ActiveMQBlobMessage();
+        configureMessage(message);
+        message.setBlobUploader(new BlobUploader(blobUploadStrategy, in));
+        message.setDeletedByBroker(true);
+        return message;
+    }
+
+
+    /**
      * Indicates whether the session is in transacted mode.
      * 
      * @return true if the session is in transacted mode
@@ -573,6 +592,15 @@
     }
 
     /**
+     * Checks that the session is not closed then configures the message
+     */
+    protected void configureMessage(ActiveMQMessage message) throws IllegalStateException {
+        checkClosed();
+        message.setConnection(connection);
+    }
+
+
+    /**
      * Check if the session is closed. It is used for ensuring that the session
      * is open before performing various operations.
      * 
@@ -1718,7 +1746,20 @@
     public List getUnconsumedMessages() {
 		return executor.getUnconsumedMessages();
 	}
-    
+
+
+    public BlobUploadStrategy getBlobUploadStrategy() {
+        return blobUploadStrategy;
+    }
+
+    /**
+     * Sets the upload strategy for BLOBs which are sent out-of-band by uploading them
+     * to some remote repository or the broker
+     */
+    public void setBlobUploadStrategy(BlobUploadStrategy blobUploadStrategy) {
+        this.blobUploadStrategy = blobUploadStrategy;
+    }
+
     public String toString() {
         return "ActiveMQSession {id="+info.getSessionId()+",started="+started.get()+"}";
     }

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java Fri Feb 23 10:50:52 2007
@@ -0,0 +1,57 @@
+/*
+ * 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.activemq;
+
+import javax.jms.Message;
+import javax.jms.JMSException;
+import java.net.URL;
+import java.net.MalformedURLException;
+import java.io.InputStream;
+import java.io.IOException;
+
+/**
+ * Represents a message which has a typically out of band Binary Large Object
+ * (BLOB)
+ * 
+ * @version $Revision: $
+ */
+public interface BlobMessage extends Message {
+
+    /**
+     * Return the input stream to process the BLOB
+     */
+    InputStream getInputStream() throws IOException, JMSException;
+
+    /**
+     * Returns the URL for the blob if its available as an external URL (such as file, http, ftp etc)
+     * or null if there is no URL available
+     */
+    URL getURL() throws MalformedURLException, JMSException;
+
+
+    /**
+     * The MIME type of the BLOB which can be used to apply different content types to messages.
+     */
+    String getMimeType();
+
+    /**
+     * Sets the MIME type of the BLOB so that a consumer can process things nicely with a Java Activation Framework
+     * DataHandler
+     */
+    void setMimeType(String mimeType);
+
+}

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java Fri Feb 23 10:50:52 2007
@@ -0,0 +1,37 @@
+/*
+ * 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.activemq.blob;
+
+import org.apache.activemq.command.ActiveMQBlobMessage;
+
+import javax.jms.JMSException;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+/**
+ * Represents a strategy of uploading a file/stream to some remote
+ *
+ * @version $Revision: $
+ */
+public interface BlobUploadStrategy {
+
+    URL uploadFile(ActiveMQBlobMessage message, File file) throws JMSException, IOException;
+
+    URL uploadStream(ActiveMQBlobMessage message, InputStream in) throws JMSException, IOException;
+}

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java Fri Feb 23 10:50:52 2007
@@ -0,0 +1,57 @@
+/*
+ * 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.activemq.blob;
+
+import org.apache.activemq.command.ActiveMQBlobMessage;
+
+import javax.jms.JMSException;
+import java.io.File;
+import java.io.*;
+import java.io.IOException;
+import java.net.URL;
+
+/**
+ * A helper class to represent a required upload of a BLOB to some remote URL
+ *
+ * @version $Revision: $
+ */
+public class BlobUploader {
+
+    private BlobUploadStrategy strategy;
+    private File file;
+    private InputStream in;
+
+
+    public BlobUploader(BlobUploadStrategy strategy, File file) {
+        this.strategy = strategy;
+        this.file = file;
+    }
+
+    public BlobUploader(BlobUploadStrategy strategy, InputStream in) {
+        this.strategy = strategy;
+        this.in = in;
+    }
+
+    public URL upload(ActiveMQBlobMessage message) throws JMSException, IOException {
+        if (file != null) {
+            return strategy.uploadFile(message, file);
+        }
+        else {
+            return strategy.uploadStream(message, in);
+        }
+    }
+}

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/package.html
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/package.html?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/package.html (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/blob/package.html Fri Feb 23 10:50:52 2007
@@ -0,0 +1,25 @@
+<!--
+    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.
+-->
+<html>
+<head>
+</head>
+<body>
+
+Helper classes for dealing with out-of-band BLOB objects
+
+</body>
+</html>

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java?view=diff&rev=511045&r1=511044&r2=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java Fri Feb 23 10:50:52 2007
@@ -17,28 +17,21 @@
  */
 package org.apache.activemq.broker.region.policy;
 
-import java.util.concurrent.atomic.AtomicLong;
-
 import org.apache.activemq.ActiveMQMessageTransformation;
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.broker.region.Destination;
 import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
 import org.apache.activemq.broker.region.SubscriptionRecovery;
 import org.apache.activemq.broker.region.Topic;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ConnectionId;
-import org.apache.activemq.command.MessageId;
-import org.apache.activemq.command.ProducerId;
-import org.apache.activemq.command.SessionId;
-import org.apache.activemq.filter.MessageEvaluationContext;
+import org.apache.activemq.command.*;
 import org.apache.activemq.util.IdGenerator;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.MessageListener;
+import java.util.concurrent.atomic.AtomicLong;
 
 /**
  * This implementation of {@link SubscriptionRecoveryPolicy} will perform a user
@@ -121,7 +114,7 @@
         }
     }
 
-    protected void configure(ActiveMQMessage msg) {
+    protected void configure(ActiveMQMessage msg) throws JMSException {
         long sequenceNumber = messageSequence.incrementAndGet();
         msg.setMessageId(new MessageId(producerId, sequenceNumber));
         msg.onSend();

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java Fri Feb 23 10:50:52 2007
@@ -0,0 +1,152 @@
+/*
+ * 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.activemq.command;
+
+import org.apache.activemq.BlobMessage;
+import org.apache.activemq.blob.BlobUploader;
+import org.apache.activemq.util.JMSExceptionSupport;
+
+import javax.jms.JMSException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * An implementation of {@link BlobMessage} for out of band BLOB transfer
+ *
+ * @version $Revision: $
+ * @openwire:marshaller code="29"
+ */
+public class ActiveMQBlobMessage extends ActiveMQMessage implements BlobMessage {
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_BLOB_MESSAGE;
+
+    public static final String BINARY_MIME_TYPE = "application/octet-stream";
+
+    private String remoteBlobUrl;
+    private String mimeType;
+    private boolean deletedByBroker;
+
+    private transient BlobUploader blobUploader;
+    private transient URL url;
+
+
+    public Message copy() {
+        ActiveMQBlobMessage copy = new ActiveMQBlobMessage();
+        copy(copy);
+        return copy;
+    }
+
+    private void copy(ActiveMQBlobMessage copy) {
+        super.copy(copy);
+        copy.setRemoteBlobUrl(getRemoteBlobUrl());
+        copy.setMimeType(getMimeType());
+        copy.setDeletedByBroker(isDeletedByBroker());
+    }
+
+    public byte getDataStructureType() {
+        return DATA_STRUCTURE_TYPE;
+    }
+
+    /**
+     * @openwire:property version=3 cache=false
+     */
+    public String getRemoteBlobUrl() {
+        return remoteBlobUrl;
+    }
+
+    public void setRemoteBlobUrl(String remoteBlobUrl) {
+        this.remoteBlobUrl = remoteBlobUrl;
+        url = null;
+    }
+
+    /**
+     * The MIME type of the BLOB which can be used to apply different content types to messages.
+     *
+     * @openwire:property version=3 cache=true
+     */
+    public String getMimeType() {
+        if (mimeType == null) {
+            return BINARY_MIME_TYPE;
+        }
+        return mimeType;
+    }
+
+    public void setMimeType(String mimeType) {
+        this.mimeType = mimeType;
+    }
+
+    /**
+     * @openwire:property version=3 cache=false
+     */
+    public boolean isDeletedByBroker() {
+        return deletedByBroker;
+    }
+
+    public void setDeletedByBroker(boolean deletedByBroker) {
+        this.deletedByBroker = deletedByBroker;
+    }
+
+    public InputStream getInputStream() throws IOException, JMSException {
+        URL value = getURL();
+        if (value == null) {
+            return null;
+        }
+        return value.openStream();
+    }
+
+    public URL getURL() throws JMSException {
+        if (url == null && remoteBlobUrl != null) {
+            try {
+                url = new URL(remoteBlobUrl);
+            }
+            catch (MalformedURLException e) {
+                throw JMSExceptionSupport.create(e);
+            }
+        }
+        return url;
+    }
+
+    public void setURL(URL url) {
+        this.url = url;
+        remoteBlobUrl = url != null ? url.toExternalForm() : null;
+    }
+
+
+    public BlobUploader getBlobUploader() {
+        return blobUploader;
+    }
+
+    public void setBlobUploader(BlobUploader blobUploader) {
+        this.blobUploader = blobUploader;
+    }
+
+    public void onSend() throws JMSException {
+        super.onSend();
+
+        // lets ensure we upload the BLOB first out of band before we send the message
+        if (blobUploader != null) {
+            try {
+                URL value = blobUploader.upload(this);
+                setURL(value);
+            }
+            catch (IOException e) {
+                throw JMSExceptionSupport.create(e);
+            }
+        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java?view=diff&rev=511045&r1=511044&r2=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java Fri Feb 23 10:50:52 2007
@@ -17,30 +17,16 @@
  */
 package org.apache.activemq.command;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.zip.Deflater;
-import java.util.zip.DeflaterOutputStream;
-import java.util.zip.InflaterInputStream;
-
-import javax.jms.BytesMessage;
-import javax.jms.JMSException;
-import javax.jms.MessageEOFException;
-import javax.jms.MessageFormatException;
-import javax.jms.MessageNotReadableException;
-import javax.jms.MessageNotWriteableException;
-
 import org.apache.activemq.ActiveMQConnection;
 import org.apache.activemq.util.ByteArrayInputStream;
 import org.apache.activemq.util.ByteArrayOutputStream;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.ByteSequenceData;
-import org.apache.activemq.util.JMSExceptionSupport;
+import org.apache.activemq.util.*;
+
+import javax.jms.*;
+import java.io.*;
+import java.util.zip.Deflater;
+import java.util.zip.DeflaterOutputStream;
+import java.util.zip.InflaterInputStream;
 
 /**
  * A <CODE>BytesMessage</CODE> object is used to send a message containing a stream of uninterpreted bytes. It inherits
@@ -94,7 +80,7 @@
         copy.dataIn = null;
     }
     
-    public void onSend() {
+    public void onSend() throws JMSException {
         super.onSend();
         storeContent();
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java?view=diff&rev=511045&r1=511044&r2=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java Fri Feb 23 10:50:52 2007
@@ -594,7 +594,7 @@
     /**
      * Send operation event listener.  Used to get the message ready to be sent. 
      */
-    public void onSend() {
+    public void onSend() throws JMSException {
         setReadOnlyBody(true);
         setReadOnlyProperties(true);
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java?view=diff&rev=511045&r1=511044&r2=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java Fri Feb 23 10:50:52 2007
@@ -129,7 +129,7 @@
         copy.dataIn = null;
     }
 
-    public void onSend() {
+    public void onSend() throws JMSException {
         super.onSend();
         storeContent();
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java?view=diff&rev=511045&r1=511044&r2=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java Fri Feb 23 10:50:52 2007
@@ -67,6 +67,7 @@
     byte  ACTIVEMQ_OBJECT_MESSAGE           = 26;
     byte  ACTIVEMQ_STREAM_MESSAGE           = 27;
     byte  ACTIVEMQ_TEXT_MESSAGE             = 28;
+    byte  ACTIVEMQ_BLOB_MESSAGE             = 29;
 
     ///////////////////////////////////////////////////
     //

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java?view=diff&rev=511045&r1=511044&r2=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java Fri Feb 23 10:50:52 2007
@@ -17,36 +17,33 @@
  */
 package org.apache.activemq.openwire;
 
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-
 import org.apache.activemq.command.CommandTypes;
 import org.apache.activemq.command.DataStructure;
 import org.apache.activemq.command.MarshallAware;
 import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.ByteSequenceData;
-import org.apache.activemq.util.ClassLoading;
-import org.apache.activemq.util.DataByteArrayInputStream;
-import org.apache.activemq.util.DataByteArrayOutputStream;
-import org.apache.activemq.util.IdGenerator;
+import org.apache.activemq.util.*;
 import org.apache.activemq.wireformat.WireFormat;
 
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+
 /**
  * 
  * @version $Revision$
  */
 final public class OpenWireFormat implements WireFormat {
-    
+
+    public static final int DEFAULT_VERSION = 3;
+
     static final byte NULL_TYPE = CommandTypes.NULL;
     private static final int MARSHAL_CACHE_SIZE = Short.MAX_VALUE/2;
     private static final int MARSHAL_CACHE_FREE_SPACE = 100;
     
     private DataStreamMarshaller dataMarshallers[];
-    private int version = 2;
+    private int version;
     private boolean stackTraceEnabled=false;
     private boolean tcpNoDelayEnabled=false;
     private boolean cacheEnabled=false;
@@ -64,7 +61,7 @@
 	private WireFormatInfo preferedWireFormatInfo;
             
 	public OpenWireFormat() {
-		this(2);
+		this(DEFAULT_VERSION);
 	}
 	
     public OpenWireFormat(int i) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java?view=diff&rev=511045&r1=511044&r2=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java Fri Feb 23 10:50:52 2007
@@ -30,7 +30,7 @@
 	// The default values here are what the wire format changes to after a default negotiation.
 	//
 	
-    private int version=2;
+    private int version=OpenWireFormat.DEFAULT_VERSION;
     private boolean stackTraceEnabled=true;
     private boolean tcpNoDelayEnabled=true;
     private boolean cacheEnabled=true;

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBlobMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBlobMessageMarshaller.java?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBlobMessageMarshaller.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBlobMessageMarshaller.java Fri Feb 23 10:50:52 2007
@@ -0,0 +1 @@
+/**
 *
 * 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.activemq.openwire.v3;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.activemq.openwire.*;
import org.apache.activ
 emq.command.*;



/**
 * Marshalling code for Open Wire Format for ActiveMQBlobMessageMarshaller
 *
 *
 * NOTE!: This file is auto generated - do not modify!
 *        if you need to make a change, please see the modify the groovy scripts in the
 *        under src/gram/script and then use maven openwire:generate to regenerate 
 *        this file.
 *
 * @version $Revision$
 */
public class ActiveMQBlobMessageMarshaller extends ActiveMQMessageMarshaller {

    /**
     * Return the type of Data Structure we marshal
     * @return short representation of the type data structure
     */
    public byte getDataStructureType() {
        return ActiveMQBlobMessage.DATA_STRUCTURE_TYPE;
    }
    
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new ActiveMQBlobMessage();
    }

    /**
     * Un-marshal an object instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the 
 data input stream to build the object from
     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
        info.setRemoteBlobUrl(tightUnmarshalString(dataIn, bs));
        info.setMimeType(tightUnmarshalString(dataIn, bs));
        info.setDeletedByBroker(bs.readBoolean());

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;

        int rc = super.tightMarshal1(wireFormat, o, bs);
        rc += tightMarshalString1(info.getRemoteBlobUrl(), bs);
        rc += tightMarshalString1(info.getMimeType(), bs);
        bs.writeBoolean(info.isDeletedByBroker());

   
      return rc + 0;
    }

    /**
     * Write a object instance to data output stream
     *
     * @param o the instance to be marshaled
     * @param dataOut the output stream
     * @throws IOException thrown if an error occurs
     */
    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
        super.tightMarshal2(wireFormat, o, dataOut, bs);

        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
        tightMarshalString2(info.getRemoteBlobUrl(), dataOut, bs);
        tightMarshalString2(info.getMimeType(), dataOut, bs);
        bs.readBoolean();

    }

    /**
     * Un-marshal an object instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data input stream to build the object from
     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
        supe
 r.looseUnmarshal(wireFormat, o, dataIn);

        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;
        info.setRemoteBlobUrl(looseUnmarshalString(dataIn));
        info.setMimeType(looseUnmarshalString(dataIn));
        info.setDeletedByBroker(dataIn.readBoolean());

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {

        ActiveMQBlobMessage info = (ActiveMQBlobMessage)o;

        super.looseMarshal(wireFormat, o, dataOut);
        looseMarshalString(info.getRemoteBlobUrl(), dataOut);
        looseMarshalString(info.getMimeType(), dataOut);
        dataOut.writeBoolean(info.isDeletedByBroker());

    }
}
\ No newline at end of file

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBytesMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBytesMessageMarshaller.java?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBytesMessageMarshaller.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBytesMessageMarshaller.java Fri Feb 23 10:50:52 2007
@@ -0,0 +1 @@
+/**
 *
 * 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.activemq.openwire.v3;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.activemq.openwire.*;
import org.apache.activ
 emq.command.*;



/**
 * Marshalling code for Open Wire Format for ActiveMQBytesMessageMarshaller
 *
 *
 * NOTE!: This file is auto generated - do not modify!
 *        if you need to make a change, please see the modify the groovy scripts in the
 *        under src/gram/script and then use maven openwire:generate to regenerate 
 *        this file.
 *
 * @version $Revision$
 */
public class ActiveMQBytesMessageMarshaller extends ActiveMQMessageMarshaller {

    /**
     * Return the type of Data Structure we marshal
     * @return short representation of the type data structure
     */
    public byte getDataStructureType() {
        return ActiveMQBytesMessage.DATA_STRUCTURE_TYPE;
    }
    
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new ActiveMQBytesMessage();
    }

    /**
     * Un-marshal an object instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn 
 the data input stream to build the object from
     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        int rc = super.tightMarshal1(wireFormat, o, bs);

        return rc + 0;
    }

    /**
     * Write a object instance to data output stream
     *
     * @param o the instance to be marshaled
     * @param dataOut the output stream
     * @throws IOException thrown if an error occurs
     */
    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
        super.tightMarshal2(wireFormat, o, dataOut, bs);

    }

    /**
     * Un-marshal an objec
 t instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data input stream to build the object from
     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {

        super.looseMarshal(wireFormat, o, dataOut);

    }
}
\ No newline at end of file

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQDestinationMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQDestinationMarshaller.java?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQDestinationMarshaller.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQDestinationMarshaller.java Fri Feb 23 10:50:52 2007
@@ -0,0 +1 @@
+/**
 *
 * 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.activemq.openwire.v3;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.activemq.openwire.*;
import org.apache.activ
 emq.command.*;



/**
 * Marshalling code for Open Wire Format for ActiveMQDestinationMarshaller
 *
 *
 * NOTE!: This file is auto generated - do not modify!
 *        if you need to make a change, please see the modify the groovy scripts in the
 *        under src/gram/script and then use maven openwire:generate to regenerate 
 *        this file.
 *
 * @version $Revision$
 */
public abstract class ActiveMQDestinationMarshaller extends BaseDataStreamMarshaller {

    /**
     * Un-marshal an object instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data input stream to build the object from
     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

        ActiveMQDestination info = (ActiveMQDestination)o;
        info.setPhysicalName(tightUnmarshalString(dataI
 n, bs));

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        ActiveMQDestination info = (ActiveMQDestination)o;

        int rc = super.tightMarshal1(wireFormat, o, bs);
        rc += tightMarshalString1(info.getPhysicalName(), bs);

        return rc + 0;
    }

    /**
     * Write a object instance to data output stream
     *
     * @param o the instance to be marshaled
     * @param dataOut the output stream
     * @throws IOException thrown if an error occurs
     */
    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
        super.tightMarshal2(wireFormat, o, dataOut, bs);

        ActiveMQDestination info = (ActiveMQDestination)o;
        tightMarshalString2(info.getPhysicalName(), dataOut, bs);

    }

    /**
     * Un-marshal an object inst
 ance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data input stream to build the object from
     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

        ActiveMQDestination info = (ActiveMQDestination)o;
        info.setPhysicalName(looseUnmarshalString(dataIn));

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {

        ActiveMQDestination info = (ActiveMQDestination)o;

        super.looseMarshal(wireFormat, o, dataOut);
        looseMarshalString(info.getPhysicalName(), dataOut);

    }
}
\ No newline at end of file

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMapMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMapMessageMarshaller.java?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMapMessageMarshaller.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMapMessageMarshaller.java Fri Feb 23 10:50:52 2007
@@ -0,0 +1 @@
+/**
 *
 * 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.activemq.openwire.v3;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.activemq.openwire.*;
import org.apache.activ
 emq.command.*;



/**
 * Marshalling code for Open Wire Format for ActiveMQMapMessageMarshaller
 *
 *
 * NOTE!: This file is auto generated - do not modify!
 *        if you need to make a change, please see the modify the groovy scripts in the
 *        under src/gram/script and then use maven openwire:generate to regenerate 
 *        this file.
 *
 * @version $Revision$
 */
public class ActiveMQMapMessageMarshaller extends ActiveMQMessageMarshaller {

    /**
     * Return the type of Data Structure we marshal
     * @return short representation of the type data structure
     */
    public byte getDataStructureType() {
        return ActiveMQMapMessage.DATA_STRUCTURE_TYPE;
    }
    
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new ActiveMQMapMessage();
    }

    /**
     * Un-marshal an object instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data
  input stream to build the object from
     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        int rc = super.tightMarshal1(wireFormat, o, bs);

        return rc + 0;
    }

    /**
     * Write a object instance to data output stream
     *
     * @param o the instance to be marshaled
     * @param dataOut the output stream
     * @throws IOException thrown if an error occurs
     */
    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
        super.tightMarshal2(wireFormat, o, dataOut, bs);

    }

    /**
     * Un-marshal an object instan
 ce from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data input stream to build the object from
     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {

        super.looseMarshal(wireFormat, o, dataOut);

    }
}
\ No newline at end of file

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMessageMarshaller.java?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMessageMarshaller.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMessageMarshaller.java Fri Feb 23 10:50:52 2007
@@ -0,0 +1 @@
+/**
 *
 * 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.activemq.openwire.v3;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.activemq.openwire.*;
import org.apache.activ
 emq.command.*;



/**
 * Marshalling code for Open Wire Format for ActiveMQMessageMarshaller
 *
 *
 * NOTE!: This file is auto generated - do not modify!
 *        if you need to make a change, please see the modify the groovy scripts in the
 *        under src/gram/script and then use maven openwire:generate to regenerate 
 *        this file.
 *
 * @version $Revision$
 */
public class ActiveMQMessageMarshaller extends MessageMarshaller {

    /**
     * Return the type of Data Structure we marshal
     * @return short representation of the type data structure
     */
    public byte getDataStructureType() {
        return ActiveMQMessage.DATA_STRUCTURE_TYPE;
    }
    
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new ActiveMQMessage();
    }

    /**
     * Un-marshal an object instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data input stream to bui
 ld the object from
     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        int rc = super.tightMarshal1(wireFormat, o, bs);

        return rc + 0;
    }

    /**
     * Write a object instance to data output stream
     *
     * @param o the instance to be marshaled
     * @param dataOut the output stream
     * @throws IOException thrown if an error occurs
     */
    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
        super.tightMarshal2(wireFormat, o, dataOut, bs);

    }

    /**
     * Un-marshal an object instance from the data inp
 ut stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data input stream to build the object from
     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {

        super.looseMarshal(wireFormat, o, dataOut);

    }
}
\ No newline at end of file

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQObjectMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQObjectMessageMarshaller.java?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQObjectMessageMarshaller.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQObjectMessageMarshaller.java Fri Feb 23 10:50:52 2007
@@ -0,0 +1 @@
+/**
 *
 * 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.activemq.openwire.v3;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.activemq.openwire.*;
import org.apache.activ
 emq.command.*;



/**
 * Marshalling code for Open Wire Format for ActiveMQObjectMessageMarshaller
 *
 *
 * NOTE!: This file is auto generated - do not modify!
 *        if you need to make a change, please see the modify the groovy scripts in the
 *        under src/gram/script and then use maven openwire:generate to regenerate 
 *        this file.
 *
 * @version $Revision$
 */
public class ActiveMQObjectMessageMarshaller extends ActiveMQMessageMarshaller {

    /**
     * Return the type of Data Structure we marshal
     * @return short representation of the type data structure
     */
    public byte getDataStructureType() {
        return ActiveMQObjectMessage.DATA_STRUCTURE_TYPE;
    }
    
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new ActiveMQObjectMessage();
    }

    /**
     * Un-marshal an object instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dat
 aIn the data input stream to build the object from
     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        int rc = super.tightMarshal1(wireFormat, o, bs);

        return rc + 0;
    }

    /**
     * Write a object instance to data output stream
     *
     * @param o the instance to be marshaled
     * @param dataOut the output stream
     * @throws IOException thrown if an error occurs
     */
    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
        super.tightMarshal2(wireFormat, o, dataOut, bs);

    }

    /**
     * Un-marshal an o
 bject instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data input stream to build the object from
     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {

        super.looseMarshal(wireFormat, o, dataOut);

    }
}
\ No newline at end of file

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQQueueMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQQueueMarshaller.java?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQQueueMarshaller.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQQueueMarshaller.java Fri Feb 23 10:50:52 2007
@@ -0,0 +1 @@
+/**
 *
 * 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.activemq.openwire.v3;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.activemq.openwire.*;
import org.apache.activ
 emq.command.*;



/**
 * Marshalling code for Open Wire Format for ActiveMQQueueMarshaller
 *
 *
 * NOTE!: This file is auto generated - do not modify!
 *        if you need to make a change, please see the modify the groovy scripts in the
 *        under src/gram/script and then use maven openwire:generate to regenerate 
 *        this file.
 *
 * @version $Revision$
 */
public class ActiveMQQueueMarshaller extends ActiveMQDestinationMarshaller {

    /**
     * Return the type of Data Structure we marshal
     * @return short representation of the type data structure
     */
    public byte getDataStructureType() {
        return ActiveMQQueue.DATA_STRUCTURE_TYPE;
    }
    
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new ActiveMQQueue();
    }

    /**
     * Un-marshal an object instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data input stream to
  build the object from
     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        int rc = super.tightMarshal1(wireFormat, o, bs);

        return rc + 0;
    }

    /**
     * Write a object instance to data output stream
     *
     * @param o the instance to be marshaled
     * @param dataOut the output stream
     * @throws IOException thrown if an error occurs
     */
    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
        super.tightMarshal2(wireFormat, o, dataOut, bs);

    }

    /**
     * Un-marshal an object instance from the data
  input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data input stream to build the object from
     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {

        super.looseMarshal(wireFormat, o, dataOut);

    }
}
\ No newline at end of file

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQStreamMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQStreamMessageMarshaller.java?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQStreamMessageMarshaller.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQStreamMessageMarshaller.java Fri Feb 23 10:50:52 2007
@@ -0,0 +1 @@
+/**
 *
 * 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.activemq.openwire.v3;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.activemq.openwire.*;
import org.apache.activ
 emq.command.*;



/**
 * Marshalling code for Open Wire Format for ActiveMQStreamMessageMarshaller
 *
 *
 * NOTE!: This file is auto generated - do not modify!
 *        if you need to make a change, please see the modify the groovy scripts in the
 *        under src/gram/script and then use maven openwire:generate to regenerate 
 *        this file.
 *
 * @version $Revision$
 */
public class ActiveMQStreamMessageMarshaller extends ActiveMQMessageMarshaller {

    /**
     * Return the type of Data Structure we marshal
     * @return short representation of the type data structure
     */
    public byte getDataStructureType() {
        return ActiveMQStreamMessage.DATA_STRUCTURE_TYPE;
    }
    
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new ActiveMQStreamMessage();
    }

    /**
     * Un-marshal an object instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dat
 aIn the data input stream to build the object from
     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        int rc = super.tightMarshal1(wireFormat, o, bs);

        return rc + 0;
    }

    /**
     * Write a object instance to data output stream
     *
     * @param o the instance to be marshaled
     * @param dataOut the output stream
     * @throws IOException thrown if an error occurs
     */
    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
        super.tightMarshal2(wireFormat, o, dataOut, bs);

    }

    /**
     * Un-marshal an o
 bject instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data input stream to build the object from
     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {

        super.looseMarshal(wireFormat, o, dataOut);

    }
}
\ No newline at end of file

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempDestinationMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempDestinationMarshaller.java?view=auto&rev=511045
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempDestinationMarshaller.java (added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempDestinationMarshaller.java Fri Feb 23 10:50:52 2007
@@ -0,0 +1 @@
+/**
 *
 * 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.activemq.openwire.v3;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.activemq.openwire.*;
import org.apache.activ
 emq.command.*;



/**
 * Marshalling code for Open Wire Format for ActiveMQTempDestinationMarshaller
 *
 *
 * NOTE!: This file is auto generated - do not modify!
 *        if you need to make a change, please see the modify the groovy scripts in the
 *        under src/gram/script and then use maven openwire:generate to regenerate 
 *        this file.
 *
 * @version $Revision$
 */
public abstract class ActiveMQTempDestinationMarshaller extends ActiveMQDestinationMarshaller {

    /**
     * Un-marshal an object instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data input stream to build the object from
     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

    }


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public
  int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        int rc = super.tightMarshal1(wireFormat, o, bs);

        return rc + 0;
    }

    /**
     * Write a object instance to data output stream
     *
     * @param o the instance to be marshaled
     * @param dataOut the output stream
     * @throws IOException thrown if an error occurs
     */
    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
        super.tightMarshal2(wireFormat, o, dataOut, bs);

    }

    /**
     * Un-marshal an object instance from the data input stream
     *
     * @param o the object to un-marshal
     * @param dataIn the data input stream to build the object from
     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

    }


    /**
      * Write the booleans that this object uses to a BooleanStream
     */
    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {

        super.looseMarshal(wireFormat, o, dataOut);

    }
}
\ No newline at end of file



Mime
View raw message