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 Type
    Method
    Description
    Obtains the name of the channel message came from
    Obtains message received
    <T> T
    getMessageObject(Class<T> objectClass)
    Obtains object from received message by provided type
    Obtains the sender's identifier
    long
    Obtains message timestamp
    boolean
    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

      <T> T getMessageObject(Class<T> objectClass)
      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