Class WeixinChannel

java.lang.Object
io.agentscope.extensions.channel.weixin.WeixinChannel
All Implemented Interfaces:
io.agentscope.harness.agent.gateway.channel.Channel

public final class WeixinChannel extends Object implements io.agentscope.harness.agent.gateway.channel.Channel
Personal Weixin adapter backed by Tencent's official iLink long-poll API.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    io.agentscope.harness.agent.gateway.channel.ChannelConfig
     
    create(String id, io.agentscope.harness.agent.gateway.channel.ChannelConfig config, WeixinChannelProperties properties, WeixinCredentialProvider credentialProvider, WeixinStateStore stateStore, WeixinRuntimeListener runtimeListener)
    Constructs a channel with host-provided credentials, state, and runtime observations.
    void
    deliver(io.agentscope.harness.agent.gateway.channel.OutboundAddress address, List<io.agentscope.core.message.Msg> messages)
     
    reactor.core.publisher.Mono<String>
    deliverWithReceipt(io.agentscope.harness.agent.gateway.channel.OutboundAddress address, io.agentscope.core.message.Msg message, String deliveryId)
    Sends one host-persisted reply and returns the provider's receipt.
    reactor.core.publisher.Mono<io.agentscope.core.message.Msg>
    dispatch(io.agentscope.harness.agent.gateway.channel.InboundMessage in)
     
    fromProperties(String id, io.agentscope.harness.agent.gateway.channel.ChannelConfig c, Map<String,Object> props)
     
    void
    init(io.agentscope.harness.agent.gateway.Gateway g)
     
    void
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.agentscope.harness.agent.gateway.channel.Channel

    applyRoutingConfig, dispatchStream
  • Field Details

  • Method Details

    • fromProperties

      public static WeixinChannel fromProperties(String id, io.agentscope.harness.agent.gateway.channel.ChannelConfig c, Map<String,Object> props)
    • create

      public static WeixinChannel create(String id, io.agentscope.harness.agent.gateway.channel.ChannelConfig config, WeixinChannelProperties properties, WeixinCredentialProvider credentialProvider, WeixinStateStore stateStore, WeixinRuntimeListener runtimeListener)
      Constructs a channel with host-provided credentials, state, and runtime observations.
    • channelId

      public String channelId()
      Specified by:
      channelId in interface io.agentscope.harness.agent.gateway.channel.Channel
    • config

      public io.agentscope.harness.agent.gateway.channel.ChannelConfig config()
      Specified by:
      config in interface io.agentscope.harness.agent.gateway.channel.Channel
    • init

      public void init(io.agentscope.harness.agent.gateway.Gateway g)
      Specified by:
      init in interface io.agentscope.harness.agent.gateway.channel.Channel
    • start

      public void start()
      Specified by:
      start in interface io.agentscope.harness.agent.gateway.channel.Channel
    • stop

      public void stop()
      Specified by:
      stop in interface io.agentscope.harness.agent.gateway.channel.Channel
    • dispatch

      public reactor.core.publisher.Mono<io.agentscope.core.message.Msg> dispatch(io.agentscope.harness.agent.gateway.channel.InboundMessage in)
      Specified by:
      dispatch in interface io.agentscope.harness.agent.gateway.channel.Channel
    • deliverWithReceipt

      public reactor.core.publisher.Mono<String> deliverWithReceipt(io.agentscope.harness.agent.gateway.channel.OutboundAddress address, io.agentscope.core.message.Msg message, String deliveryId)
      Sends one host-persisted reply and returns the provider's receipt. The host's delivery worker calls this, and a failure must stay visible: the worker keeps the notification pending and feeds the error back, so nothing is swallowed here except the provider's own reply text.
      Specified by:
      deliverWithReceipt in interface io.agentscope.harness.agent.gateway.channel.Channel
    • deliver

      public void deliver(io.agentscope.harness.agent.gateway.channel.OutboundAddress address, List<io.agentscope.core.message.Msg> messages)
      Specified by:
      deliver in interface io.agentscope.harness.agent.gateway.channel.Channel