Interface ICoreMessage

All Superinterfaces:
Message
All Known Subinterfaces:
ClientMessage

public interface ICoreMessage extends Message
This interface is only to determine the API of methods required for Core Messages
  • Method Details

    • setBuffer

      Message setBuffer(io.netty.buffer.ByteBuf buffer)
      The buffer will belong to this message, until release is called.
    • getBuffer

      io.netty.buffer.ByteBuf getBuffer()
    • getLargeBodyReader

      org.apache.activemq.artemis.core.message.LargeBodyReader getLargeBodyReader() throws ActiveMQException
      Throws:
      ActiveMQException
    • getHeadersAndPropertiesEncodeSize

      int getHeadersAndPropertiesEncodeSize()
    • getBodyInputStream

      InputStream getBodyInputStream()
      Specified by:
      getBodyInputStream in interface Message
    • getReadOnlyBodyBuffer

      ActiveMQBuffer getReadOnlyBodyBuffer()
      Returns a new Buffer slicing the current Body.
      Returns:
      a new Buffer slicing the current Body
    • getBodyBufferSize

      int getBodyBufferSize()
      Returns the length in bytes of the body buffer.
      Returns:
      the length in bytes of the body buffer
    • getDataBuffer

      ActiveMQBuffer getDataBuffer()
      Returns a readOnlyBodyBuffer or a decompressed one if the message is compressed or the large message buffer.
      Returns:
      a readOnlyBodyBuffer or a decompressed one if the message is compressed or the large message buffer
    • getType

      byte getType()
      Specified by:
      getType in interface Message
    • setType

      org.apache.activemq.artemis.core.message.impl.CoreMessage setType(byte type)
      Specified by:
      setType in interface Message
    • isServerMessage

      boolean isServerMessage()
      We are really interested if this is a LargeServerMessage.
    • getBodyBuffer

      ActiveMQBuffer getBodyBuffer()
      The buffer to write the body. Warning: If you just want to read the content of a message, use getDataBuffer() or getReadOnlyBodyBuffer()
      Specified by:
      getBodyBuffer in interface Message
    • getEndOfBodyPosition

      int getEndOfBodyPosition()
    • moveHeadersAndProperties

      void moveHeadersAndProperties(Message msg)
      Used on large messages treatment. this method is used to transfer properties from a temporary CoreMessage to a definitive one. This is used when before a Message was defined as a LargeMessages, its properties are then moved from the Temporary message to its final LargeMessage object.

      Be careful as this will not perform a copy of the Properties. For real copy, use the copy methods or copy constructors.

    • sendBuffer_1X

      void sendBuffer_1X(io.netty.buffer.ByteBuf sendBuffer)
    • receiveBuffer_1X

      void receiveBuffer_1X(io.netty.buffer.ByteBuf buffer)
      it will fix the body of incoming messages from 1.x and before versions
    • toMap

      default Map<String,Object> toMap(int valueSizeLimit)
      Returns the message in Map form, useful when encoding to JSON.
      Specified by:
      toMap in interface Message
      Parameters:
      valueSizeLimit - that limits [] map values
      Returns:
      the message in Map form, useful when encoding to JSON
    • isConfirmed

      default boolean isConfirmed()
    • setConfirmed

      default void setConfirmed(boolean confirmed)