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

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

package io.agora.rtm;

import io.agora.common.internal.CalledByNative;
import io.agora.rtm.RtmConstants.RtmChannelType;

/**
 *  The channel information.
 */
public class ChannelInfo {
  /**
   * The channel which the message was published
   */
  private String channelName = "";

  /**
   * The type of channel
   * @see io.agora.rtm.RtmConstants.RtmChannelType
   */
  private RtmChannelType channelType;

  /**
   * Constructs a new {@code ChannelInfo} with the default channelType
   * {@code RtmChannelType.NONE}.
   */
  ChannelInfo() {
    this.channelType = RtmChannelType.NONE;
  }

  public void setChannelName(String channelName) {
    this.channelName = channelName;
  }

  public void setChannelType(RtmChannelType channelType) {
    this.channelType = channelType;
  }

  public String getChannelName() {
    return this.channelName;
  }

  public RtmChannelType getChannelType() {
    return this.channelType;
  }

  @CalledByNative
  public ChannelInfo(String channelName, int channelType) {
    this.channelName = channelName;
    this.channelType = RtmChannelType.getEnum(channelType);
  }

  @Override
  public String toString() {
    return "ChannelInfo {channelName: " + channelName + ", channelType: " + channelType + "}";
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy