Record Class OutboundAddress
java.lang.Object
java.lang.Record
io.agentscope.harness.agent.gateway.channel.OutboundAddress
- Record Components:
channelId- the channel adapter to deliver through (e.g."chatui","slack")accountId- optional multi-account identifier (nullable for single-account channels)to- delivery address in"channelId:peerKind:peerId"format (e.g."dingtalk:GROUP:cidXXX")threadId- optional thread context for threaded replies (nullable)
public record OutboundAddress(String channelId, String accountId, String to, String threadId)
extends Record
Delivery target for outbound (proactive) messages. Constructed by
ChannelRouter during
inbound routing and stored by the gateway as the session's "last route" so that proactive replies
(e.g. subagent completion announces) can be delivered back to the correct channel and peer.-
Constructor Summary
ConstructorsConstructorDescriptionOutboundAddress(String channelId, String accountId, String to, String threadId) Creates an instance of aOutboundAddressrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccountIdrecord component.Returns the value of thechannelIdrecord component.static OutboundAddressCreates an address for a direct (non-threaded) message.final booleanIndicates whether some other object is "equal to" this one.static OutboundAddressReconstructs an address from a persisted map, tolerating missing optional fields.final inthashCode()Returns a hash code value for this object.threadId()Returns the value of thethreadIdrecord component.to()Returns the value of thetorecord component.toMap()Serializes this address to a flat map forBaseStorepersistence.final StringtoString()Returns a string representation of this record class.static OutboundAddresswithAccount(String channelId, String accountId, String to) Creates an address with account context.
-
Constructor Details
-
Method Details
-
direct
Creates an address for a direct (non-threaded) message. -
withAccount
Creates an address with account context. -
toMap
Serializes this address to a flat map forBaseStorepersistence. -
fromMap
Reconstructs an address from a persisted map, tolerating missing optional fields. -
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. -
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. -
equals
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. All components in this record class are compared withObjects::equals(Object,Object). -
channelId
Returns the value of thechannelIdrecord component.- Returns:
- the value of the
channelIdrecord component
-
accountId
Returns the value of theaccountIdrecord component.- Returns:
- the value of the
accountIdrecord component
-
to
Returns the value of thetorecord component.- Returns:
- the value of the
torecord component
-
threadId
Returns the value of thethreadIdrecord component.- Returns:
- the value of the
threadIdrecord component
-