Package io.lettuce.core.api.push
Interface PushMessage
-
- All Known Implementing Classes:
PushOutput
public interface PushMessage
Interface representing a push message received from Redis. Push messages are messages received through of Pub/Sub or client-side caching registrations.- Since:
- 6.0
- Author:
- Mark Paluch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Object>
getContent()
Returns the notification message contents.List<Object>
getContent(Function<ByteBuffer,Object> decodeFunction)
Returns the notification message contents by applying adecodeFunction
onByteBuffer
elements.String
getType()
-
-
-
Method Detail
-
getType
String getType()
- Returns:
- the push message type.
-
getContent
List<Object> getContent()
Returns the notification message contents. The content contains all response value beginning withgetType()
using their appropriate Java representation. String data (simple and bulk) are represented asByteBuffer
and can be decoded throughStringCodec.decodeValue(ByteBuffer)
.ByteBuffer
objects are read-only buffers that share the content without sharing the read-position.- Returns:
- the notification message containing all response values including
getType()
.
-
getContent
List<Object> getContent(Function<ByteBuffer,Object> decodeFunction)
Returns the notification message contents by applying adecodeFunction
onByteBuffer
elements. The content contains all response value beginning withgetType()
using their appropriate Java representation. String data (simple and bulk) are mapped usingdecodeFunction
. Please note that buffer read positions are tracked by this method so decode functions are not required to reset the position.- Returns:
- the notification message containing all response values including
getType()
.
-
-