Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 16611 invoked from network); 13 Dec 2005 16:20:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Dec 2005 16:20:41 -0000 Received: (qmail 9962 invoked by uid 500); 13 Dec 2005 16:20:41 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 9947 invoked by uid 500); 13 Dec 2005 16:20:41 -0000 Mailing-List: contact activemq-commits-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-commits@geronimo.apache.org Received: (qmail 9933 invoked by uid 99); 13 Dec 2005 16:20:41 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2005 08:20:41 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 13 Dec 2005 08:20:40 -0800 Received: (qmail 15576 invoked by uid 65534); 13 Dec 2005 16:20:19 -0000 Message-ID: <20051213162019.15503.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: activemq-commits@geronimo.apache.org From: jstrachan@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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; + } }