Package org.apache.pulsar.client.impl
Class RawMessageImpl
- java.lang.Object
-
- org.apache.pulsar.client.impl.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 voidclose()static RawMessagedeserializeFrom(io.netty.buffer.ByteBuf buffer)io.netty.buffer.ByteBufgetHeadersAndPayload()Get a ByteBuf which contains the headers and payload of the message.org.apache.pulsar.client.api.MessageIdgetMessageId()Get the message ID of this message.org.apache.pulsar.common.api.proto.MessageIdDatagetMessageIdData()Get the protobuf representation of the message ID of this message.io.netty.buffer.ByteBufserialize()Serialize a raw message to a ByteBuf.
-
-
-
Method Detail
-
getMessageId
public org.apache.pulsar.client.api.MessageId getMessageId()
Description copied from interface:RawMessageGet the message ID of this message.- Specified by:
getMessageIdin interfaceRawMessage
-
getMessageIdData
public org.apache.pulsar.common.api.proto.MessageIdData getMessageIdData()
Description copied from interface:RawMessageGet the protobuf representation of the message ID of this message.- Specified by:
getMessageIdDatain interfaceRawMessage
-
getHeadersAndPayload
public io.netty.buffer.ByteBuf getHeadersAndPayload()
Description copied from interface:RawMessageGet 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:
getHeadersAndPayloadin interfaceRawMessage
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceRawMessage
-
serialize
public io.netty.buffer.ByteBuf serialize()
Description copied from interface:RawMessageSerialize a raw message to a ByteBuf. The caller is responsible for releasing the returned ByteBuf.- Specified by:
serializein interfaceRawMessage
-
deserializeFrom
public static RawMessage deserializeFrom(io.netty.buffer.ByteBuf buffer)
-
-