activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r465649 - in /incubator/activemq/trunk/activemq-core/src: main/java/org/apache/activemq/command/Message.java main/java/org/apache/activemq/openwire/v2/MessageMarshaller.java test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java
Date Thu, 19 Oct 2006 14:57:32 GMT
Author: chirino
Date: Thu Oct 19 07:57:31 2006
New Revision: 465649

URL: http://svn.apache.org/viewvc?view=rev&rev=465649
Log:
Adding a droppable flag to each message

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/Message.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageMarshaller.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/Message.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/Message.java?view=diff&rev=465649&r1=465648&r2=465649
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/Message.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/Message.java
Thu Oct 19 07:57:31 2006
@@ -83,6 +83,7 @@
     private transient ByteSequence cachedWireFormatData;
 
     private BrokerId [] brokerPath;
+    protected boolean droppable = false;
 
     abstract public Message copy();
     
@@ -632,4 +633,14 @@
     public void onMessageRolledBack() {
         incrementRedeliveryCounter();
     }
+
+    /**
+     * @openwire:property version=2 cache=true
+     */
+	public boolean isDroppable() {
+		return droppable;
+	}
+	public void setDroppable(boolean droppable) {
+		this.droppable = droppable;
+	}
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageMarshaller.java?view=diff&rev=465649&r1=465648&r2=465649
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageMarshaller.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/MessageMarshaller.java
Thu Oct 19 07:57:31 2006
@@ -90,6 +90,7 @@
         info.setArrival(tightUnmarshalLong(wireFormat, dataIn, bs));
         info.setUserID(tightUnmarshalString(dataIn, bs));
         info.setRecievedByDFBridge(bs.readBoolean());
+        info.setDroppable(bs.readBoolean());
 
         info.afterUnmarshall(wireFormat);
 
@@ -128,6 +129,7 @@
         rc+=tightMarshalLong1(wireFormat, info.getArrival(), bs);
         rc += tightMarshalString1(info.getUserID(), bs);
         bs.writeBoolean(info.isRecievedByDFBridge());
+        bs.writeBoolean(info.isDroppable());
 
         return rc + 9;
     }
@@ -168,6 +170,7 @@
         tightMarshalLong2(wireFormat, info.getArrival(), dataOut, bs);
         tightMarshalString2(info.getUserID(), dataOut, bs);
         bs.readBoolean();
+        bs.readBoolean();
 
         info.afterMarshall(wireFormat);
 
@@ -223,6 +226,7 @@
         info.setArrival(looseUnmarshalLong(wireFormat, dataIn));
         info.setUserID(looseUnmarshalString(dataIn));
         info.setRecievedByDFBridge(dataIn.readBoolean());
+        info.setDroppable(dataIn.readBoolean());
 
         info.afterUnmarshall(wireFormat);
 
@@ -264,6 +268,7 @@
         looseMarshalLong(wireFormat, info.getArrival(), dataOut);
         looseMarshalString(info.getUserID(), dataOut);
         dataOut.writeBoolean(info.isRecievedByDFBridge());
+        dataOut.writeBoolean(info.isDroppable());
 
     }
 }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java?view=diff&rev=465649&r1=465648&r2=465649
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java
Thu Oct 19 07:57:31 2006
@@ -80,5 +80,6 @@
         info.setArrival(3);
         info.setUserID("UserID:16");
         info.setRecievedByDFBridge(true);
+        info.setDroppable(false);
     }
 }



Mime
View raw message