Class AbstractProtocolReference

java.lang.Object
org.apache.activemq.artemis.utils.collections.LinkedListImpl.Node<MessageReferenceImpl>
org.apache.activemq.artemis.core.server.impl.AbstractProtocolReference
All Implemented Interfaces:
MessageReference
Direct Known Subclasses:
MessageReferenceImpl, PagedReferenceImpl

public abstract class AbstractProtocolReference extends LinkedListImpl.Node<MessageReferenceImpl> implements MessageReference
I need to store protocol specific data on the references. The same need exists in both PagedReference and MessageReferenceImpl. This class will serve the purpose to keep the specific protocol data for either reference.
  • Field Details

    • sequence

      protected volatile long sequence
  • Constructor Details

    • AbstractProtocolReference

      public AbstractProtocolReference()
  • Method Details

    • getProtocolData

      public <T> T getProtocolData(Class<T> classType)
      Description copied from interface: MessageReference
      To be used on holding protocol specific data during the delivery. This will be only valid while the message is on the delivering queue at the consumer
      Specified by:
      getProtocolData in interface MessageReference
    • setProtocolData

      public <T> void setProtocolData(Class<T> classType, T protocolData)
      Description copied from interface: MessageReference
      To be used on holding protocol specific data during the delivery. This will be only valid while the message is on the delivering queue at the consumer
      Specified by:
      setProtocolData in interface MessageReference
    • getSequence

      public long getSequence()
      Specified by:
      getSequence in interface MessageReference
    • setSequence

      public void setSequence(long nextSequence)
      Specified by:
      setSequence in interface MessageReference