Class RawMessageImpl

  • All Implemented Interfaces:
    java.lang.AutoCloseable, RawMessage

    public class RawMessageImpl
    extends java.lang.Object
    implements RawMessage
    • Constructor Summary

      Constructors 
      Constructor Description
      RawMessageImpl​(org.apache.pulsar.common.api.proto.MessageIdData id, io.netty.buffer.ByteBuf headersAndPayload)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      static RawMessage deserializeFrom​(io.netty.buffer.ByteBuf buffer)  
      io.netty.buffer.ByteBuf getHeadersAndPayload()
      Get a ByteBuf which contains the headers and payload of the message.
      org.apache.pulsar.client.api.MessageId getMessageId()
      Get the message ID of this message.
      org.apache.pulsar.common.api.proto.MessageIdData getMessageIdData()
      Get the protobuf representation of the message ID of this message.
      io.netty.buffer.ByteBuf serialize()
      Serialize a raw message to a ByteBuf.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RawMessageImpl

        public RawMessageImpl​(org.apache.pulsar.common.api.proto.MessageIdData id,
                              io.netty.buffer.ByteBuf headersAndPayload)
    • Method Detail

      • getMessageId

        public org.apache.pulsar.client.api.MessageId getMessageId()
        Description copied from interface: RawMessage
        Get the message ID of this message.
        Specified by:
        getMessageId in interface RawMessage
      • getMessageIdData

        public org.apache.pulsar.common.api.proto.MessageIdData getMessageIdData()
        Description copied from interface: RawMessage
        Get the protobuf representation of the message ID of this message.
        Specified by:
        getMessageIdData in interface RawMessage
      • getHeadersAndPayload

        public io.netty.buffer.ByteBuf getHeadersAndPayload()
        Description copied from interface: RawMessage
        Get a ByteBuf which contains the headers and payload of the message. The payload may be compressed and encrypted, but whether this is the case can be verified by decoding the headers which are not.
        Specified by:
        getHeadersAndPayload in interface RawMessage
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface RawMessage
      • serialize

        public io.netty.buffer.ByteBuf serialize()
        Description copied from interface: RawMessage
        Serialize a raw message to a ByteBuf. The caller is responsible for releasing the returned ByteBuf.
        Specified by:
        serialize in interface RawMessage
      • deserializeFrom

        public static RawMessage deserializeFrom​(io.netty.buffer.ByteBuf buffer)