All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.agora.rtm.TopicInfo Maven / Gradle / Ivy

package io.agora.rtm;

import io.agora.common.internal.CalledByNative;
import io.agora.rtm.PublisherInfo;
import java.util.ArrayList;
import java.util.Arrays;

/**
 * Topic information
 */
public class TopicInfo {
  /**
   * The name of the topic.
   */
  private String topicName = "";

  /**
   * The publisher array
   */
  private ArrayList publishers;

  /**
   * Constructor for {@code TopicInfo} with default parameters.
   *
   * @param topicName The name of the topic
   */
  public TopicInfo(String topicName) {
    this.topicName = topicName;
    this.publishers = new ArrayList();
  }

  @CalledByNative
  TopicInfo(String topicName, PublisherInfo[] publishers) {
    this.topicName = topicName;
    this.publishers = new ArrayList(Arrays.asList(publishers));
  }

  public String getTopicName() {
    return this.topicName;
  }

  public ArrayList getPublishers() {
    return this.publishers;
  }

  @Override
  public String toString() {
    return "TopicInfo {topicName: " + topicName + ", publishers: " + publishers + "}";
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy