Class AmqpJmsStreamMessageFacade

java.lang.Object
org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFacade
org.apache.qpid.jms.provider.amqp.message.AmqpJmsStreamMessageFacade
All Implemented Interfaces:
JmsMessageFacade, JmsStreamMessageFacade, TraceableMessage

public class AmqpJmsStreamMessageFacade extends AmqpJmsMessageFacade implements JmsStreamMessageFacade
Wrapper around an AMQP Message instance that will be treated as a JMS StreamMessage type.
  • Constructor Details

    • AmqpJmsStreamMessageFacade

      public AmqpJmsStreamMessageFacade()
  • Method Details

    • copy

      Description copied from interface: JmsMessageFacade
      Create a new instance and perform a deep copy of this object's contents.
      Specified by:
      copy in interface JmsMessageFacade
      Specified by:
      copy in interface JmsStreamMessageFacade
      Overrides:
      copy in class AmqpJmsMessageFacade
      Returns:
      a copy of this JmsMessageFacade instance.
    • getJmsMsgType

      public byte getJmsMsgType()
      Overrides:
      getJmsMsgType in class AmqpJmsMessageFacade
      Returns:
      the appropriate byte value that indicates the type of message this is.
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface JmsStreamMessageFacade
      Returns:
      true if the stream contains another element beyond the current.
    • peek

      public Object peek() throws jakarta.jms.MessageEOFException
      Description copied from interface: JmsStreamMessageFacade
      Peek and return the next element in the stream. If the stream has been fully read then this method should throw a MessageEOFException. Multiple calls to peek should return the same element.
      Specified by:
      peek in interface JmsStreamMessageFacade
      Returns:
      the next value in the stream without removing it.
      Throws:
      jakarta.jms.MessageEOFException - if end of message stream has been reached.
    • pop

      public void pop() throws jakarta.jms.MessageEOFException
      Description copied from interface: JmsStreamMessageFacade
      Pops the next element in the stream.
      Specified by:
      pop in interface JmsStreamMessageFacade
      Throws:
      jakarta.jms.MessageEOFException - if end of message stream has been reached.
    • put

      public void put(Object value)
      Description copied from interface: JmsStreamMessageFacade
      Writes a new object value to the stream. If the value provided is a byte[] its entry then it is assumed that it was copied by the caller and its value will not be altered by the provider.
      Specified by:
      put in interface JmsStreamMessageFacade
      Parameters:
      value - The object value to be written to the stream.
    • reset

      public void reset()
      Description copied from interface: JmsStreamMessageFacade
      Reset the position of the stream to the beginning.
      Specified by:
      reset in interface JmsStreamMessageFacade
    • clearBody

      public void clearBody()
      Description copied from interface: JmsMessageFacade
      Clears the contents of this Message.
      Specified by:
      clearBody in interface JmsMessageFacade
      Overrides:
      clearBody in class AmqpJmsMessageFacade
    • hasBody

      public boolean hasBody()
      Description copied from interface: JmsMessageFacade
      Returns true if the underlying message has a body, false if the body is empty.
      Specified by:
      hasBody in interface JmsMessageFacade
      Overrides:
      hasBody in class AmqpJmsMessageFacade
      Returns:
      true if the underlying message has a body, false if the body is empty.
    • asJmsMessage

      public JmsStreamMessage asJmsMessage()
      Overrides:
      asJmsMessage in class AmqpJmsMessageFacade
    • initializeEmptyBody

      protected void initializeEmptyBody()
      Description copied from class: AmqpJmsMessageFacade
      Used to indicate that a Message object should empty the body element and make any other internal updates to reflect the message now has no body value.
      Overrides:
      initializeEmptyBody in class AmqpJmsMessageFacade