Interface RedisSubscriptionListener

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onMessageReceive​(String channel, String message)
      Called when this subscription connection receives a message from a channel.
      void onPatternMessageReceive​(String channelPattern, String channel, String message)
      Called when this subscription connection receives a message from a channel.
      void onPatternSubscribe​(String channelPattern, long channelTotal)
      Called when this subscription connection subscribes to a set of channels via a pattern.
      void onPatternUnsubscribe​(String channelPattern, long channelTotal)
      Called when this subscription connection unsubscribes from a set of channels via a pattern.
      void onSubscribe​(String channelName, long channelTotal)
      Called when this subscription connection subscribes to a channel.
      void onUnsubscribe​(String channelName, long channelTotal)
      Called when this subscription connection unsubscribes from a channel.
    • Method Detail

      • onSubscribe

        void onSubscribe​(String channelName,
                         long channelTotal)
        Called when this subscription connection subscribes to a channel.
        Parameters:
        channelName - the subscribed channel.
        channelTotal - the total number of channels that this subscriber is subscribed to.
      • onUnsubscribe

        void onUnsubscribe​(String channelName,
                           long channelTotal)
        Called when this subscription connection unsubscribes from a channel.
        Parameters:
        channelName - the channel that this unsubscribed from.
        channelTotal - the total number of channels that this subscriber is subscribed to.
      • onPatternSubscribe

        void onPatternSubscribe​(String channelPattern,
                                long channelTotal)
        Called when this subscription connection subscribes to a set of channels via a pattern.
        Parameters:
        channelPattern - the channel pattern that this subscribed to.
        channelTotal - the total number of channels that this subscriber is subscribed to.
      • onPatternUnsubscribe

        void onPatternUnsubscribe​(String channelPattern,
                                  long channelTotal)
        Called when this subscription connection unsubscribes from a set of channels via a pattern.
        Parameters:
        channelPattern - the channel pattern that this unsubscribed from.
        channelTotal - the total number of channels that this subscriber is subscribed to.
      • onMessageReceive

        void onMessageReceive​(String channel,
                              String message)
        Called when this subscription connection receives a message from a channel.
        Parameters:
        channel - the channel that the message came from.
        message - the message received.
      • onPatternMessageReceive

        void onPatternMessageReceive​(String channelPattern,
                                     String channel,
                                     String message)
        Called when this subscription connection receives a message from a channel.
        Parameters:
        channelPattern - the channel pattern that was matched.
        channel - the channel that the message came from.
        message - the message received.