Class ChannelTopic

java.lang.Object
org.springframework.data.redis.listener.ChannelTopic
All Implemented Interfaces:
Topic

public class ChannelTopic extends Object
Channel Topic implementation mapping to a Redis channel.
Author:
Costin Leau, Mark Paluch, John Blum
  • Constructor Details

    • ChannelTopic

      public ChannelTopic(String channelName)
      Constructs a new ChannelTopic instance.
      Parameters:
      channelName - must not be null.
  • Method Details

    • of

      public static ChannelTopic of(String channelName)
      Create a new ChannelTopic for channel subscriptions.
      Parameters:
      channelName - name of the Redis channel; must not be null.
      Returns:
      the ChannelTopic for the given channelName.
      Since:
      2.1
    • getTopic

      public String getTopic()
      Description copied from interface: Topic
      Returns the topic (as a String).
      Specified by:
      getTopic in interface Topic
      Returns:
      the topic
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object