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 -
Method Summary
Modifier and TypeMethodDescriptionio.agentscope.harness.agent.gateway.channel.ChannelConfigconfig()static WeixinChannelcreate(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.voiddeliver(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) static WeixinChannelfromProperties(String id, io.agentscope.harness.agent.gateway.channel.ChannelConfig c, Map<String, Object> props) voidinit(io.agentscope.harness.agent.gateway.Gateway g) voidstart()voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.agentscope.harness.agent.gateway.channel.Channel
applyRoutingConfig, dispatchStream
-
Field Details
-
TYPE
- See Also:
-
-
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
- Specified by:
channelIdin interfaceio.agentscope.harness.agent.gateway.channel.Channel
-
config
public io.agentscope.harness.agent.gateway.channel.ChannelConfig config()- Specified by:
configin interfaceio.agentscope.harness.agent.gateway.channel.Channel
-
init
public void init(io.agentscope.harness.agent.gateway.Gateway g) - Specified by:
initin interfaceio.agentscope.harness.agent.gateway.channel.Channel
-
start
public void start()- Specified by:
startin interfaceio.agentscope.harness.agent.gateway.channel.Channel
-
stop
public void stop()- Specified by:
stopin interfaceio.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:
dispatchin interfaceio.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:
deliverWithReceiptin interfaceio.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:
deliverin interfaceio.agentscope.harness.agent.gateway.channel.Channel
-