Package org.apache.pulsar.client.api
Interface MessagePayloadFactory
-
public interface MessagePayloadFactory
The factory class ofMessagePayload
.
-
-
Field Summary
Fields Modifier and Type Field Description static MessagePayloadFactory
DEFAULT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MessagePayload
wrap(byte[] bytes)
Create a payload whose underlying buffer refers to a byte array.MessagePayload
wrap(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
-
-