Record Class WeixinChannelProperties

java.lang.Object
java.lang.Record
io.agentscope.extensions.channel.weixin.WeixinChannelProperties

public record WeixinChannelProperties(String accountId, String baseUrl, String ilinkUserId, String channelVersion, String botAgent, int longPollTimeoutMs, int requestTimeoutMs, int maxBackoffMs, int leaseMs, int dispatchTimeoutMs) extends Record
Provider configuration for one Personal Weixin Channel instance.

requestTimeoutMs bounds the control calls, while longPollTimeoutMs bounds the getupdates long poll — the provider holds that request open, so the client derives a longer deadline for it (see WeixinOutboundClient.timeoutFor).

  • Field Details

  • Constructor Details

    • WeixinChannelProperties

      public WeixinChannelProperties(String accountId, String baseUrl, String ilinkUserId, String channelVersion, String botAgent, int longPollTimeoutMs, int requestTimeoutMs, int maxBackoffMs, int leaseMs, int dispatchTimeoutMs)
      Creates an instance of a WeixinChannelProperties record class.
      Parameters:
      accountId - the value for the accountId record component
      baseUrl - the value for the baseUrl record component
      ilinkUserId - the value for the ilinkUserId record component
      channelVersion - the value for the channelVersion record component
      botAgent - the value for the botAgent record component
      longPollTimeoutMs - the value for the longPollTimeoutMs record component
      requestTimeoutMs - the value for the requestTimeoutMs record component
      maxBackoffMs - the value for the maxBackoffMs record component
      leaseMs - the value for the leaseMs record component
      dispatchTimeoutMs - the value for the dispatchTimeoutMs record component
  • Method Details

    • from

      public static WeixinChannelProperties from(String channelId, Map<String,Object> raw)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • accountId

      public String accountId()
      Returns the value of the accountId record component.
      Returns:
      the value of the accountId record component
    • baseUrl

      public String baseUrl()
      Returns the value of the baseUrl record component.
      Returns:
      the value of the baseUrl record component
    • ilinkUserId

      public String ilinkUserId()
      Returns the value of the ilinkUserId record component.
      Returns:
      the value of the ilinkUserId record component
    • channelVersion

      public String channelVersion()
      Returns the value of the channelVersion record component.
      Returns:
      the value of the channelVersion record component
    • botAgent

      public String botAgent()
      Returns the value of the botAgent record component.
      Returns:
      the value of the botAgent record component
    • longPollTimeoutMs

      public int longPollTimeoutMs()
      Returns the value of the longPollTimeoutMs record component.
      Returns:
      the value of the longPollTimeoutMs record component
    • requestTimeoutMs

      public int requestTimeoutMs()
      Returns the value of the requestTimeoutMs record component.
      Returns:
      the value of the requestTimeoutMs record component
    • maxBackoffMs

      public int maxBackoffMs()
      Returns the value of the maxBackoffMs record component.
      Returns:
      the value of the maxBackoffMs record component
    • leaseMs

      public int leaseMs()
      Returns the value of the leaseMs record component.
      Returns:
      the value of the leaseMs record component
    • dispatchTimeoutMs

      public int dispatchTimeoutMs()
      Returns the value of the dispatchTimeoutMs record component.
      Returns:
      the value of the dispatchTimeoutMs record component