Package org.apache.pulsar.client.api
Interface MessagePayloadFactory
public interface MessagePayloadFactory
The factory class of
MessagePayload
.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionwrap
(byte[] bytes) Create a payload whose underlying buffer refers to a byte array.wrap
(ByteBuffer buffer) Create a payload whose underlying buffer refers to a NIO buffer.
-
Field Details
-
DEFAULT
-
-
Method Details
-
wrap
Create a payload whose underlying buffer refers to a byte array.- Parameters:
bytes
- the byte array- Returns:
- the created MessagePayload object
-
wrap
Create a payload whose underlying buffer refers to a NIO buffer.- Parameters:
buffer
- the NIO buffer- Returns:
- the created MessagePayload object
-