Class RawMessageImpl

java.lang.Object
org.apache.pulsar.client.impl.RawMessageImpl
All Implemented Interfaces:
AutoCloseable, RawMessage

public class RawMessageImpl extends Object implements RawMessage
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    void
     
    static RawMessage
    deserializeFrom(io.netty.buffer.ByteBuf buffer)
     
    io.netty.buffer.ByteBuf
    Get a ByteBuf which contains the headers and payload of the message.
    org.apache.pulsar.client.api.MessageId
    Get the message ID of this message.
    org.apache.pulsar.common.api.proto.MessageIdData
    Get the protobuf representation of the message ID of this message.
    io.netty.buffer.ByteBuf
    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 Details

    • RawMessageImpl

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

    • 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 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)