Class NullMessageReference
- java.lang.Object
-
- org.apache.activemq.broker.region.NullMessageReference
-
- All Implemented Interfaces:
MessageReference,QueueMessageReference
public final class NullMessageReference extends Object implements QueueMessageReference
Used by theQueueMessageReference.NULL_MESSAGE
-
-
Field Summary
-
Fields inherited from interface org.apache.activemq.broker.region.QueueMessageReference
NULL_MESSAGE
-
-
Constructor Summary
Constructors Constructor Description NullMessageReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanProcessAsExpired()intdecrementReferenceCount()voiddrop()booleandropIfLive()longgetExpiration()StringgetGroupID()intgetGroupSequence()LockOwnergetLockOwner()MessagegetMessage()MessagegetMessageHardRef()MessageIdgetMessageId()intgetRedeliveryCounter()intgetReferenceCount()DestinationgetRegionDestination()intgetSize()ConsumerIdgetTargetConsumerId()voidincrementRedeliveryCounter()intincrementReferenceCount()booleanisAcked()booleanisAdvisory()booleanisDropped()Returns true if this message is dropped.booleanisExpired()Returns true if this message is expiredbooleanisPersistent()booleanlock(LockOwner subscription)voidsetAcked(boolean b)booleanunlock()
-
-
-
Method Detail
-
drop
public void drop()
- Specified by:
dropin interfaceQueueMessageReference
-
dropIfLive
public boolean dropIfLive()
- Specified by:
dropIfLivein interfaceQueueMessageReference
-
getLockOwner
public LockOwner getLockOwner()
- Specified by:
getLockOwnerin interfaceQueueMessageReference
-
isAcked
public boolean isAcked()
- Specified by:
isAckedin interfaceQueueMessageReference
-
isDropped
public boolean isDropped()
Description copied from interface:MessageReferenceReturns true if this message is dropped.- Specified by:
isDroppedin interfaceMessageReference- Specified by:
isDroppedin interfaceQueueMessageReference
-
lock
public boolean lock(LockOwner subscription)
- Specified by:
lockin interfaceQueueMessageReference
-
setAcked
public void setAcked(boolean b)
- Specified by:
setAckedin interfaceQueueMessageReference
-
unlock
public boolean unlock()
- Specified by:
unlockin interfaceQueueMessageReference
-
decrementReferenceCount
public int decrementReferenceCount()
- Specified by:
decrementReferenceCountin interfaceMessageReference
-
getExpiration
public long getExpiration()
- Specified by:
getExpirationin interfaceMessageReference
-
getGroupID
public String getGroupID()
- Specified by:
getGroupIDin interfaceMessageReference
-
getGroupSequence
public int getGroupSequence()
- Specified by:
getGroupSequencein interfaceMessageReference
-
getMessage
public Message getMessage()
- Specified by:
getMessagein interfaceMessageReference
-
getMessageHardRef
public Message getMessageHardRef()
- Specified by:
getMessageHardRefin interfaceMessageReference
-
getMessageId
public MessageId getMessageId()
- Specified by:
getMessageIdin interfaceMessageReference
-
getRedeliveryCounter
public int getRedeliveryCounter()
- Specified by:
getRedeliveryCounterin interfaceMessageReference
-
getReferenceCount
public int getReferenceCount()
- Specified by:
getReferenceCountin interfaceMessageReference
-
getRegionDestination
public Destination getRegionDestination()
- Specified by:
getRegionDestinationin interfaceMessageReference
-
getSize
public int getSize()
- Specified by:
getSizein interfaceMessageReference
-
getTargetConsumerId
public ConsumerId getTargetConsumerId()
- Specified by:
getTargetConsumerIdin interfaceMessageReference
-
incrementRedeliveryCounter
public void incrementRedeliveryCounter()
- Specified by:
incrementRedeliveryCounterin interfaceMessageReference
-
incrementReferenceCount
public int incrementReferenceCount()
- Specified by:
incrementReferenceCountin interfaceMessageReference
-
isExpired
public boolean isExpired()
Description copied from interface:MessageReferenceReturns true if this message is expired- Specified by:
isExpiredin interfaceMessageReference
-
isPersistent
public boolean isPersistent()
- Specified by:
isPersistentin interfaceMessageReference
-
isAdvisory
public boolean isAdvisory()
- Specified by:
isAdvisoryin interfaceMessageReference- Returns:
- true if the message is an advisory
-
canProcessAsExpired
public boolean canProcessAsExpired()
- Specified by:
canProcessAsExpiredin interfaceMessageReference
-
-