Enum Class PeerKind

java.lang.Object
java.lang.Enum<PeerKind>
io.agentscope.harness.agent.gateway.channel.PeerKind
All Implemented Interfaces:
Serializable, Comparable<PeerKind>, Constable

public enum PeerKind extends Enum<PeerKind>
Classification of the conversation peer, used for session key construction and DM-scope resolution.
  • DIRECT — one-to-one DM / private conversation
  • CHANNEL — public or private channel / room
  • GROUP — group chat (WhatsApp group, Telegram supergroup, etc.)
  • THREAD — thread nested inside a CHANNEL or GROUP peer
  • Enum Constant Details

    • DIRECT

      public static final PeerKind DIRECT
    • CHANNEL

      public static final PeerKind CHANNEL
    • GROUP

      public static final PeerKind GROUP
    • THREAD

      public static final PeerKind THREAD
  • Method Details

    • values

      public static PeerKind[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PeerKind valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • value

      public String value()
    • isDirect

      public boolean isDirect()
      Whether this peer kind represents a direct (one-to-one) message.
    • isThread

      public boolean isThread()
      Whether this peer kind represents a thread nested inside another peer.