org.jboss.messaging.core.plugin
Class SimpleMessageReference
java.lang.Object
org.jboss.messaging.core.message.RoutableSupport
org.jboss.messaging.core.plugin.SimpleMessageReference
- All Implemented Interfaces:
- java.io.Externalizable, MessageReference, Routable, java.io.Serializable
- public class SimpleMessageReference
- extends RoutableSupport
- implements MessageReference
A Simple MessageReference implementation.
Note that we do not need WeakReferences to message/holder objects since with the new
lazy loading schema we guarantee that if a message ref is in memory - it's corresponding message is
in memory too
- Version:
- 1.3
SimpleMessageReference.java,v 1.3 2006/02/23 17:45:57 timfox Exp
- Author:
- Serialized Form
Fields inherited from class org.jboss.messaging.core.message.RoutableSupport |
BOOLEAN, BYTE, BYTES, deliveryCount, DOUBLE, expiration, FLOAT, headers, INT, LIST, LONG, MAP, messageID, NULL, OBJECT, priority, reliable, SHORT, STRING, timestamp |
Methods inherited from class org.jboss.messaging.core.message.RoutableSupport |
containsHeader, decrementDeliveryCount, getDeliveryCount, getExpiration, getHeader, getHeaderNames, getHeaders, getMessageID, getPriority, getTimestamp, incrementDeliveryCount, internalReadObject, internalWriteObject, isExpired, isReliable, putHeader, readExternal, readList, readMap, removeHeader, setDeliveryCount, setPriority, setReliable, writeExternal, writeList, writeMap |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.messaging.core.Routable |
containsHeader, decrementDeliveryCount, getDeliveryCount, getExpiration, getHeader, getHeaderNames, getHeaders, getMessageID, getPriority, getTimestamp, incrementDeliveryCount, isExpired, isReliable, putHeader, removeHeader, setDeliveryCount, setPriority, setReliable |
ms
protected transient MessageStore ms
SimpleMessageReference
public SimpleMessageReference()
- Required by externalization.
SimpleMessageReference
public SimpleMessageReference(org.jboss.messaging.core.plugin.MessageHolder holder,
MessageStore ms)
- Creates a reference based on a given message.
SimpleMessageReference
public SimpleMessageReference(SimpleMessageReference other)
SimpleMessageReference
protected SimpleMessageReference(long messageID,
boolean reliable,
long expiration,
long timestamp,
java.util.Map headers,
int deliveryCount,
byte priority,
MessageStore ms)
isReference
public boolean isReference()
- Specified by:
isReference
in interface Routable
getStoreID
public java.io.Serializable getStoreID()
- Specified by:
getStoreID
in interface MessageReference
getMessage
public Message getMessage()
- Description copied from interface:
Routable
- If it is a Message instance, then it returns itself, otherwise it will return the Message
corresponding to this MessageReference.
- Specified by:
getMessage
in interface Routable
releaseMemoryReference
public void releaseMemoryReference()
- Specified by:
releaseMemoryReference
in interface MessageReference
getInMemoryChannelCount
public int getInMemoryChannelCount()
- Specified by:
getInMemoryChannelCount
in interface MessageReference
getOrdering
public long getOrdering()
- Specified by:
getOrdering
in interface MessageReference
setOrdering
public void setOrdering(long ordering)
- Specified by:
setOrdering
in interface MessageReference
copy
public MessageReference copy()
- Specified by:
copy
in interface MessageReference
equals
public boolean equals(java.lang.Object o)
hashCode
public int hashCode()
toString
public java.lang.String toString()
- Overrides:
toString
in class RoutableSupport
Copyright © 2006 JBoss Inc. All Rights Reserved.