Interface IRedisMessageReceivedEvent
- All Known Implementing Classes:
AsyncRedisMessageReceivedEvent
,RedisMessageReceivedEvent
,RedisMessageReceivedEvent
public interface IRedisMessageReceivedEvent
Redis incoming message Event interface. Used for handling differences between Spigot and Bungee Event API.
-
Method Summary
Modifier and TypeMethodDescriptionObtains the name of the channel message came fromObtains message received<T> T
getMessageObject
(Class<T> objectClass) Obtains object from received message by provided typeObtains the sender's identifierlong
Obtains message timestampboolean
Checks if the sender server has the same identifier as current server
-
Method Details
-
getSenderIdentifier
String getSenderIdentifier()Obtains the sender's identifier- Returns:
- Sender server's name
-
getChannel
String getChannel()Obtains the name of the channel message came from- Returns:
- Name of the incoming channel
-
getMessage
String getMessage()Obtains message received- Returns:
- Message received
-
getTimeStamp
long getTimeStamp()Obtains message timestamp- Returns:
- TimeStamp of the message
-
getMessageObject
Obtains object from received message by provided type- Type Parameters:
T
- Object type- Parameters:
objectClass
- Object class- Returns:
- Parsed object (null if it cannot be parsed)
-
isSelfSender
boolean isSelfSender()Checks if the sender server has the same identifier as current server- Returns:
- Whether the message was sent by this server
-