activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r561428 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/PropertyExpression.java
Date Tue, 31 Jul 2007 18:34:33 GMT
Author: rajdavies
Date: Tue Jul 31 11:34:32 2007
New Revision: 561428

URL: http://svn.apache.org/viewvc?view=rev&rev=561428
Log:
updated message properties

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/PropertyExpression.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/PropertyExpression.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/PropertyExpression.java?view=diff&rev=561428&r1=561427&r2=561428
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/PropertyExpression.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/filter/PropertyExpression.java
Tue Jul 31 11:34:32 2007
@@ -41,109 +41,114 @@
     }
     
     static final private HashMap JMS_PROPERTY_EXPRESSIONS = new HashMap();  
-    static {
-        JMS_PROPERTY_EXPRESSIONS.put("JMSDestination", new SubExpression() {
-            public Object evaluate(Message message) {
-                ActiveMQDestination dest = message.getOriginalDestination();
-                if( dest == null )
-                    dest = message.getDestination();
-                if( dest == null )
+    static{
+        JMS_PROPERTY_EXPRESSIONS.put("JMSDestination",new SubExpression(){
+
+            public Object evaluate(Message message){
+                ActiveMQDestination dest=message.getOriginalDestination();
+                if(dest==null)
+                    dest=message.getDestination();
+                if(dest==null)
                     return null;
                 return dest.toString();
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSReplyTo", new SubExpression() {
-            public Object evaluate(Message message) {
-                if( message.getReplyTo() == null )
+        JMS_PROPERTY_EXPRESSIONS.put("JMSReplyTo",new SubExpression(){
+
+            public Object evaluate(Message message){
+                if(message.getReplyTo()==null)
                     return null;
                 return message.getReplyTo().toString();
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSType", new SubExpression() {
-            public Object evaluate(Message message) {
+        JMS_PROPERTY_EXPRESSIONS.put("JMSType",new SubExpression(){
+
+            public Object evaluate(Message message){
                 return message.getType();
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSDeliveryMode", new SubExpression() {
-            public Object evaluate(Message message) {
-                return Integer.valueOf(message.isPersistent() ? DeliveryMode.PERSISTENT :
DeliveryMode.NON_PERSISTENT );
+        JMS_PROPERTY_EXPRESSIONS.put("JMSDeliveryMode",new SubExpression(){
+
+            public Object evaluate(Message message){
+                return Integer.valueOf(message.isPersistent()?DeliveryMode.PERSISTENT:DeliveryMode.NON_PERSISTENT);
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSPriority", new SubExpression() {
-            public Object evaluate(Message message) {
+        JMS_PROPERTY_EXPRESSIONS.put("JMSPriority",new SubExpression(){
+
+            public Object evaluate(Message message){
                 return Integer.valueOf(message.getPriority());
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSMessageID", new SubExpression() {
-            public Object evaluate(Message message) {
-                if( message.getMessageId() == null )
+        JMS_PROPERTY_EXPRESSIONS.put("JMSMessageID",new SubExpression(){
+
+            public Object evaluate(Message message){
+                if(message.getMessageId()==null)
                     return null;
                 return message.getMessageId().toString();
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSTimestamp", new SubExpression() {
-            public Object evaluate(Message message) {
+        JMS_PROPERTY_EXPRESSIONS.put("JMSTimestamp",new SubExpression(){
+
+            public Object evaluate(Message message){
                 return Long.valueOf(message.getTimestamp());
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSCorrelationID", new SubExpression() {
-            public Object evaluate(Message message) {
+        JMS_PROPERTY_EXPRESSIONS.put("JMSCorrelationID",new SubExpression(){
+
+            public Object evaluate(Message message){
                 return message.getCorrelationId();
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSExpiration", new SubExpression() {
-            public Object evaluate(Message message) {
+        JMS_PROPERTY_EXPRESSIONS.put("JMSExpiration",new SubExpression(){
+
+            public Object evaluate(Message message){
                 return Long.valueOf(message.getExpiration());
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSPriority", new SubExpression() {
-            public Object evaluate(Message message) {
-                return Integer.valueOf(message.getPriority());
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSTimestamp", new SubExpression() {
-            public Object evaluate(Message message) {
-                return Long.valueOf(message.getTimestamp());
-            }
-        });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSRedelivered", new SubExpression() {
-            public Object evaluate(Message message) {
+        JMS_PROPERTY_EXPRESSIONS.put("JMSRedelivered",new SubExpression(){
+
+            public Object evaluate(Message message){
                 return Boolean.valueOf(message.isRedelivered());
             }
         });
-        
-        JMS_PROPERTY_EXPRESSIONS.put("JMSXDeliveryCount", new SubExpression() {
-            public Object evaluate(Message message) {
+        JMS_PROPERTY_EXPRESSIONS.put("JMSXDeliveryCount",new SubExpression(){
+
+            public Object evaluate(Message message){
                 return Integer.valueOf(message.getRedeliveryCounter()+1);
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSXGroupID", new SubExpression() {
-            public Object evaluate(Message message) {
+        JMS_PROPERTY_EXPRESSIONS.put("JMSXGroupID",new SubExpression(){
+
+            public Object evaluate(Message message){
                 return message.getGroupID();
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSXGroupSeq", new SubExpression() {
-            public Object evaluate(Message message) {
+        JMS_PROPERTY_EXPRESSIONS.put("JMSXGroupSeq",new SubExpression(){
+
+            public Object evaluate(Message message){
                 return new Integer(message.getGroupSequence());
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMSXProducerTXID", new SubExpression() {
-            public Object evaluate(Message message) {
-                TransactionId txId = message.getOriginalTransactionId();
-                if( txId==null)
-                    txId = message.getTransactionId();
-                if( txId==null )
+        JMS_PROPERTY_EXPRESSIONS.put("JMSXProducerTXID",new SubExpression(){
+
+            public Object evaluate(Message message){
+                TransactionId txId=message.getOriginalTransactionId();
+                if(txId==null)
+                    txId=message.getTransactionId();
+                if(txId==null)
                     return null;
                 return new Integer(txId.toString());
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMS_ActiveMQBrokerInTime", new SubExpression() {
-            public Object evaluate(Message message) {
+        JMS_PROPERTY_EXPRESSIONS.put("JMSActiveMQBrokerInTime",new SubExpression(){
+
+            public Object evaluate(Message message){
                 return Long.valueOf(message.getBrokerInTime());
             }
         });
-        JMS_PROPERTY_EXPRESSIONS.put("JMS_ActiveMQBrokerOutTime", new SubExpression() {
-            public Object evaluate(Message message) {
+        JMS_PROPERTY_EXPRESSIONS.put("JMSActiveMQBrokerOutTime",new SubExpression(){
+
+            public Object evaluate(Message message){
                 return Long.valueOf(message.getBrokerOutTime());
             }
         });



Mime
View raw message