Interface IRedisMessageReceiveEvent
- All Known Implementing Classes:
AsyncRedisMessageReceiveEvent,RedisMessageReceiveEvent
public interface IRedisMessageReceiveEvent
The interface of a Redis message receive event.
-
Method Summary
Modifier and TypeMethodDescription@NotNull StringGets the channel of the message.@NotNull StringGets the raw string message.<T> @NotNull Optional<T>getMessageObject(@NotNull Class<T> objectClass) Gets the object from the received message@NotNull StringGets the ID of the sending server.longGets the timestamp of the message
-
Method Details
-
getSenderId
Gets the ID of the sending server.- Returns:
- The ID of the sending server
-
getChannel
Gets the channel of the message.- Returns:
- THe channel name
-
getMessage
Gets the raw string message.- Returns:
- The raw string message
-
getTimestamp
long getTimestamp()Gets the timestamp of the message- Returns:
- The timestamp of the message
-
getMessageObject
Gets the object from the received message- Type Parameters:
T- Object type- Parameters:
objectClass- Object class- Returns:
- Parsed object, or null if it cannot be parsed
-