Class ChannelTopic

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

public class ChannelTopic extends Object implements Topic
Channel topic implementation (maps to a Redis channel).
Author:
Costin Leau, Mark Paluch
  • Constructor Details

    • ChannelTopic

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

    • of

      public static ChannelTopic of(String name)
      Create a new ChannelTopic for channel subscriptions.
      Parameters:
      name - the channel name, must not be null or empty.
      Returns:
      the ChannelTopic for 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:
      topic name.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object