activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r356522 - /incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/command/RemoveInfo.java
Date Tue, 13 Dec 2005 16:20:17 GMT
Author: jstrachan
Date: Tue Dec 13 08:20:11 2005
New Revision: 356522

URL: http://svn.apache.org/viewcvs?rev=356522&view=rev
Log:
added some helper methods to make it easy to see the type of removal event

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/command/RemoveInfo.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/command/RemoveInfo.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/command/RemoveInfo.java?rev=356522&r1=356521&r2=356522&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/command/RemoveInfo.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/command/RemoveInfo.java
Tue Dec 13 08:20:11 2005
@@ -69,5 +69,33 @@
             throw new IOException("Unknown remove command type: "+ objectId.getDataStructureType());
         }
     }
+    
+    /**
+     * Returns true if this event is for a removed connection
+     */
+    public boolean isConnectionRemove() {
+        return objectId.getDataStructureType() == ConnectionId.DATA_STRUCTURE_TYPE;
+    }
+    
+    /**
+     * Returns true if this event is for a removed session
+     */
+    public boolean isSessionRemove() {
+        return objectId.getDataStructureType() == SessionId.DATA_STRUCTURE_TYPE;
+    }
+    
+    /**
+     * Returns true if this event is for a removed consumer
+     */
+    public boolean isConsumerRemove() {
+        return objectId.getDataStructureType() == ConsumerId.DATA_STRUCTURE_TYPE;
+    }
+
+    /**
+     * Returns true if this event is for a removed producer
+     */
+    public boolean isProducerRemove() {
+        return objectId.getDataStructureType() == ProducerId.DATA_STRUCTURE_TYPE;
+    }
 
 }



Mime
View raw message