mirror of https://github.com/apache/activemq.git
added some helper methods to make it easy to see the type of removal event
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@356522 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ecfbe6168d
commit
1835e45369
|
@ -69,5 +69,33 @@ public class RemoveInfo extends BaseCommand {
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue