Package org.apache.pulsar.client.api
Interface MessagePayloadFactory
-
public interface MessagePayloadFactoryThe factory class ofMessagePayload.
-
-
Field Summary
Fields Modifier and Type Field Description static MessagePayloadFactoryDEFAULT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MessagePayloadwrap(byte[] bytes)Create a payload whose underlying buffer refers to a byte array.MessagePayloadwrap(java.nio.ByteBuffer buffer)Create a payload whose underlying buffer refers to a NIO buffer.
-
-
-
Field Detail
-
DEFAULT
static final MessagePayloadFactory DEFAULT
-
-
Method Detail
-
wrap
MessagePayload wrap(byte[] bytes)
Create a payload whose underlying buffer refers to a byte array.- Parameters:
bytes- the byte array- Returns:
- the created MessagePayload object
-
wrap
MessagePayload wrap(java.nio.ByteBuffer buffer)
Create a payload whose underlying buffer refers to a NIO buffer.- Parameters:
buffer- the NIO buffer- Returns:
- the created MessagePayload object
-
-